Upgrading
Var UI is pre-1.0, so a minor version can break things. Every published package ships a CHANGELOG.md (also on the GitHub releases page). All packages share one version number, so read one changelog per release.
TypeScript catches most of the changes below. The ones that compile but behave differently are marked silent. Check those by hand.
0.6 → 0.13
Props: platform names (0.7)
Components use the native DOM vocabulary instead of React Aria’s isX / onPress names.
| Before (0.6) | Now |
|---|---|
isDisabled, isOpen, isReadOnly, isSelected, isIndeterminate, … | disabled, open, readOnly, selected, indeterminate, … (every boolean drops is) |
onPress | onClick |
onChange(value) on inputs | onValueChange(value); onChange is the native DOM event |
Checkbox / Switch isSelected + onChange | checked / defaultChecked + onCheckedChange |
selectedKey(s) / onSelectionChange / Set values | value / defaultValue / onValueChange (string | null, or string[] with multiple) |
minValue / maxValue (NumberInput, Slider, date fields) | min / max |
IconButton name="close" | icon="close". Silent: name is now the native button attribute, so the old code renders no glyph. |
Alert variant | tone |
Button pending, CommandPalette isLoading | loading |
PinInput type | characters |
CollapsibleGroup allowsMultipleExpanded | multiple |
Table hasHover (0.12) | highlightOnHover |
ChatMessageBubble variant (0.12) | appearance |
Appearance: filled is solid (0.10, 0.12)
Button, IconButton and StatusDot use the shared appearance axis subtle | solid | outline | ghost, like Badge, Alert, Chip and Toast. Replace appearance="filled" with appearance="solid". Theme overrides keyed on appearance.filled move to appearance.solid. Plain CSS moves to [data-appearance="solid"].
Overlays: native <dialog> and popover (0.7)
Dialog.Backdrop/Drawer.Backdropare gone. Style the popup’s::backdrop.portalContaineris gone. Overlays render in place, in the top layer.LayerProvider,useLayer,useScrollLockanduseOverlayPresenceare gone. Remove the provider from your app root.placementis logical:top | bottom | start | end, optionally aligned (bottom start).left/rightare gone.SimpleDialog,SimplePopover,SimpleTooltipand the assembledAlertDialog/HoverCard/Drawerpresets are gone. Use the compound parts.Drawer.PanelisDrawer.Popup.- Tooltip
delayisopenDelay(there is alsocloseDelay).
See Overlay lifecycle for the native model.
Tokens
- Space (0.8) uses t-shirt names:
none,xxs,xs,sm,md,lg,xl,xxl,xxxl,xxxxl. Old keys map0→none,1→xxs,2→xs,3→sm,4→md,5→lg,6→xl,8→xxxl,10→xxl,12→xxxxl.7,9,11,16and20are removed. Silent: an old key such asdesignTokens.space[4].vardoesn’t throw. It reads a nested proxy, and TypeStyles reportsInvalid object valuefor the property. shadow.elevationis removed (onexs–xlscale). ThezIndextokensdropdown,toastandmodalare removed (0.7).size.indicatoris per size:size.indicator.box.md,dot.md,trackWidth.md,trackHeight.md(0.10).
Components and exports
Card hrefreplacesClickableCard.Chip onRemovereplacesPill(0.8).Outlineis merged intoToc(0.9).DropdownMenu,ContextMenu,MoreMenuareMenu.FromSections,Menu.ContextMenu,Menu.Overflow.@var-ui/coreexports one TypeStyles instance,typestyles. Writetypestyles.recipe(…),typestyles.style(…)andtypestyles.breakpoint(…). There are no rootrecipe/styleexports.- Astro:
applyThemeBoot,bootThemeandwatchThemeOnNavigationare gone (0.13). UseThemeScript.
Dependencies
@var-ui/reactpeers:react,react-dom,react-aria-componentsand@var-ui/core. The Installation page lists them.
Finding the rest
CHANGELOG.mdinnode_modules/@var-ui/<package>/lists every change per release, breaking ones included.npx @var-ui/cli component <name>prints a component’s current props.