Skip to main content

CSS Variables

isometric-react is driven by CSS custom properties. You can override these variables in your own styles to customize visuals globally or per component.

How to override variables

.my-scene .isometric-plane {
--isometric-plane-color: #4f8bff;
--isometric-border-color: #1f2a44;
--isometric-border-size: 1px;
}

Variable reference

Cube

VariableDefaultPurpose
--isometric-cube-width0remCube width.
--isometric-cube-height0remCube height.
--isometric-cube-depth0remCube depth.
--isometric-border-size-cube0pxCube face border size.
--isometric-border-style-cubesolidCube face border style.
--isometric-border-color-cube#fffCube face border color base.

Plane

VariableDefaultPurpose
--isometric-plane-width0remPlane width.
--isometric-plane-height0remPlane height.
--isometric-plane-color#000000Plane fill color.

Grid

VariableDefaultPurpose
--isometric-grid-size1remBase grid cell size.
--isometric-grid-width1Grid width multiplier.
--isometric-grid-height1Grid height multiplier.
--isometric-grid-color#000Grid line color.
--isometric-grid-lineweight1%Grid line thickness.

Border and edge helpers

VariableDefaultPurpose
--isometric-border-size0pxBorder size for generic bordered elements.
--isometric-border-stylesolidBorder style for generic bordered elements.
--isometric-border-color#000000Border color for generic bordered elements.
--isometric-edge-color#fffEdge color base.
--isometric-edge-depth0pxEdge extrusion depth.

Position

VariableDefaultPurpose
--isometric-position-top0remTop offset.
--isometric-position-left0remLeft offset.
--isometric-position-elevation0remElevation offset.

Rotation

VariableDefaultPurpose
--isometric-rotate-from0degInitial rotation value on the element.
--isometric-rotation-duration1sRotation animation duration.
--isometric-rotation-delay0sRotation animation delay.
--rotation-from0degKeyframe start value.
--rotation-to360degKeyframe end value.

Shadow

VariableDefaultPurpose
--isometric-shadow-distance0Shadow distance for opacity falloff math.
--isometric-shadow-distance-with-unit1remShadow distance with unit for transforms.
--isometric-shadow-spacing-x0Shadow X direction multiplier.
--isometric-shadow-spacing-y0Shadow Y direction multiplier.

Shadow animation

VariableDefaultPurpose
--isometric-shadow-animation-from0Animation start distance.
--isometric-shadow-animation-to0Animation end distance.
--isometric-shadow-animation-from-with-unit0remStart distance with unit for transforms.
--isometric-shadow-animation-to-with-unit0remEnd distance with unit for transforms.
--isometric-shadow-animation-duration1sShadow animation duration.
--isometric-shadow-animation-delay0sShadow animation delay.
--isometric-shadow-animation-options(none)Extra animation options, for example alternate infinite.
--isometric-shadow-spacing-x0Shared X direction multiplier used by animation transforms.
--isometric-shadow-spacing-y0Shared Y direction multiplier used by animation transforms.