Materials
48 CSS surfaces: metal, glass, stone, and cloth. One class paints a bevelled rim, a layered fill, a shadow, and the ink for the text on top.
material-brushed-aluminumInstall
Add the utility's CSS with the CLI, your coding agent, or by hand. It has no JavaScript.
Usage
Put the class on the element. Add text-material-ink to a part that sets its own text color, such as a Button or a Badge.
Classes
48 materials in 11 groups. Each class sets its own ink, so text on it reads with no more classes. Use one material per screen.
Dark mode
A material does not change in dark mode. Pick a pair with dark:, so each theme gets its own surface.
material-brushed-aluminum dark:material-anodized-graphiteOptions
The variables and the ink classes of the utility. Set a variable with an arbitrary property, such as [--material-shadow:none].
| Name | Kind | Default | Description |
|---|---|---|---|
--material-rim | variable | per material | The 1.5px edge, painted on the border box. Set it to change the rim and keep the surface. |
--material-ink | variable | per material | The text color that reads on this material. The class sets the color of the element to it. |
--material-ink-muted | variable | per material | A quieter ink for labels and captions on the same material. |
--material-shadow | variable | per material | The drop shadow under the element. Set it to none for a flat look. |
text-material-ink | class | — | Sets the ink on a part that has its own text color, such as a Button or a Badge. |
text-material-ink-muted | class | — | Sets the muted ink on a child of the material. |
- Pattern
pattern-hatchHatch, dots, grid, and checker for empty or reserved areas.
- Shape
shape-zigzagCut the edges or corners of any box: zigzag, scallop, notch.
- Glow
glowA soft halo in the element's own color, for bars and lines.
- Typeset
typesetOne class styles the plain HTML of an article or a page.
- Shimmer
shimmerA light sweep for skeletons and loading text, in sync.
- Scroll Fade
scroll-fadeFade the edges of a scroll area, only where it can scroll.