Documentation
- 312 sections
- Solid
- Tailwind or StyleX
Heading
Semantic h1–h6 on the site's scale: level picks the size and weight, size draws it at another step when the outline and the look part (a card's title under a section: level 3, size 4), class overrides anything below.
- level
- Type1 | 2 | 3 | 4 | 5 | 6 Default2
- size
- Type1 | 2 | 3 | 4 | 5 | 6 Defaultlevel
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherHeadingLabel
A real <label> that pairs with controls through for (or by nesting), which is the whole point over a styled span. A required marker adds an asterisk that screen readers skip.
- required
- Typeboolean Defaultfalse
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherLabelCaption
Supporting text in the caption register: 11px and muted, at AA contrast in either tone.
- tone
- Type"muted" | "faint" Default"muted"
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCaptionOverline
The tiny uppercase eyebrow above a section: 10px, open tracking, muted. Editorial structure without a heading's weight.
- tone
- Type"muted" | "faint" Default"muted"
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherHeading DitherOverlineCode
Inline code: the <code> element in house chrome. For the copyable block form, that's CodeBlock in the app layer; this one lives inside prose.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCodeKbdCombo
A shortcut as one readable unit: keys in Kbd chips with the separator between them. Single keys go through DitherKbd directly.
- keys
- Typestring[] Default['⌘', 'K']
- separator
- Typestring Default"+"
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherKbdComboBlockquote
Real <blockquote> semantics with the editorial treatment: hairline left rule, muted register. Citations ride in the children.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherBlockquoteHighlight
The <mark> element with a neutral token wash. Colored variants belong in class because house color comes from palette seeds.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherHighlightTruncate
One-line ellipsis around any content. The native title attr rides through, so native tooltips stay one attribute away.
- as
- Typestring Default"span"
- title
- Typestring Defaultnone
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherTruncateLineClamp
A block clamped after N lines (1–6) with a real ellipsis: excerpts, card bodies, previews that must not grow.
- lines
- Type1 | 2 | 3 | 4 | 5 | 6 Default3
- as
- Typestring Default"p"
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherLineClampMiddleEllipsis
Center-ellipsis for identifiers: paths, keys and hashes keep both ends, which is where recognition happens. The full string stays in title.
- text
- Typestring Default"…"
- head
- Typenumber (chars) Default8
- tail
- Typenumber (chars) Default6
- title
- Typeboolean Defaulttrue
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherMiddleEllipsisEllipsisTooltip
Truncation with a tooltip that only earns itself: observes its own overflow (ResizeObserver, zero forced reads) and publishes title only while clipped. Unclipped content gets no tooltip, which is the point.
- enabled
- Typeboolean Defaulttrue
- as
- Typestring Default"span"
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherEllipsisTooltipLink
The anchor, dressed in house chrome: hairline underline that grows its offset and brightens on hover, color inherited from wherever it sits.
- href
- Typestring Defaultrequired
- external
- Typeboolean (target + rel) Defaultfalse
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherLinkExternalLink
New-tab semantics done right: _blank with rel=noreferrer, plus the ExternalLink glyph after the label.
- class
- Typestring Defaultnone
- href
- Typestring Defaultrequired
- iconSize
- Typenumber (px) Default12
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherExternalLinkSelectableText
Text that selects itself on click (user-select: all) for license keys, tokens and one-tap copy targets. Wraps any inline content.
- as
- Typestring Default"span"
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherSelectableTextCopyableText
One-tap copy around a piece of text. The value goes through the shared Clipboard primitive (live region included); the trigger flips from Copy to Check.
- value
- Typestring Defaultrequired
- label
- Typestring (aria) Default"Copy"
- size
- Typenumber (px) Default14
- class
- Typestring Defaultnone
- children
- TypeJSX.Element | ((scope: { readonly copied: boolean }) => JSX.Element) Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCopyableTextNumberText
Locale-aware numbers: grouping, decimals and locale through Intl, and tabular-nums so columns line up.
- value
- Typenumber Defaultrequired
- decimals
- Typenumber (min = max) Defaultnatural
- locale
- Typestring Default"en-US"
- grouping
- Typeboolean Defaulttrue
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherNumberTextCurrencyText
Money through Intl. Symbol placement and grammar are the runtime's job; ours is picking currency, locale and decimals.
- value
- Typenumber Defaultrequired
- currency
- Typestring (ISO 4217) Default"USD"
- locale
- Typestring Default"en-US"
- decimals
- Typenumber Default2
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCurrencyTextPercentText
Ratio to percent. The input is the fraction (0.42 becomes 42%) because that is what Intl's percent style expects; decimals default to zero for the clean read.
- value
- Typenumber (fraction) Defaultrequired
- decimals
- Typenumber Default0
- locale
- Typestring Default"en-US"
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherPercentTextFileSizeText
Bytes to human units, 1024-based the way disk tools actually count. Sub-KB sizes stay whole numbers, signs survive.
- bytes
- Typenumber Default0
- decimals
- Typenumber (≥ 1KB) Default1
- locale
- Typestring Default"en-US"
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherFileSizeTextDurationText
Milliseconds to a smart human duration: precision drops as magnitude grows. No zero-padding, no clutter.
- ms
- Typenumber Default0
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherDurationTextRelativeTime
<time> in the relative register: Intl.RelativeTimeFormat picks the largest sane unit and numeric: "auto" turns zero into "now". It re-ticks on an interval so a live list stays honest; pass now to freeze the clock.
- date
- TypeDate | string | number Defaultrequired
- locale
- Typestring Default"en-US"
- auto
- Typeboolean (re-tick) Defaulttrue
- now
- Typenumber (frozen clock) DefaultDate.now()
- updateInterval
- Typenumber (ms) Default30000
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherRelativeTimeDateTimeText
Date to localized text with the medium-date + short-time register by default; any Intl.DateTimeFormatOptions shape overrides it (bring timeZone in the options for deterministic rendering). An unparseable date renders an em dash: visible, not silent.
- date
- TypeDate | string | number Default""
- locale
- Typestring Default"en-US"
- options
- TypeIntl.DateTimeFormatOptions Defaultmedium date + short time
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherDateTimeTextPluralText
Intl.PluralRules as a prop switch: the plural category picks the prop, children is the fallback, and every one receives count. Richer plural languages just get more named props. No conditionals in the caller.
- count
- Typenumber Default0
- locale
- Typestring (BCP 47) Default"en"
- class
- Typestring Defaultnone
- zero / one / two / few / many / other / children
- Type({ count }) => JSX.Element, named by category: one, few, many… + children Defaultchildren
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherPluralTextEmoji
An emoji as an image with a real accessible name: role="img" + aria-label gives screen readers one predictable announcement instead of whatever the glyph's unicode name happens to be. Pass the character, pass what it means here.
- char
- Typestring (unicode) Default"✨"
- label
- Typestring (aria) Default""
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherEmoji