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
- chart
- table
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.
| Instance | Icon | aria-hidden | role | aria-label | aria-labelledby | data-icon-p3 | ids 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
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
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
text-2xsSample text for the type scaletext-xsSample text for the type scaletext-smSample text for the type scaletext-baseSample text for the type scaletext-lgSample text for the type scaletext-title-mdSample text for the type scaletext-xlSample text for the type scaletext-2xlSample text for the type scaletext-3xlSample text for the type scale
Spacing
One spacing unit is 0.25rem.
1 unit2 units3 units4 units6 units8 units12 units
Radii
rounded-2xsrounded-xsrounded-smrounded-mdrounded-lgrounded-xlrounded-2xlrounded-3xlrounded-4xlrounded-full
Shadows
shadow-xsshadow-smshadow-mdshadow-lgshadow-xlshadow-2xl
Motion
Hover or focus a row to run its duration. Rows stay still when reduced motion is requested.