sigilUI

Isometric Prism

SVG isometric rectangular prism with configurable dimensions and per-face coloring.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { IsometricPrism } from "@sigil-ui/components";

Usage

<IsometricPrism width={160} height={100} depth={80} />
<IsometricPrism width={100} height={80} depth={100} topColor="var(--s-primary)" />

With rounded edges

<IsometricPrism borderRadius={4} strokeWidth={2} />

Custom face colors

<IsometricPrism
  topColor="oklch(0.7 0.15 160)"
  leftColor="oklch(0.5 0.12 160)"
  rightColor="oklch(0.6 0.12 160)"
/>

With children overlay

<IsometricPrism width={120} height={80} depth={120}>
  <span className="text-xs font-mono">DB</span>
</IsometricPrism>

Props

PropTypeDefaultDescription
widthnumber80Prism width in isometric units
heightnumber60Prism height in isometric units
depthnumber80Prism depth in isometric units
borderRadiusnumber0Corner rounding on polygon joins
topColorstringvar(--s-primary)Top face fill
leftColorstringvar(--s-surface)Left face fill
rightColorstringvar(--s-surface-elevated)Right face fill
strokeColorstringvar(--s-border)Edge stroke color
strokeWidthnumber1Edge stroke width
childrenReactNode—Content overlaid on the top face
classNamestring—Additional CSS classes