Skip to main content

Theme config

Theme mode

Color palette

Grays

Border radii/radiuses/radiopedes/you know
Border radius
Field border radius
Button border radius
All
Components
Guides
API
Recent

    API

    Component API

    Accordion

    TypeModifiersDefaultDescription
    Grouping[name]-Groups accordions so only one of them can be open at a time.
    State[open]-Whether the accordion is open.
    Variantsdefault, .ui-elevated, .ui-outlined, .ui-tonaldefaultThe variant to use.

    Parts

    PartDescription
    details.ui-accordionContainer element.
    <summary>The always visible header.
    .ui-contentThe collapsible content.
    .ui-actionsA group of actions, such as buttons.

    Add .ui-card to the root for card styles. Group accordions in a .ui-card[role="group"] and set the variant on it to theme the whole group.

    Anchor

    TypeModifiersDefaultDescription
    Position--anchor-position-areastart endAny valid position-area value. Controls where the floating content is placed.
    Triggerdefault, .ui-anchor-floating[popover="hint"]defaultShows the floating content always, or on hover and focus with popover="hint".

    Parts

    PartDescription
    .ui-anchorContainer element. Scopes the anchor to its content.
    & > :first-childThe content the floating content is anchored to.
    .ui-anchor-floatingThe floating content.

    For a hover trigger, add popover="hint" and an id to .ui-anchor-floating, and interestfor with that id to the anchor content.

    Avatar

    TypeModifiersDefaultDescription
    Group[role="group"]-Renders a container that groups avatars.
    Variants.ui-rounded, .ui-squared, .ui-squircle-The variant to use.

    Parts

    PartDescription
    .ui-avatarContainer element.
    <img>The avatar image.

    Badge

    TypeModifiersDefaultDescription
    Alignment.ui-end-end, .ui-end-start, .ui-start-start, --anchor-position-area-Where the indicator is placed.
    Colors.ui-critical, .ui-info, .ui-neutral, .ui-success, .ui-warning-Optional colors.
    Variants.ui-dot-Renders the indicator as a dot, without a label.
    Visibility.ui-invisible-Hides the indicator.

    Parts

    PartDescription
    .ui-badgeContainer element. Also takes .ui-anchor.
    & > :first-childThe element the badge is anchored to.
    .ui-badge-indicatorThe indicator, inside .ui-anchor-floating.

    With an alignment class, also set --anchor-position-area to the same position, such as start start.

    Button

    TypeModifiersDefaultDescription
    Colors.ui-critical, .ui-primary-Optional colors.
    Sizes.ui-large, .ui-small, .ui-x-small-The size of the element.
    State[disabled]-Disables the button.
    Variants.ui-filled, .ui-outlined, .ui-tonal-The variant to use.

    Parts

    PartDescription
    .ui-buttonContainer element.
    <svg>An optional icon.
    <span>The label.

    Button Group

    TypeModifiersDefaultDescription
    Colors.ui-critical, .ui-primary-Optional colors for the buttons.
    Orientation.ui-vertical-The orientation of the element.
    Sizes.ui-large, .ui-small-The size of the buttons.
    Variants.ui-filled, .ui-outlined, .ui-tonal-The variant of the buttons.

    Parts

    PartDescription
    .ui-button-groupContainer element.
    & > buttonThe buttons.

    The root needs role="group".

    Callout

    TypeModifiersDefaultDescription
    Severities.ui-critical, .ui-info, .ui-neutral, .ui-success, .ui-warning-The severity. Sets the color and the default icon.
    Variantsdefault, .ui-outlineddefaultThe variant to use.

    Parts

    PartDescription
    .ui-calloutContainer element.
    <svg>An optional icon. info, warning and critical have a default icon.
    .ui-contentThe content.
    <h3>An optional title inside the content.

    The root needs role="note".

    Card

    TypeModifiersDefaultDescription
    Alignmentdefault, .ui-actions.ui-align-end-Alignment for the actions.
    Variants.ui-elevated, .ui-outlined, .ui-text, .ui-tonal-The variant to use.

    Parts

    PartDescription
    .ui-cardContainer element.
    <hgroup>The card header.
    .ui-contentThe card content.
    .ui-actionsA group of actions, such as buttons.

    Checkbox

    TypeModifiersDefaultDescription
    Layout.ui-spread-Pushes the label and the input to opposite ends.
    Layout.ui-stack-Stacks the label under the input.
    Sizes.ui-large, .ui-small-The size of the element.
    Stateinput[data-indeterminate]-Shows a partially checked state. Sets the indeterminate property on the <input>.
    Validation[data-invalid]-Shows error styles.

    Parts

    PartDescription
    label.ui-checkboxContainer element.
    <input>The checkbox input.
    .ui-labelThe label.
    .ui-end-textSupporting text displayed below the label.

    Use .ui-sr-only instead of .ui-label to hide the label visually. data-indeterminate needs checkbox.js, which sets the indeterminate property.

    Chip

    TypeModifiersDefaultDescription
    Layout.ui-multiline-Lets the label wrap to multiple lines.
    Sizes.ui-small-The size of the element.
    Variants.ui-outlined, .ui-tonal.ui-tonalThe variant to use.

    Parts

    PartDescription
    .ui-chipContainer element. Can be a <div>, <a> or <button>.
    <svg>Optional content at the start, such as an icon.
    .ui-textThe label.
    <svg>Optional content at the end, such as an icon.

    Classic Select

    TypeModifiersDefaultDescription
    Sizes.ui-small-The size of the element.
    Validation[data-invalid]-Shows error styles.
    Variantsdefault, .ui-filleddefaultThe variant to use.

    Parts

    PartDescription
    label.ui-selectContainer element.
    .ui-labelThe label for the field.
    .ui-fieldThe boxed select area.
    <select>A native select.
    .ui-end-textSupporting text displayed below the field.

    Description List

    TypeModifiersDefaultDescription
    Bordered.ui-bordered, .ui-bordered.ui-dotted-Adds a border between the term and the description.

    Parts

    PartDescription
    dl.ui-description-listContainer element.
    .ui-itemGroups a term with its description.
    <dt>The term.
    <dd>The description.

    Dialog

    TypeModifiersDefaultDescription
    Alignmentdefault, .ui-actions.ui-align-end-Alignment for the actions.
    Close behavior[closedby]-How the dialog can be closed. "any" also closes it on a click outside.

    Parts

    PartDescription
    dialog.ui-dialogContainer element.
    <hgroup>The dialog header.
    .ui-contentThe dialog content.
    .ui-actionsA group of actions, such as buttons.

    Add .ui-card and .ui-elevated to the root for card styles.

    Divider

    TypeModifiersDefaultDescription
    Variants.ui-border-filled, .ui-border-primary, .ui-border-tonal-The variant to use.

    Parts

    PartDescription
    hr.ui-dividerThe divider line.

    Drawer

    TypeModifiersDefaultDescription
    Backdropdefault, .ui-backdrop-transparentdefaultThe backdrop style.
    Close behavior[closedby]-How the drawer can be closed. "any" also closes it on a click outside.
    Scroll lock.ui-scroll-lock-Locks page scroll while the drawer is open.
    Sides.ui-block-end, .ui-block-start, .ui-inline-end, .ui-inline-start.ui-inline-startThe side it opens from.

    Parts

    PartDescription
    dialog.ui-drawerContainer element.
    .ui-headerThe header. DrawerHeader renders it with a close button.
    .ui-contentThe scrollable content.
    .ui-footerThe footer. DrawerFooter renders it.

    Add autofocus to the root, or to an element inside, to choose what gets focus when it opens.

    Drawer Header

    Parts

    PartDescription
    .ui-headerContainer element.
    <span>The heading.
    <button>Closes the drawer.

    Field Description

    Parts

    PartDescription
    .ui-field-descriptionSupporting text for a fieldset.

    Field Group

    TypeModifiersDefaultDescription
    Orientationdefault, .ui-row-The orientation of the element.

    Parts

    PartDescription
    .ui-field-groupContainer element.

    The root needs role="group". Wrap it in a .ui-fieldset with a <legend> to label it.

    Field Legend

    Parts

    PartDescription
    :is(legend, .ui-legend)The label of a fieldset.

    Field Set

    TypeModifiersDefaultDescription
    State[disabled]-Disables every field inside.
    Validation[data-invalid]-Shows error styles on the fields inside.

    Parts

    PartDescription
    .ui-fieldsetContainer element.
    <legend>The label of the fieldset.
    .ui-field-descriptionSupporting text displayed below the legend.

    Form

    Parts

    PartDescription
    .ui-formContainer element. Spaces its fieldsets and fields.

    Icon Button

    TypeModifiersDefaultDescription
    Colors.ui-critical, .ui-primary-Optional colors.
    Sizes.ui-small-The size of the element.
    State[disabled]-Disables the button.
    Variants.ui-filled, .ui-outlined, .ui-tonal-The variant to use.

    Parts

    PartDescription
    .ui-icon-buttonContainer element.
    <svg>The icon.

    Add aria-label to give the button an accessible name.

    List

    TypeModifiersDefaultDescription
    Bordered.ui-bordered-Adds a border between list items.
    Dense.ui-dense-Packs the list tighter.
    Gutterless.ui-gutterless-Removes the inline padding.
    Variants.ui-default, .ui-tonal, .ui-transparent-The background color variant.

    Parts

    PartDescription
    ul.ui-listContainer element.
    <li>A list item.

    List Item

    TypeModifiersDefaultDescription
    Border top.ui-border-top-Adds a border above the item.
    Controlsdefault, label.ui-checkbox, label.ui-radio, label.ui-switch-Wraps the content in a <label> for a checkbox, radio or switch.
    Inset.ui-inset-Aligns the text with items that have start content.

    Parts

    PartDescription
    <li>The list item.
    .ui-startOptional content at the start, such as an icon or avatar.
    .ui-textThe text content.
    <p>The headline, the first paragraph.
    <p>Supporting text, the second paragraph.
    .ui-endOptional content at the end, such as a value or an action.

    Wrap the content in an <a>, <button> or <label> to make the item interactive.

    Progress

    TypeModifiersDefaultDescription
    Valueprogress[value]-The current value. Omit it for an indeterminate state.
    Variants.ui-default, .ui-filled, .ui-tonal-The variant to use.

    Parts

    PartDescription
    .ui-progressContainer element.
    <progress>The progress bar.

    Radio

    TypeModifiersDefaultDescription
    Layout.ui-stack-Stacks the label under the input.
    Sizes.ui-large, .ui-small-The size of the element.
    Validation[data-invalid]-Shows error styles.

    Parts

    PartDescription
    label.ui-radioContainer element.
    <input>The radio input.
    .ui-labelThe label.
    .ui-end-textSupporting text displayed below the label.

    Use .ui-sr-only instead of .ui-label to hide the label visually.

    Range

    TypeModifiersDefaultDescription
    Layout.ui-spread-Pushes the label and description to one side and the input to the other.
    Validation[data-invalid]-Shows error styles.
    Variants.ui-default, .ui-filled, .ui-tonal-The variant to use.

    Parts

    PartDescription
    label.ui-rangeContainer element.
    .ui-labelThe label for the range.
    <output>Shows the current value, with an optional valueSuffix.
    .ui-start-textDescription text displayed above the input.
    <input>The range input.
    .ui-end-textSupporting text displayed below the input.

    Add a <datalist> after the input for tick marks.

    Select

    TypeModifiersDefaultDescription
    Dense.ui-list.ui-dense-Packs the options tighter.
    Layout.ui-spread-Pushes the label and description to one side and the select to the other.
    Sizes.ui-small-The size of the element.
    Validation[data-invalid]-Shows error styles.
    Variantsdefault, .ui-filleddefaultThe variant to use.

    Parts

    PartDescription
    label.ui-selectContainer element.
    .ui-labelThe label for the field.
    .ui-start-textDescription text displayed above the field.
    .ui-fieldThe boxed select area.
    .ui-headerContent above the select, inside the border, with a divider.
    .ui-prefixContent at the inline-start of the field, inside the border.
    <select>The select. Its options are in a popover list.
    .ui-suffixContent at the inline-end of the field, inside the border.
    .ui-footerContent below the select, inside the border, with a divider.
    .ui-end-textSupporting text displayed below the field.

    The <select> holds a <button> with <selectedcontent>, and a .ui-list with the options. Browsers without customizable selects show a native select.

    Spinner

    TypeModifiersDefaultDescription
    Statearia-busy="true"-Renders a spinner pseudo-element on the element. Always indeterminate.
    Sizesfont-size on the element1emSpinner size follows the element's computed font size.
    Excluded<input>, <select>, <textarea>, <html>, <progress>, elements with aria-describedby-Elements that never receive a spinner.

    Switch

    TypeModifiersDefaultDescription
    Layout.ui-spread-Pushes the label and the switch to opposite ends.
    Layout.ui-stack-Stacks the label under the switch.
    Sizes.ui-small-The size of the element.
    Validation[data-invalid]-Shows error styles.

    Parts

    PartDescription
    label.ui-switchContainer element.
    <input>The switch input.
    .ui-icon-uncheckedAn optional icon in the thumb when unchecked.
    .ui-icon-checkedAn optional icon in the thumb when checked.
    .ui-labelThe label.
    .ui-end-textSupporting text displayed below the label.

    The input needs type="checkbox" and role="switch". Use .ui-sr-only instead of .ui-label to hide the label visually.

    Table

    TypeModifiersDefaultDescription
    Variants.ui-dense, .ui-spacious-The variant to use.

    Parts

    PartDescription
    table.ui-tableContainer element.
    <thead>The header rows.
    <th>A header cell.
    <tbody>The body rows.
    <tr>A row.
    <td>A data cell.

    Tabs

    TypeModifiersDefaultDescription
    Group.ui-tab-input[name]-The name shared by the tab inputs. Generated when omitted.

    Parts

    PartDescription
    .ui-tabsContainer element.
    .ui-tab-inputA visually hidden radio input that holds a tab's state.
    .ui-tab-labelA tab.
    .ui-tab-panelThe panel of the selected tab.

    The root needs role="tablist". Each tab is an input.ui-tab-input[type="radio"], followed by its label.ui-tab-label[role="tab"] and .ui-tab-panel[role="tabpanel"].

    Tabs Item

    TypeModifiersDefaultDescription
    State[checked]-Selects the tab initially.

    Parts

    PartDescription
    input.ui-tab-inputThe radio input for a tab, followed by the tab and the panel.

    Tabs Panel

    Parts

    PartDescription
    .ui-tab-panelThe panel.

    Tabs Tab

    Parts

    PartDescription
    label.ui-tab-labelThe tab.

    Text Field

    TypeModifiersDefaultDescription
    Auto-fit.ui-auto-fit-Changes size depending on its content.
    Layout.ui-spread-Pushes the label and description to one side and the input to the other.
    Sizes.ui-small-The size of the element.
    Validation[data-invalid]-Shows error styles.
    Variants.ui-filled-The variant to use.

    Parts

    PartDescription
    label.ui-text-fieldContainer element.
    .ui-labelThe label for the field.
    .ui-start-textDescription text displayed above the field.
    .ui-fieldThe boxed input area.
    .ui-headerContent above the input, inside the border, with a divider.
    .ui-prefixContent at the inline-start of the field, inside the border.
    <input>The input element.
    .ui-suffixContent at the inline-end of the field, inside the border.
    .ui-footerContent below the input, inside the border, with a divider.
    .ui-end-textSupporting text displayed below the field.

    The control can also be a <select> or <textarea>. A <datalist> can be placed inside the root.

    Text Input

    TypeModifiersDefaultDescription
    Wrapper.ui-field-The <input> must be wrapped in a <span class="ui-field"> element. Border, background, and focus styling are inherited from .ui-field, not the input itself.
    Auto-fit.ui-auto-fit-When enabled, the element changes size depending on its content.
    Sizes.ui-small-The size of the element.
    Variantsdefault, .ui-filled-The variant to use.

    Textarea

    TypeModifiersDefaultDescription
    Auto-fit.ui-auto-fit-Changes height depending on its content.
    Layout.ui-spread-Pushes the label and description to one side and the textarea to the other.
    Sizes.ui-small-The size of the element.
    Validation[data-invalid]-Shows error styles.
    Variants.ui-filled-The variant to use.

    Parts

    PartDescription
    label.ui-textareaContainer element.
    .ui-labelThe label for the field.
    .ui-start-textDescription text displayed above the field.
    .ui-fieldThe boxed textarea area.
    .ui-headerContent above the textarea, inside the border, with a divider.
    .ui-prefixContent at the inline-start of the field, inside the border.
    <textarea>The textarea element.
    .ui-suffixContent at the inline-end of the field, inside the border.
    .ui-footerContent below the textarea, inside the border, with a divider.
    .ui-end-textSupporting text displayed below the field.

    Toast

    TypeModifiersDefaultDescription
    Command--show-toast-Custom invoker command to trigger a toast notification.
    Messagevalue / textContent-The message to display in the toast.
    Severitydata-severityinfoModifies the toast appearance. Options: success, critical, info.
    Durationdata-duration5000msDetermines how long the toast remains visible. Supports CSS time units (ms, s).
    Container#toast-manager-The global fixed container that manages the stack of toasts.
    Component.ui-toast-Individual notification element within the container.

    Toggle Button

    TypeModifiersDefaultDescription
    Sizes.ui-small, .ui-x-small-The size of the element.
    State.ui-disabled-Disables the button.
    Stateinput[checked]-Selects the button.
    Typeinput[type="checkbox"], input[type="radio"]input[type="checkbox"]The input type. "radio" allows one selection in a group.

    Parts

    PartDescription
    label.ui-toggle-buttonContainer element.
    <input>A visually hidden checkbox or radio input.

    Set disabled on the input too. Checkbox inputs also need aria-pressed.

    Toggle Group

    TypeModifiersDefaultDescription
    Orientation.ui-vertical-The orientation of the element.
    Selection[role="group"], [role="radiogroup"][role="group"]Whether one or several buttons can be selected. "single" uses radio inputs.
    Sizesdefault, .ui-small, .ui-x-smalldefaultThe size of the buttons.

    Parts

    PartDescription
    .ui-toggle-groupContainer element.
    .ui-toggle-buttonA toggle button.

    Tooltip

    TypeModifiersDefaultDescription
    Arrow.ui-with-arrow-Adds an arrow that points to the trigger.
    Position--anchor-position-areablock-startAny valid position-area value. Controls where the tooltip is placed.

    Parts

    PartDescription
    .ui-tooltipContainer element.
    & > :first-childThe trigger that shows the tooltip on hover and focus.
    .ui-anchor-floatingThe tooltip, a popover="hint".

    Also add .ui-anchor to the root. Give .ui-anchor-floating popover="hint" and an id, and add interestfor with that id to the trigger.

    Typography

    TypeModifiersDefaultDescription
    Headings.ui-h1, .ui-h2, .ui-h3, .ui-h4, .ui-h5, .ui-h6-Heading styles for any element.
    Paragraph.ui-p-Body paragraph styling.
    Sizes.ui-small, .ui-large-Size modifiers on .ui-p.
    Overline.ui-overline-Small uppercase label text.
    Caption.ui-caption-Muted supporting text.
    Heading group.ui-hgroup-Groups an overline, heading, and optional body copy.
    Blockquote.ui-blockquote-Quoted block with a start border.
    Code blockpre.ui-code-block-Monospace preformatted block.
    Inline.ui-abbr, .ui-cite, .ui-del, .ui-dfn, .ui-ins, .ui-kbd, .ui-mark, .ui-s, .ui-samp, .ui-small, .ui-sub, .ui-sup, .ui-u, .ui-var-Inline text element utilities.
    Rich text.ui-rich-text-Classless typography for uncontrolled child markup.