Components
IconBox
Renders an icon inside a styled surface box - for empty states, feature highlights, and status indicators. Icon size defaults to the box size. Import from "@instruments/materia-ui/components/icon-box".
Usage
Best practices
Reach for
IconBoxfor a framed-icon surface (empty states, feature highlights) instead of wrappingIconin a hand-styleddiv- it owns the size→radius and box→icon-size pairings.Set colour via
tone, not a hex/bg-*className -tonecarries the paired surface+foreground tokens, including the dark-mode variants.Let
iconSizedefault from the boxsize; override only when the glyph must break the built-inBOX_TO_ICON_SIZEratio.
Props
Also exports
- interface
IconBoxProps