Skip to content

feat: 🎸 give the components their own layout defaults - #307

Merged
SlDo merged 1 commit into
mainfrom
feat/component-layout-defaults
Nov 15, 2026
Merged

SlDo merged 1 commit into
mainfrom
feat/component-layout-defaults

Conversation

@SlDo

@SlDo SlDo commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Components get their own layout defaults, so the workarounds the docs examples needed (display: flex on a checkbox, margins on a legend, gaps on a pagination) are gone. One new token, --br-ratio, sets the roundness of every control at once.

Breaking changes

  • Roundness token. New --br-ratio in @vega-ui/tokens-core (default 0.333, the old value). Button, IconButton, the fields, TextArea, PinField, Checkbox, Option, Select, SegmentedControl, GridItem and Badge read their --*-br-ratio from it, and Code takes its radius from its line height. Update @vega-ui/tokens-core together with @vega-ui/react.
  • Badge radius variable. --badge-border-radius-ratio is renamed to --badge-br-ratio, like on the other components.
  • FieldsetLegend. Uses the Label text size (1rem) instead of 1.25rem
  • Fieldset. The browser margin is reset; a transparent Fieldset puts var(--spacing-6) under its legend.
  • TextArea. One row is 36 / 42 / 48px for sm / md / lg, like TeonButton of the same size (was 42 / 48 / 54px).
  • Table. The default dataAlign="between" aligns the middle columns to the start instead of centering them.
  • Pagination. No browser margin or padding on the list, a var(--spaci(--spacing-6), and PaginationTriggerIconButton is transparent like thepage items.
  • Checkbox. The root is an inline-flex row with centered items and aCheckboxIndicator` does not shrink.
  • SegmentedControl. Segments share the width equally and shrink in a narrow container instead of overflowing it.
  • MeterStack. The root has role="group"; name it with aria-label o

Fixes

  • Calendar is as wide as one month in a flex row or a shrink-to-fit contais scrolled pages
  • GridItem has inline padding, so month and year labels in the pickers no longer touch
  • A TableHeading in TableHead draws the line under the row itself, so its
  • AvatarFallback font size has no !important, so style can override it
  • Secondary and tertiary text inside a selected Option stays readable on t
  • Code wraps long tokens with overflow-wrap: anywhere
  • Avatar does not shrink in a flex row
  • A disabled SegmentedControl segment uses the disabled label color, like a disabled Option
  • --switch-indicator-transition-delay applies again

Docs

  • Examples drop the inline layout workarounds the new defaults make unnecess
  • Styling pages and styling/tokens.md document --br-ratio
  • Docs site styles and the theme editor follow the new token

Verification

  • Browser tests of @vega-ui/react in Chromium, Firefox and WebKit: 2244 pa
  • lint, check-types, docs:validate, docs:examples:check, docs:api:check, docs:keyboard:check
  • Every example of Checkbox, Fieldset, Badge, Pagination, Table, TextArea, Stack checked by screenshots in the light and dark themes

@SlDo
SlDo merged commit 1c3a639 into main Nov 15, 2026
12 checks passed
@SlDo
SlDo deleted the feat/component-layout-defaults branch November 15, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant