Back to gallery

Foundations

Platform provider

PlatformProvider hands a link component, a widget setting, a portal container and a hydration flag to everything below it. Without a provider the context is null and consumers use the defaults.

Context value
set by the provider
linkComponent
ExampleLink
widgets
[chart, table]
hydrationSafe
true
radixPortalContainer
undefined
Widgets allowed:
  • chart
  • table
Link through the providerPopup: closed
Provider portal container (radixPortalContainer). With custom values the popover is rendered inside this box in the page structure, and the border turns solid while it holds an open popover. The popover still positions itself next to its button.

Icons

Each row is a live icon instance. The columns are read from the rendered svg: an icon is hidden from assistive technology until it has a label, and a multicolor icon carries data-icon-p3 and gives every instance its own gradient and clip path ids.

InstanceIconaria-hiddenrolearia-labelaria-labelledbydata-icon-p3ids inside the svg
Decorative
aria-label
aria-labelledby
Role overridden
aria-hidden overridden
Multicolor, first
Multicolor, second
Multicolor, third (not displayed)
Multicolor, recolored by variables

The third multicolor instance is not displayed. The first two still paint their gradient because no id is shared with it. Every id in the last column is different.

Reduced motion

hasReducedMotion follows the system setting. The button below asks motionDuration for a 600 ms move, and gets 0 ms when motion is reduced.

hasReducedMotion():
yes
Duration used by the last run:
not run yet

Dark mode

readDarkAppearance follows the system color scheme. The override setter replaces it until you pick System again. The panel takes its colors from the value, not from the page theme.

readDarkAppearance():
no
Observer calls:
0, last none

Right to left

prefersRightToLeft looks at the language of the first locale only. Pick an example list or type your own, separated by commas. Device uses the browser language list.

Device locales:
none
Locales checked:
none
prefersRightToLeft():
no
This row follows the direction prefersRightToLeft reports.dir=ltr

Clipboard

copyToClipboard reports nothing, so paste into the box at the bottom to see what landed. writeTextToClipboard waits and tells you the result. Where the page has no async clipboard API, copyToClipboard uses a hidden textarea and the copy command.

navigator.clipboard.writeText: checking

Nothing copied yet.

Viewport and insets

Resize the window or change the zoom to see the size and scale update. Insets are read from env(safe-area-inset-*) and stay 0 on a screen without a notch or rounded corners.

Measuring...

Color

Values are generated from the default desktop theme settings. Each swatch paints the CSS variable the library ships, next to the value the generator returns.

Light colors

  • surface-surface#ffffff
  • surface-surface-under#f6f6f6
  • surface-editor-opaquergb(255, 255, 255)
  • surface-elevated-primary-opaquergb(255, 255, 255)
  • surface-controlrgba(255, 255, 255, 0.96)
  • ink#1a1c1f
  • ink-secondaryrgba(26, 28, 31, 0.695)
  • ink-tertiaryrgba(26, 28, 31, 0.495)
  • borderrgba(26, 28, 31, 0.078)
  • border-heavyrgba(26, 28, 31, 0.117)
  • border-focus#2f8fff
  • label-accent#2f8fff
  • surface-accent#e4f1ff
  • surface-button-secondaryrgba(26, 28, 31, 0.049)
  • decoration-added#00a04a
  • decoration-deleted#b32420
  • accent-purple#8f4ff2

Tailwind roles

  • background
  • card
  • popover
  • primary
  • secondary
  • muted
  • accent
  • surface
  • surface-secondary
  • surface-elevated

Dark colors

  • surface-surface#181818
  • surface-surface-under#141414
  • surface-editor-opaquergb(40, 40, 40)
  • surface-elevated-primary-opaquergb(54, 54, 54)
  • surface-controlrgba(45, 45, 45, 0.96)
  • ink#dfdfdf
  • ink-secondaryrgba(255, 255, 255, 0.71)
  • ink-tertiaryrgba(255, 255, 255, 0.498)
  • borderrgba(255, 255, 255, 0.084)
  • border-heavyrgba(255, 255, 255, 0.156)
  • border-focusrgba(128, 187, 255, 0.76)
  • label-accentrgb(128, 187, 255)
  • surface-accent#0c233f
  • surface-button-secondaryrgba(255, 255, 255, 0.052)
  • decoration-added#4cc38a
  • decoration-deleted#e5484d
  • accent-purple#b794f6

Tailwind roles

  • background
  • card
  • popover
  • primary
  • secondary
  • muted
  • accent
  • surface
  • surface-secondary
  • surface-elevated

Type scale

Spacing

One spacing unit is 0.25rem.

Radii

Shadows

Motion

Hover or focus a row to run its duration. Rows stay still when reduced motion is requested.