Skip to main content

Isometric

Isometric is the root container that provides the isometric context for child components.

Import

import { Isometric } from "isometric-react/isometric";

Props

PropTypeRequiredDescription
childrenReact.ReactNodeYesContent rendered inside the isometric container.
asReact.ElementTypeNoPolymorphic element type. Defaults to div.

Isometric is polymorphic, so you can pass regular props for the selected as element (for example className, id, and data-* attributes).

Example

import { Isometric } from "isometric-react/isometric";
import { IsometricPlane } from "isometric-react/isometric-plane";
import "isometric-react/isometric.css";

export function Example() {
return (
<Isometric>
<IsometricPlane size={{ width: 6, height: 6 }} />
</Isometric>
);
}

Rendered example

Supported shared props

  • Supports only the polymorphic as prop.
  • Does not support positioning, border/edge, shadow, or animation props directly.