Start from intent
Choose sizing values in this order: component attribute, component-based semantic token, global semantic token, primitive token. Do not start from raw pixels in component CSS.
Primitive size tokens encode pixel-equivalent values as rem variables. They are the source scale for semantic sizing tokens and dimension decisions such as width, height, min-width, max-width, min-height and max-height.
The fixed reference scale used to build semantic tokens and width/height decisions across the system.
--size-000px--size-10.0625rem1px--size-20.125rem2px--size-40.25rem4px--size-60.375rem6px--size-80.5rem8px--size-120.75rem12px--size-161rem16px--size-181.125rem18px--size-201.25rem20px--size-241.5rem24px--size-322rem32px--size-402.5rem40px--size-483rem48px--size-563.5rem56px--size-644rem64px--size-724.5rem72px--size-805rem80px--size-966rem96px--size-1127rem112px--size-1288rem128px--size-16010rem160px--size-19212rem192px--size-25616rem256px--size-32020rem320pxSemantic sizing tokens translate primitive values into intent. Each group separates global size-based tokens from component-based contracts when a repeated use case needs a stable name.
Inner spacing inside cards, panels, controls and composed components. Padding tokens describe space inside an element, not distance between children or external margins.
--component-padding-noneAgentic RuleUse when a component surface must remove internal padding completely.00px--component-padding-tinyAgentic RuleUse for very compact internal padding in tiny UI parts such as small labels or metadata controls.0.25rem4px--component-padding-xsmallAgentic RuleUse for compact internal padding when tiny is too tight but the component should still feel dense.0.5rem8px--component-padding-smallAgentic RuleUse for small component interiors such as compact cards, table cells or secondary controls.0.75rem12px--component-padding-mediumAgentic RuleUse as the default inner padding for reusable cards, panels and composed UI blocks.clamp(1rem, 0.8571rem + 0.7143vw, 1.5rem)16-24px--component-padding-largeAgentic RuleUse for prominent component surfaces that need more internal breathing room.clamp(1.5rem, 1.2143rem + 1.4286vw, 2.5rem)24-40px--component-padding-xlargeAgentic RuleUse for large editorial or dashboard surfaces where the component itself defines a major content zone.clamp(2rem, 1.4286rem + 2.8571vw, 3.5rem)32-56pxVertical padding inside page sections and major content zones. These tokens define section rhythm without acting as child gaps or component margins.
--section-padding-smallclamp(2rem, 1.7143rem + 1.4286vw, 3rem)32-48px--section-padding-mediumclamp(3rem, 2.1429rem + 4.2857vw, 6rem)48-96px--section-padding-largeclamp(4rem, 3.1429rem + 3.5714vw, 7rem)64-112px--section-padding-hero-topclamp(4.5rem, 2.9286rem + 7.8571vw, 10rem)72-160pxGap tokens define distance between children on a flex, grid or inline parent. Global gaps describe size only; component-based gaps cover repeated groups such as buttons, tags and form fields.
Use global gap tokens when the spacing decision is only about size and is not dedicated to one component or use case.
--gap-none00px--gap-tiny0.25rem4px--gap-small0.5rem8px--gap-regular0.75rem12px--gap-medium1rem16px--gap-largeclamp(1.5rem, 1.3571rem + 0.7143vw, 2rem)24-32px--gap-xlarge3rem48px--gap-huge5rem80pxUse component-based gap tokens for repeated parent-child group patterns that need one shared contract across the system.
--gap-button-groupAgentic RuleUse on a flex or grid parent that groups multiple buttons or actions.var(--gap-regular)12px--gap-tag-groupAgentic RuleUse on a wrapping parent that displays a set of tags, chips or compact labels.var(--gap-small)8px--gap-form-groupAgentic RuleUse on a form or fieldset parent to separate stacked form fields.var(--gap-medium)16px--gap-input-groupAgentic RuleUse on a parent that groups related inputs or an input with an attached control.var(--gap-regular)12pxSpace tokens define margin and block flow between elements. Global spaces describe reusable margin sizes; component-based spaces cover critical repeated relationships such as eyebrow-to-heading or section-header-to-content.
Use global space tokens for margins and vertical flow when the spacing decision is only about size.
--space-none00px--space-tiny0.25rem4px--space-small0.5rem8px--space-regular0.75rem12px--space-medium1.5rem24px--space-large2rem32px--space-xlarge3rem48px--space-huge4.5rem72pxUse component-based space tokens for repeated margin relationships that need exact shared control.
--space-eyebrow-bottomAgentic RuleUse as margin-bottom on an eyebrow when it sits above a heading.var(--space-medium)24px--space-heading-contentAgentic RuleUse as margin-top or margin-bottom between a heading and its supporting content.var(--space-regular)12px--space-section-header-bottomAgentic RuleUse as margin-bottom after a section header before the section content starts.var(--space-xlarge)48px--space-media-contentAgentic RuleUse as margin between a media element and the text or controls that describe it.var(--space-medium)24pxRadius tokens describe surface shape. Global radius tokens describe generic corner sizes; component-based radius tokens lock repeated UI surfaces to one shared shape contract.
Use global radius tokens when the decision is only about corner size and is not dedicated to one component.
--radius-none00px--radius-sharp00px--radius-small0.25rem4px--radius-medium0.5rem8px--radius-large1rem16px--radius-xlarge1.5rem24px--radius-xxlarge2rem32px--radius-full999remfullUse component-based radius tokens for repeated component surfaces that need one shared shape rule.
--radius-buttonAgentic RuleUse for button surfaces so all button variants share one corner contract.var(--radius-none)0px--radius-inputAgentic RuleUse for text inputs, textareas and form controls that accept user input.var(--radius-small)4px--radius-tabAgentic RuleUse for tab-like controls that switch views or states inside one interface area.var(--radius-small)4px--radius-tagAgentic RuleUse for tags, chips and compact classification labels.var(--radius-none)0px--radius-labelAgentic RuleUse for standalone label surfaces when a label needs a visible container.var(--radius-none)0pxBorder-width tokens describe stroke thickness. Use default for standard dividers and strong only for deliberate emphasis or focus treatments.
--border-width-default0.0625rem1px--border-width-strong0.125rem2pxSize attributes are the component sizing API. They connect semantic variables to repeatable component geometry through stable attributes such as data-component-size.
Buttons, tags, inputs, tabs and labels should use the same size profiles where possible. The attribute maps profile tokens onto internal aliases such as --component-padding-inline, while this table documents the public attribute, source token and final values.
data-component-size="tiny"--component-size-tiny-min-height--component-size-tiny-padding-inline--component-size-tiny-padding-block--component-size-tiny-icon-size--component-size-tiny-gap--component-size-tiny-font-size--component-size-tiny-line-heightdata-component-size="small"--component-size-small-min-height--component-size-small-padding-inline--component-size-small-padding-block--component-size-small-icon-size--component-size-small-gap--component-size-small-font-size--component-size-small-line-heightdata-component-size="medium"--component-size-medium-min-height--component-size-medium-padding-inline--component-size-medium-padding-block--component-size-medium-icon-size--component-size-medium-gap--component-size-medium-font-size--component-size-medium-line-heightdata-component-size="large"--component-size-large-min-height--component-size-large-padding-inline--component-size-large-padding-block--component-size-large-icon-size--component-size-large-gap--component-size-large-font-size--component-size-large-line-heightRules for future agents and contributors working with sizing tokens, styles and documentation.
Default decision order for choosing or changing size values.
Choose sizing values in this order: component attribute, component-based semantic token, global semantic token, primitive token. Do not start from raw pixels in component CSS.
Primitive size tokens are the fixed rem scale. Use them to define the system, not as the default API for components or page layouts.
Use global semantic tokens when the name describes size only. Create component-based tokens only for repeated use cases that need one shared contract.
Use padding for internal space, gap for distance between children, and space tokens for margins or vertical relationships between separate elements.
Buttons, tags, inputs, tabs and labels should use data-component-size profiles before adding one-off sizing classes or local component overrides.
Use component-based radius tokens for repeated surfaces such as buttons, inputs, tabs, tags and labels. Use global radius tokens only when the surface is not component-specific.
Every component-based sizing token with a specific use case should include an Agentic Rule tooltip or matching Agentic Rule card so future agents know when to use it.
Sizing documentation tables should use the shared Design System table atoms and spacing blocks. Do not create local table layouts for new sizing sections.
When a size rule affects multiple pages or components, update the token or master documentation component before adding local page CSS.