Type Alias: IconSize
IconSize =
"text"|"sm"|"md"|"lg"
Defined in: components/Icon/Icon.tsx:45
Icon size step. Maps directly to vars.sizing.icon.* — the sizing scale
icon-system.md defines as the Icon contract. This is not the density
size prop CONTRACT.md §4 bans (that rule governs interactive hit
targets): a glyph legitimately scales with the context it reinforces.
Pick text whenever the glyph sits on the same line as text (a button's
leading icon, a picker's chevron beside its value): it resolves to the
accompanying text's own size, which lands the drawn ink exactly inside the
cap-height band — cap line to baseline, no overshoot. A fixed step is
measurably off there: at sm beside 16px text the ink overhangs the
baseline by 0.8px, which reads as a sunken icon. Use sm/md/lg for
standalone glyphs, where there is no baseline to answer to.