Styling
Pro's class names and the component variables you can set
Pro is styled the way the core is: BEM class names emitted by variant functions, data-slot on
rendered elements, and per-component custom properties as the seam. Pro's names are its own.
Class names, state selectors, slots and variant functions are in Styling.
Class Names
A block, its elements, its modifiers — Widget is the shape of all of them:
.widget {
}
.widget__header {
}
.widget__title {
}
.widget__legend-item-dot {
}Modifiers carry size and variant: .prompt-input--sm, .prompt-input--md, .prompt-input--lg,
and .chat-message--user beside .chat-message--assistant. Target a part and nothing else moves:
.widget__legend-item-dot {
width: 10px;
height: 10px;
}Component Variables
The loader and shimmer variables carry their default on the element named, and a declaration on an element beats a value inherited from an ancestor: set those on that element, or on a selector that reaches it, because a value on a wrapper is overridden by the default and nothing changes. The two radius variables are the other kind — nothing declares them, the stylesheet only reads them with a fallback, so an ancestor works for those.
| Variable | Declared on | Changes |
|---|---|---|
--chat-loader-dot-size | .chat-loader__dots | Diameter of one dot |
--chat-loader-dot-gap | .chat-loader__dots | Space between the dots |
--chat-loader-pulse-size | .chat-loader__pulse | Diameter of the pulse |
--chat-loader-avatar-size | .chat-loader | Avatar square in the skeleton variant |
--chat-loader-line-height | .chat-loader | Height of a skeleton line |
--spread | .text-shimmer | How far the highlight fades on each side of its centre |
--text-shimmer-rest | .text-shimmer | How much color the label keeps while the highlight is elsewhere |
--checkbox-button-group-item-radius | .checkbox-button-group | Corner radius of a card |
--radio-button-group-item-radius | .radio-button-group | Corner radius of a card |
--text-shimmer-rest has a floor. Its default, 60%, is the lowest value that holds 4.5:1 for
the default foreground — measured at 4.51:1 in the light theme and 7.16:1 in the dark one. A
lower value fails the AA floor for body text, and a label that starts dimmer than the
foreground needs a higher one.
.my-loader {
--chat-loader-dot-size: 8px;
--chat-loader-dot-gap: 6px;
}The Full List
Each component page carries the classes that component emits, with a link to its stylesheet in the repository — that source is the list, and it cannot drift from itself.