Size

Size refers to the restricted dimensions provided within the design system, such as an element's height and/or width.

TokenDimensionHigh Density (HD)Medium Density (MD)Low Density (LD)Touch Density (TD)
--salt-size-baseHeight20px28px36px44px
--salt-size-selectableHeight and width12px14px16px18px
--salt-size-iconHeight and width12px12px14px16px
--salt-size-adornmentHeight and width6px8px10px12px
--salt-size-barHeight or width2px4px6px8px
--salt-size-indicatorHeight or width1px2px3px4px
--salt-size-borderHeight or width1px1px1px1px

salt-size-base is the fixed default height for base components in each density within the design system. It ensures the consistent alignment of components in horizontal layouts, as well as the vertical alignments of the text values within them. This means the text within each component sits on the same baseline.

Using size-base, in conjunction with a spacing token above and below, creates a consistent height for components that can nest a --salt-size-base component within them. This provides further standardized heights across the design system.

The following example shows how components can use --salt-size-base and --salt-spacing-50 (top and bottom) to define the height of a component or stackable element, such as a Data Grid row. The height allows a size-base component to be contained within it, but it is not dependent on the component to force the height.

--salt-size-selectable is used to set the dimensions of selectable components, including Radio Button, Checkbox, and Switch.

--salt-size-icon controls the size of all icons throughout the design system. Icons are designed to be displayed no smaller than 12px x 12px; therefore this is set as a minimum measurement within the token's values.

You can find out more about icons in the iconography foundation.

The purpose of --salt-size-adornment is to set the size of a discrete element within an editable field or cell intended to indicate a state, such as an error or warning.

Bar is used to control the thickness of an accent bar, either in vertical or horizontal orientations.

--salt-size-indicator controls the thickness of an indicator, like on Tabs or Navigation Item.

Unlike other sizes, --salt-size-border is a fixed dimension regardless of density. It controls the size of all borders and separators across the design system.

We appreciate your thoughts and feedback on any content in the Salt foundations. Please contact us if you have any comments or questions.