Result State
Stands in for content that is not there, such as an empty list, a search with no matches, a failed request or a missing page, and says what to do next.
Create the first order to start tracking what you buy from suppliers.
import { Button } from '@slotted/react/button';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';export default function ResultStateBasic() { return ( <ResultState> <ResultStateContent> <ResultStateTitle>No purchase orders yet</ResultStateTitle> <ResultStateDescription> Create the first order to start tracking what you buy from suppliers. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button>Create purchase order</Button> </ResultStateActions> </ResultState> );}Installation
The packages are a 0.x beta on npm, and their public API changes between beta releases without deprecation. One line installs the binding and the default theme.
pnpm add @slotted/react @slotted/theme @slotted/themesimport { ResultState, ResultStateActions, ResultStateContent, ResultStateDefaultsProvider, ResultStateDescription, ResultStateFooter, ResultStateTitle } from '@slotted/react';Result state, alert or inline message
A result state replaces the content it is about: a list with no rows, a panel that failed to load, a route that does not exist. Use it when the region has nothing else to show. An Alert sits beside content that is still on the page and frames a notice about it. An InlineMessage is one line under one control. A Skeleton fills the region while the request is pending, and the result state takes its place once the request returns nothing or fails; the two never share a region.
The region is a section named by its title. The title and the description sit in the content part, the only part that announces. The buttons sit in the actions part and the documentation link in the footer part, both outside the content part.
Statuses
status names the situation: empty, no-results, not-found, error, forbidden, offline or success. The value is written on the root as data-status and paints nothing, so the title and the description carry the meaning. Say what happened and what the reader can do about it. The default is empty.
Shipments appear here once a carrier collects an order.
Check the spelling or search by order number.
It may have been merged into another order.
The orders service did not respond. Try again in a moment.
Only members of Finance can open them. Ask an administrator for access.
Changes are kept on this device and sync when the connection returns.
The customer receives 84.20 USD within 5 business days.
import { ResultState, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';const REGIONS = [ { status: 'empty', title: 'No shipments yet', description: 'Shipments appear here once a carrier collects an order.', }, { status: 'no-results', title: 'No orders match this search', description: 'Check the spelling or search by order number.', }, { status: 'not-found', title: 'Order SO-10492 does not exist', description: 'It may have been merged into another order.', }, { status: 'error', title: 'Orders did not load', description: 'The orders service did not respond. Try again in a moment.', }, { status: 'forbidden', title: 'Payroll reports are restricted', description: 'Only members of Finance can open them. Ask an administrator for access.', }, { status: 'offline', title: 'You are offline', description: 'Changes are kept on this device and sync when the connection returns.', }, { status: 'success', title: 'Refund issued', description: 'The customer receives 84.20 USD within 5 business days.', },] as const;export default function ResultStateStatuses() { return ( <Stack gap={6}> {REGIONS.map((region) => ( <Stack gap={1} key={region.status}> <Text size="sm" tone="muted"> {region.status} </Text> <ResultState align="start" reach="inline" status={region.status}> <ResultStateContent> <ResultStateTitle>{region.title}</ResultStateTitle> <ResultStateDescription>{region.description}</ResultStateDescription> </ResultStateContent> </ResultState> </Stack> ))} </Stack> );}Reach
reach sets the scope of the message. inline is one row for a table cell or a toolbar, with the actions on the same line and no illustration. section is a panel inside a card or a page. page is a whole route and sets the title in the 3xl step of the type scale. The default is section.
Invoices appear here when an order ships and stay until they are paid.
The page you opened does not exist or has moved.
import { Button } from '@slotted/react/button';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';export default function ResultStateReach() { return ( <Stack gap={8}> <Stack gap={1}> <Text size="sm" tone="muted"> inline </Text> <ResultState reach="inline" status="no-results"> <ResultStateContent> <ResultStateTitle>No rows match the filter</ResultStateTitle> </ResultStateContent> <ResultStateActions> <Button size="sm" variant="ghost"> Clear filters </Button> </ResultStateActions> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> section </Text> <ResultState reach="section" status="empty"> <ResultStateContent> <ResultStateTitle>No open invoices</ResultStateTitle> <ResultStateDescription> Invoices appear here when an order ships and stay until they are paid. </ResultStateDescription> </ResultStateContent> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> page </Text> <ResultState reach="page" status="not-found"> <ResultStateContent> <ResultStateTitle>Page not found</ResultStateTitle> <ResultStateDescription> The page you opened does not exist or has moved. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button>Go to the dashboard</Button> </ResultStateActions> </ResultState> </Stack> </Stack> );}Alignment
align="center" centers the region and suits a panel or a route. align="start" reads from the inline edge and suits a screen of dense tables, where a centered column interrupts the rows. The default is center.
Save a report to run it again in one click.
Save a report to run it again in one click.
import { Button } from '@slotted/react/button';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';export default function ResultStateAlign() { return ( <Stack gap={8}> <Stack gap={1}> <Text size="sm" tone="muted"> center </Text> <ResultState align="center"> <ResultStateContent> <ResultStateTitle>No saved reports</ResultStateTitle> <ResultStateDescription> Save a report to run it again in one click. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button>Save a report</Button> </ResultStateActions> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> start </Text> <ResultState align="start"> <ResultStateContent> <ResultStateTitle>No saved reports</ResultStateTitle> <ResultStateDescription> Save a report to run it again in one click. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button>Save a report</Button> </ResultStateActions> </ResultState> </Stack> </Stack> );}Your own artwork
The media part holds a glyph or an illustration of your own. In React pass it as media; in Angular project an element carrying slResultStateMedia. The part is hidden from assistive technology, so the title and the description must say what the picture says. The part keeps the height the reach gives it, so artwork that loads late does not move the title.
Scans are saved on this scanner and upload when the connection returns.
import { Button } from '@slotted/react/button';import { Glyph, Icon } from '@slotted/react/icon';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';export default function ResultStateMedia() { return ( <ResultState media={ <Icon> <Glyph name="cloud-off" /> </Icon> } status="offline" > <ResultStateContent> <ResultStateTitle>You are offline</ResultStateTitle> <ResultStateDescription> Scans are saved on this scanner and upload when the connection returns. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button variant="outline">Check connection</Button> </ResultStateActions> </ResultState> );}Illustrations
illustration draws a neutral picture around the glyph in the media part: tile frames the glyph, stack leans three layers behind it and cards shows a thumbnail beside two lines, like a row. tile and stack draw nothing without a glyph, cards draws its lines with or without one, and inline reach draws none of them. The drawings take no tone.
Alerts tell you when stock runs low.
No supplier messages are waiting.
Attach packing slips or customs forms.
Import a file to fill this table.
import { Glyph, Icon } from '@slotted/react/icon';import { Grid } from '@slotted/react/grid';import { ResultState, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';export default function ResultStateIllustrations() { return ( <Grid columns={2} gap={6} minItemWidth="xs"> <Stack gap={1}> <Text size="sm" tone="muted"> tile </Text> <ResultState illustration="tile" media={ <Icon> <Glyph name="bell" /> </Icon> } > <ResultStateContent> <ResultStateTitle>No alerts configured</ResultStateTitle> <ResultStateDescription>Alerts tell you when stock runs low.</ResultStateDescription> </ResultStateContent> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> stack </Text> <ResultState illustration="stack" media={ <Icon> <Glyph name="inbox" /> </Icon> } > <ResultStateContent> <ResultStateTitle>Inbox is clear</ResultStateTitle> <ResultStateDescription>No supplier messages are waiting.</ResultStateDescription> </ResultStateContent> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> cards </Text> <ResultState illustration="cards" media={ <Icon> <Glyph name="file-text" /> </Icon> } > <ResultStateContent> <ResultStateTitle>No documents attached</ResultStateTitle> <ResultStateDescription>Attach packing slips or customs forms.</ResultStateDescription> </ResultStateContent> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> cards, no glyph </Text> <ResultState illustration="cards"> <ResultStateContent> <ResultStateTitle>No rows to show</ResultStateTitle> <ResultStateDescription>Import a file to fill this table.</ResultStateDescription> </ResultStateContent> </ResultState> </Stack> </Grid> );}Actions and footer
The actions part holds the controls that get the reader out of the situation. Give a failed request the retry first and an alternative second. The controls are your own Buttons, so they keep every button state. They stack below a container width of 20rem. The footer part holds the line under the actions, such as a link to documentation that is not a call to action.
The rate service timed out, so shipping costs are not shown. Your cart is unchanged.
import { Button } from '@slotted/react/button';import { Link } from '@slotted/react/link';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateFooter, ResultStateTitle,} from '@slotted/react/result-state';export default function ResultStateActionsExample() { return ( <ResultState status="error"> <ResultStateContent> <ResultStateTitle>Carrier rates did not load</ResultStateTitle> <ResultStateDescription> The rate service timed out, so shipping costs are not shown. Your cart is unchanged. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button>Try again</Button> <Button variant="outline">Use flat rate</Button> </ResultStateActions> <ResultStateFooter> <Link href="#retries">How retries are counted</Link> </ResultStateFooter> </ResultState> );}Retrying a request
Set loading on the retry button while the request is in flight, and keep the region on the page. The region changes its status and its text in place, so the content part, which already exists, announces the new message. Press the button: the retry takes 1.5 seconds.
The rate service timed out. Your cart is unchanged.
import { useEffect, useState } from 'react';import { Button } from '@slotted/react/button';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';type Phase = 'failed' | 'retrying' | 'loaded';export default function ResultStateRetry() { const [phase, setPhase] = useState<Phase>('failed'); useEffect(() => { if (phase !== 'retrying') return; const timer = setTimeout(() => setPhase('loaded'), 1500); return () => clearTimeout(timer); }, [phase]); return ( <ResultState status={phase === 'loaded' ? 'success' : 'error'}> <ResultStateContent> <ResultStateTitle> {phase === 'loaded' ? 'Carrier rates loaded' : 'Carrier rates did not load'} </ResultStateTitle> <ResultStateDescription> {phase === 'loaded' ? 'Showing 14 shipping options for 3 packages.' : 'The rate service timed out. Your cart is unchanged.'} </ResultStateDescription> </ResultStateContent> {phase !== 'loaded' && ( <ResultStateActions> <Button loading={phase === 'retrying'} onClick={() => setPhase('retrying')}> Try again </Button> </ResultStateActions> )} </ResultState> );}Clearing a search
A search that matches nothing is no-results, and its action clears the search. The region replaces the list while the query matches nothing and the list returns when the query matches again. Press the button to clear the query.
Clear the search to see all 4 orders.
import { useState } from 'react';import { Button } from '@slotted/react/button';import { Field, FieldLabel } from '@slotted/react/field';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';import { TextField } from '@slotted/react/text-field';import { Text } from '@slotted/react/typography';const ORDERS = [ { id: 'SO-10482', customer: 'Harbor & Pine' }, { id: 'SO-10483', customer: 'Brightline Studio' }, { id: 'SO-10484', customer: 'Northgate Labs' }, { id: 'SO-10485', customer: 'Verde Kitchen' },];export default function ResultStateSearch() { const [query, setQuery] = useState('Contoso'); const needle = query.trim().toLowerCase(); const rows = ORDERS.filter((order) => `${order.id} ${order.customer}`.toLowerCase().includes(needle), ); return ( <Stack gap={4}> <Field> <FieldLabel>Search orders</FieldLabel> <TextField onValueChange={setQuery} value={query} /> </Field> {rows.length === 0 ? ( <ResultState status="no-results"> <ResultStateContent> <ResultStateTitle>No orders match this search</ResultStateTitle> <ResultStateDescription> Clear the search to see all {ORDERS.length} orders. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button onClick={() => setQuery('')} variant="outline"> Clear search </Button> </ResultStateActions> </ResultState> ) : ( <Stack gap={2}> {rows.map((order) => ( <Text key={order.id}> {order.id} · {order.customer} </Text> ))} </Stack> )} </Stack> );}What a reader hears
live sets whether the text announces itself. polite, the default, writes role="status" on the content part, because the region is the outcome of an operation. assertive writes role="alert" for a failure the reader has to hear now. off writes no role, for a screen that already owns a live region around this one. The root is never a live region and never moves focus: it carries tabindex="-1" so your code can send focus to it.
Check the spelling or search by order number.
Use another card to complete the order.
A live region on this screen announces changes.
import { ResultState, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';export default function ResultStateLive() { return ( <Stack gap={6}> <Stack gap={1}> <Text size="sm" tone="muted"> polite: role status </Text> <ResultState align="start" live="polite" reach="inline" status="no-results"> <ResultStateContent> <ResultStateTitle>No orders match this search</ResultStateTitle> <ResultStateDescription> Check the spelling or search by order number. </ResultStateDescription> </ResultStateContent> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> assertive: role alert </Text> <ResultState align="start" live="assertive" reach="inline" status="error"> <ResultStateContent> <ResultStateTitle>Payment was declined</ResultStateTitle> <ResultStateDescription>Use another card to complete the order.</ResultStateDescription> </ResultStateContent> </ResultState> </Stack> <Stack gap={1}> <Text size="sm" tone="muted"> off: no role </Text> <ResultState align="start" live="off" reach="inline"> <ResultStateContent> <ResultStateTitle>No drafts</ResultStateTitle> <ResultStateDescription> A live region on this screen announces changes. </ResultStateDescription> </ResultStateContent> </ResultState> </Stack> </Stack> );}Title as a heading
The title is a div by default, because a heading enters the document outline and only the page knows whether this message belongs there. A full page for a missing route does: render the title as the page’s h1. In React pass render to ResultStateTitle; in Angular write slResultStateTitle on an h1. A region inside one card of a grid keeps the div.
Order not found
Nothing exists at /orders/SO-10492-REV3. The order may have been deleted or merged.
import { Button } from '@slotted/react/button';import { ResultState, ResultStateActions, ResultStateContent, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';export default function ResultStateHeading() { return ( <ResultState reach="page" status="not-found"> <ResultStateContent> <ResultStateTitle render={(props) => <h1 {...props} />}>Order not found</ResultStateTitle> <ResultStateDescription> Nothing exists at /orders/SO-10492-REV3. The order may have been deleted or merged. </ResultStateDescription> </ResultStateContent> <ResultStateActions> <Button>Back to orders</Button> </ResultStateActions> </ResultState> );}Defaults
A defaults provider sets status, reach, align, live and illustration once for every result state under it: ResultStateDefaultsProvider in React and provideResultStateDefaults in Angular. A region that sets a value of its own keeps it. A screen of tables sets reach="inline" and align="start" once.
Every carrier picked up on time this week.
Widen the date range to see earlier returns.
This region sets its own reach and alignment.
import { ResultState, ResultStateContent, ResultStateDefaultsProvider, ResultStateDescription, ResultStateTitle,} from '@slotted/react/result-state';import { Stack } from '@slotted/react/stack';export default function ResultStateDefaults() { return ( <ResultStateDefaultsProvider align="start" reach="inline"> <Stack gap={6}> <ResultState status="empty"> <ResultStateContent> <ResultStateTitle>No late shipments</ResultStateTitle> <ResultStateDescription> Every carrier picked up on time this week. </ResultStateDescription> </ResultStateContent> </ResultState> <ResultState status="no-results"> <ResultStateContent> <ResultStateTitle>No returns in this period</ResultStateTitle> <ResultStateDescription> Widen the date range to see earlier returns. </ResultStateDescription> </ResultStateContent> </ResultState> <ResultState align="center" reach="section" status="error"> <ResultStateContent> <ResultStateTitle>Inventory counts did not load</ResultStateTitle> <ResultStateDescription> This region sets its own reach and alignment. </ResultStateDescription> </ResultStateContent> </ResultState> </Stack> </ResultStateDefaultsProvider> );}Accessibility
- The Authoring Practices Guide has no pattern for empty, error or result states. The nearest guidance is the region landmark practice, which states that “a region landmark must have a label”. The root is a section and aria-labelledby is written only once a title exists, so a region without a title is a plain grouping element rather than a landmark with no name.
- The box is a landmark, not a live region. The MDN reference for the alert role states that the role “should only be used for text content, not interactive elements such as links or buttons”, and a result state holds buttons. The content part is the live region and holds the title and the description alone; the media, the actions and the footer are its siblings.
- live defaults to polite, where Alert defaults to off. The Understanding document for WCAG 2.2 SC 4.1.3 gives “No results returned” as an example of a status message. An alert may be a standing notice that was on the page before it loaded; a result is always the outcome of an operation.
- Status is never carried by color, because result state paints no color for it: what happened is in the title and the description, which forced colors leave legible. The illustrations keep the theme’s system-color mapping under forced colors, so a stack is still three layers and not three outlines laid over one another.
- The media box is hidden from assistive technology, with the glyph, the drawing made around it and any artwork you supply. The title and the description must say what the picture says. An illustration that adds information is not decorative, and what it adds belongs in the description.
- The root carries tabindex="-1" and is not in the tab sequence. After your code empties a table, it can send the reader to the message through the ref. Result state never moves focus by itself, because moving focus unprompted is a change of context nobody asked for.
- Result state holds no mutable value, so it emits no events and has no event table. Which status a region is in is a fact about your own data: a region that decided it would be deciding whether the request failed.
- A region that announces arrives: its words fade in and its drawing assembles, on the entering curve, and a hidden region fades out on the leaving curve. Under reduced motion the drawing arrives assembled. The focus indicator is not animated, because a focus indicator that fades in is one that is not there yet.
API
ResultState
Props
status'empty' | 'no-results' | 'not-found' | 'error' | 'forbidden' | 'offline' | 'success'Defaultempty- What the region is reporting, written on the root as data-status for a page to key its own artwork on. Result state paints nothing for it: what happened is in the title and the description.
reach'inline' | 'section' | 'page'Defaultsection- The scope the message applies to. inline is a row for a table cell and draws no illustration; page takes the 3xl step of the type scale and draws the illustration half again as large.
align'center' | 'start'Defaultcenter- Whether the region reads centered or from the inline edge. start is for a data-dense screen, where a centered column reads as an interruption.
live'off' | 'polite' | 'assertive'Defaultpolite- Whether the text announces itself. polite writes role="status" on the content part and assertive writes role="alert"; both imply aria-live and aria-atomic, and neither is written on the box.
illustration'none' | 'tile' | 'stack' | 'cards'Defaultnone- The drawing result state makes around the glyph in media, in the neutral surface and border roles and never in a tone. tile and stack frame a glyph and draw nothing without one; cards draws its lines with or without it; none draws nothing of its own.
mediaReactNode- The glyph an illustration is drawn around, or artwork the page supplies under illustration="none", projected into the box result state draws so it keeps the height the reach gives it. Angular projects an element carrying slResultStateMedia instead.
Composition
render(props) => ReactNode- On every partSubstitutes the rendered element of ResultState, ResultStateContent, ResultStateTitle, ResultStateDescription, ResultStateActions or ResultStateFooter, and hands it every data attribute. A title rendered as a heading is how a page puts the region in its outline.
refRef<HTMLElement>- Reaches the section, which carries tabindex="-1" so focus() works. It is the whole imperative surface: result state never moves focus by itself, because moving it unprompted is a change of context nobody asked for.
idstring- On ResultStateTitleAn identifier you write is kept, and the root points aria-labelledby at that one rather than at its own.
ResultStateDefaultsProvider{ status, reach, align, live, illustration }- On a subtreeSets all five once for every region under it; an explicit prop on one region still wins.
childrenReactNode- On ResultStateContentThe title and the description. Anything else placed here joins the live region, which is why the actions and the footer are parts of their own.
Container, Cardcomposition- On around ResultStateThe measure belongs to Container and the frame to Card. Result state caps no width and draws no box.
Parts
| Part | Element | Required | Purpose |
|---|---|---|---|
root | section | Yes | The region. Carries data-ui="result-state", the data-status, data-reach, data-align, data-illustration and data-live attributes, and tabindex="-1". A section named by its own title is a region landmark a reader can jump to; unnamed it is a plain grouping element that costs nothing. |
media | div | No | The page’s glyph or its own artwork, hidden from assistive technology. With illustration set, result state draws a tile, a stack or a stack of cards around the glyph here. It keeps the height the reach gives it, so artwork that has not loaded moves nothing when it arrives. Empty it is withdrawn by the stylesheet, except under cards, which draws its lines without a glyph. |
content | div | Yes | The title and the description, and nothing else. This is the live region: role="status" or role="alert" is written here, so the buttons beside it are outside what a reader hears. |
title | div, or the element render returns | No | The message’s name, and the region’s: the root points aria-labelledby at it. A div by default, because a heading belongs in the document outline and only the page knows whether this message does. An id the page writes is kept, and the root points at that one instead. |
description | p, or the element render returns | No | What to do next. It breaks a string no language can break — a resource id, a host name without a hyphen — rather than overflowing, and removes nothing from the DOM to do it. |
actions | div | No | The controls that get the reader out of the situation, outside the live region. They stack below a container width of 20rem, and at inline reach they sit on the message’s own first line. |
footer | div | No | The line under the actions: the documentation link that is not a call to action. Set one step down and in the muted role, because it is neither of the buttons above it. |
Theming
Each token is a CSS custom property: set it in a theme, or on any element to retune every result state inside it.
Result State tokens
| Token | Default |
|---|---|
--slotted-result-state-actions-block-gap | var(--slotted-space-8, 1.5rem) |
--slotted-result-state-actions-gap | var(--slotted-action-gap, 8px) |
--slotted-result-state-column-gap | var(--slotted-space-4, 0.5rem) |
--slotted-result-state-description-font-size | var(--slotted-font-size-md, 0.875rem) |
--slotted-result-state-font-family | var(--slotted-font-family-sans, sans-serif) |
--slotted-result-state-media | — |
--slotted-result-state-media-size | var(--slotted-control-height-md, 34px) |
--slotted-result-state-padding-block | var(--slotted-space-9, 2rem) |
--slotted-result-state-padding-inline | var(--slotted-space-6, 1rem) |
--slotted-result-state-row-gap | var(--slotted-space-6, 1rem) |
--slotted-result-state-text-gap | var(--slotted-space-4, 0.5rem) |
--slotted-result-state-title-font-family | var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) ) |
--slotted-result-state-title-font-size | var(--slotted-font-size-xl, 1.125rem) |
--slotted-result-state-title-font-weight | var(--slotted-font-weight-semibold, 600) |
--slotted-result-state-title-letter-spacing | -0.01em |
Theme tokens it reads
| Token | Default |
|---|---|
--slotted-action-gap | comfortable 8px · compact 6px · dense 4px |
--slotted-border-strong | Set per scheme by the theme |
--slotted-border-subtle | Set per scheme by the theme |
--slotted-border-width-thin | 1px |
--slotted-control-height-lg | comfortable 38px · compact 32px · dense 30px |
--slotted-control-height-md | comfortable 34px · compact 28px · dense 26px |
--slotted-control-height-sm | comfortable 30px · compact 26px · dense 24px |
--slotted-control-icon-size-lg | comfortable 18px · compact 16px · dense 14px |
--slotted-control-icon-size-md | comfortable 16px · compact 14px · dense 13px |
--slotted-duration-long | 320ms |
--slotted-duration-medium | 200ms |
--slotted-duration-short | 120ms |
--slotted-easing-enter | cubic-bezier(0.05, 0.7, 0.1, 1) |
--slotted-easing-exit | cubic-bezier(0.3, 0, 0.8, 0.15) |
--slotted-focus-ring-color | Set per scheme by the theme |
--slotted-focus-ring-offset | var(--slotted-border-width-thick) |
--slotted-focus-ring-width | var(--slotted-border-width-thick) |
--slotted-font-family-heading | var(--slotted-font-family-sans) |
--slotted-font-family-sans | 'Geist Variable', ui-sans-serif, system-ui, sans-serif |
--slotted-font-size-3xl | 1.5rem |
--slotted-font-size-lg | 1rem |
--slotted-font-size-md | 0.875rem |
--slotted-font-size-sm | 0.8125rem |
--slotted-font-size-xl | 1.125rem |
--slotted-font-size-xs | 0.75rem |
--slotted-font-weight-semibold | 600 |
--slotted-line-height-3xl | 1.3 |
--slotted-line-height-md | 1.5 |
--slotted-line-height-sm | 1.45 |
--slotted-line-height-xl | 1.45 |
--slotted-radius-lg | 8px |
--slotted-radius-sm | 4px |
--slotted-shadow-sm | Set per scheme by the theme |
--slotted-shadow-xs | Set per scheme by the theme |
--slotted-space-11 | 3rem |
--slotted-space-12 | 4rem |
--slotted-space-2 | 0.25rem |
--slotted-space-3 | 0.375rem |
--slotted-space-4 | 0.5rem |
--slotted-space-5 | 0.75rem |
--slotted-space-6 | 1rem |
--slotted-space-8 | 1.5rem |
--slotted-space-9 | 2rem |
--slotted-surface-raised | Set per scheme by the theme |
--slotted-surface-sunken | Set per scheme by the theme |
--slotted-text | Set per scheme by the theme |
--slotted-text-muted | Set per scheme by the theme |