Shaped icon
ProAn icon in a circle or an M3 Expressive shape, in a colour role's container colours: emphasis for steps, features and empty states. Not an M3 component (@windmorph/react-pro).
import { ShapedIcon } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Props
ShapedIcon 9 props
The icon: an SVG, drawn at the size's icon size in the colour's content role.
circle, or a shape outline drawn as a CSS mask: an M3 Expressive shape from@windmorph/react/primitives(shape={sunnyShape}) or an app's ownMaterialShapePath. Itsnamegoes todata-shape.Container / icon:
sm40/24px,md56/28px,lg64/32px,xl96/48px.colortype"primary" | "secondary" | "tertiary" | "neutral" | "error" | "success" | "warning"default"secondary"The container's colour roles: its container colour, and the content colour on it. The accents,
neutral, and the status roleserror,successandwarning.The container. Its other props (
id,style,aria-*,data-*) go to it too.
Text
A name, when the icon means something on its own (
role="img"). Otherwise it's decorative.
Classes on the container; merged with
classNames.root.Classes for each part, merged over the library's.
Inline styles for the root element.
Also accepts the root element's HTML attributes (id, data-*, event handlers).
Spec status
Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.
| Item | Status | Details |
|---|---|---|
Sizes: sm, md, lg, xl | Built | Configuration · Sizes |
| A circle or an M3 Expressive shape (a shape constant) | Built | Variant · Sizes, Steps |
| Colours: primary, secondary, tertiary, neutral, success, warning, error | Built | Variant · Colors |
| Leading icons for steps or features | Built | Use case · Steps |
Theming
color picks the container roles (primary, secondary, tertiary, neutral, success, warning, error); size sets the container and icon (40/24, 56/28, 64/32 and 96/48px); shape is circle or a shape outline (shape={sunnyShape}, any of the 35 constants from @windmorph/react/primitives, or your own MaterialShapePath), drawn as a CSS mask, so the colours follow the theme; each outline adds only its own path to the bundle. Sizes are in px, so the shape keeps its size at larger text sizes. It has no tokens of its own: the root carries data-tokens="wm-shaped-icon" and the parts take classNames. In forced colours only the icon stays, in the system text colour, since the shape is decoration.