Dot
⋯
Dot renders the Figma Calendar page’s Dot set: an 8px circle in one of nine categorical colors.
It marks calendar events and legend entries beside visible text.
import { Dot } from "@nesra/ui/dot";
export function EventLabel() { return ( <span className="flex items-center gap-2"> <Dot color="blue" /> Team sync </span> );}Dot is also exported from @nesra/ui.
Examples
Section titled “Examples”Colors
Section titled “Colors”color keeps the Figma variant names in lowercase.
import { Dot } from "@nesra/ui/dot";
const colors = [ "neutral", "brand", "pink", "emerald", "blue", "indigo", "purple", "orange", "amber",] as const;
export function DotColorsExample() { return ( <ul className="grid grid-cols-3 gap-3 type-nesra-body-small-regular text-nesra-text-body"> {colors.map((color) => ( <li className="flex items-center gap-2" key={color}> <Dot color={color} /> {color} </li> ))} </ul> );}Legend and labelled dot
Section titled “Legend and labelled dot”Next to text, the dot is decorative. A dot that conveys meaning on its own needs an aria-label.
import { Dot } from "@nesra/ui/dot";
export function DotLegendExample() { return ( <div className="grid gap-3 type-nesra-body-small-regular text-nesra-text-body"> <ul aria-label="Calendar legend" className="flex flex-wrap gap-4"> <li className="flex items-center gap-2"> <Dot color="blue" /> Meetings </li> <li className="flex items-center gap-2"> <Dot color="emerald" /> Deadlines </li> <li className="flex items-center gap-2"> <Dot color="amber" /> Holidays </li> </ul> <p className="flex items-center gap-2"> Status: <Dot aria-label="Holiday" color="amber" /> </p> </div> );}Light and Dark
Section titled “Light and Dark”Each color is bound to a Categorical/*/base role. The base roles keep the same value in Light and
Dark.
color |
Figma variant | Fill |
|---|---|---|
neutral |
Neutral | Categorical/Neutral/base |
brand |
Brand | Categorical/Violet/base |
pink |
Pink | Categorical/Pink/base |
emerald |
Emerald | Categorical/Teal/base |
blue |
Blue | Categorical/Blue/base |
indigo |
Indigo | Categorical/Indigo/base |
purple |
Purple | Categorical/Purple/base |
orange |
Orange | Categorical/Orange/base |
amber |
Amber | Categorical/Yellow/base |
Accessibility
Section titled “Accessibility”- Without
aria-labeloraria-labelledby, the dot hasaria-hidden="true". Put the meaning in nearby text. - With
aria-labeloraria-labelledby, the dot rendersrole="img"with that name. - Color alone does not distinguish events. Pair each dot with a visible label or legend entry.
API reference
Section titled “API reference”| Prop | Type | Default | Effect |
|---|---|---|---|
color |
"neutral" | "brand" | "pink" | "emerald" | "blue" | "indigo" | "purple" | "orange" | "amber" |
"neutral" |
Categorical fill. |
Native span attributes, className, and refs are forwarded. The rendered span has
data-slot="dot" and data-color. DotProps and DotColor are exported for wrappers. Colors come
from the Light and Dark semantic color roles; see also shape tokens.