Skip to content
Preview
maya
The chips are in. Press one to put your reaction on or take it back.
The harbour at noon.

ReactionChip

glyphrequired
string
The system's own emoji, drawn as text at the chip's style (👍).
labelrequired
string
What a reader hears for the glyph (Thumbs up).
countrequired
number
How many gave it: the figure shows above one, and always when more gave it than the pictures show.
mine
boolean
Default: false
The reader gave it: the chip stands on the quiet raised fill (--fill-3) in the primary ink, its glyph whole; reactions only others gave stay in the neutral outline.
who
readonly string[]
Who gave it, in the product's order ("you" among them where the reader did): the chip's tooltip, under the pointer and on keyboard focus.
reactors
readonly AvatarStackItem[]
Who gave it, as 16px pictures beside the glyph (at most three); past them the count stands instead. Left out, the chip shows the glyph and its count alone.
onToggle
(mine: boolean) => void
A press: the product puts the reaction on (true) or takes it back (false). Without it the chip is still a toggle that tells its state, and the product handles onClick.
readOnly
boolean
Default: false
Shown where the reader cannot react (for example, their own message): static outline chip, not a toggle button.
buttonProps
ButtonMarks
The product's own marks on the chip's own element, the button a press hits: its data-* only.
rootStyle
ChipStyle
Typed StyleX override: where it sits and the --chip-* knobs.

side
"start" | "end"
Default: "start"
The message's side: the chips start on its edge.
label
string
Default: "Reactions"
The group's name for a reader.
rootStyle
RootStyle
Typed StyleX override: layout.
childrenrequired
ReactNode
ReactionChips, in the product's order. Each keeps its own slot: one added opens the row and one taken back shuts, while the rest stand where they are.

Rest props go to <div> props.

State machine

PreviewA reaction from Maya can be added to.