One glyph on the icon scale
Icon draws one Material Symbol for the places no other component draws one: beside a heading, in a line of text, at the head of a card. It sits on the icon scale, mirrors in a right-to-left context when it points along the line, and stays hidden from assistive tech unless it carries meaning of its own, when a label names it.
Sizes
Tones, filled and tile
Props
Read from the same JSDoc that ships in the package's types. A required prop is marked with an asterisk.
| Prop | Type | Default | Description |
|---|---|---|---|
name* | string | The Material Symbol's name (`settings`, `arrow_forward`). A glyph that points along the reading direction mirrors in a right-to-left context. | |
size | "500" | "600" | "800" | "1200" | '600' | The size, as a step on the icon scale (`--icon-size-600`, the size beside body text, by default). |
tone | "inherit" | "default" | "neutral" | 'default' | The glyph's colour role. `inherit` takes the colour of the text around it. |
filled | boolean | false | Draws the filled form of the glyph, as a selected nav item does. |
label | string | What the icon means, when it carries meaning no text beside it says. With a label the icon is an image with that name; without one it is decorative and hidden from assistive tech. | |
tile | boolean | false | Sets the glyph on a round tile of the icon fill, the mark at the head of a stat card or a list row. |
className | string | '' | Additional CSS classes |
Keys
Nothing here takes focus, so there are no keys. A test holds that.
// From the npm package
import { Icon } from 'rift-ds/components/Icon/Icon';
// Or as source you own, via the shadcn CLI
npx shadcn@latest add https://rift-ds.com/r/icon.json0.6 kB gzipped, with everything it imports. Peer dependencies are not counted.
For agents: the props, their allowed values and defaults, and the tested keys, as markdown or as a JSON schema.