Pictogram
StableA one-color line icon, larger than a button icon, for small areas and lists of features.
Also known as icon illustration, symbol
Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.
Sizes
<Pictogram name="document" size={32} />
<Pictogram name="document" size={48} />
<Pictogram name="document" size={64} />The lines get thicker as the picture grows, so it looks balanced at each size.
When to use it
A line drawing larger than an icon, for spots where a full illustration is too much. It takes the color of the text around it.
Use it for
- A row or grid of things the assistant can do.
- A small empty area where a full drawing would not fit.
- Beside a heading, to mark its topic.
Not for
- A full empty, error or success screen: use Illustration.
- An icon inside a button: use IconButton.
Do and avoid
Documents
Ask about any file your team shares.
Do
- Put a visible label beside it.
- Use it in small empty areas where a full drawing would crowd the words.
- Use one size within a group.
Avoid
- Do not use it as a button icon. Use a small icon.
- Do not fill its shapes. Pictograms stay as lines.
- Do not add any color except the text color.
On a phone
- Pictogram is a fixed 32, 48 or 64px and looks the same on a phone.
- It is not tappable. If it starts something, wrap it in a button, which gets a 44px target on touch screens.
Seen in products
- Carbon's pictogram contribution page says pictograms are built on the icon grid with a 32 x 32 artboard and 1px of padding, which leaves 30px usable.
- Carbon snaps pictograms to the pixel grid, keeps strokes as strokes, and delivers them solid black so they can be recolored in code.
- A search snippet gives Carbon's stroke scaling as 0.72 at 32px, 1.08 at 48px, 1.44 at 64px, 1.8 at 80px and 2.16 at 96px.
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
| namerequired | PictogramName | none | One of chat, agent, document, image, code, data, search, shield, memory, voice, plan, tools. |
| size | 32 | 48 | 64 | 32 | Rendered size in px. |
| title | string | none | Accessible name. Without it the pictogram is aria-hidden. |
| className | string | none | Extra classes for the svg element. |
"Show code under the preview gives the code for the example on the stage."
Tokens
Change one of these and every part that uses it follows.
--fg--fg-muted
Built in
- Without a title, screen readers skip it.
- With a title, screen readers read it as a picture and say the title.
- The keyboard never stops on it.
- It uses the surrounding text color, so it follows the theme.
What you need to do
- Check that the text color it takes stands out against the background.
- Give a title only when it means something the nearby words do not say.
Built toward WCAG 2.2 AA and checked automatically; no independent audit yet. Read the accessibility guide