IconText
IconText is an inert glyph-and-copy pair: an icon beside a line of text, aligned and spaced by tokens. It has no
state and no interaction. Typography and color props set on the pair apply to both parts.Typography & Media
When to use
Usage
Updated 2 min agoTwo-factor enabledSettings
<IconText icon={<Icon icon={clock} />} text="Updated 2 min ago" color="ink.secondary" fontSize="micro" />
<IconText icon={<Icon icon={check} />} text="Two-factor enabled" color="success" />
<IconText icon={<Icon icon={cog} />} iconPosition="right" text="Settings" />The icon follows currentColor and 1em, so color and fontSize on the pair size and paint both parts. Give the
Icon its own color when only the glyph should differ. The pair renders a span with gap="xs" by default.
Alignment
align="center" (default) suits single-line rows. Use align="baseline" when the copy may wrap or the icon and text
sizes differ.
Baseline-aligned headline
Lists
- Feature one
- Feature two
<Flex as="ul" gap="micro">
<IconText as="li" icon={<Icon icon={check} color="success" />} text="Feature one" />
</Flex>Accessibility
- The copy carries the meaning; mark a purely decorative glyph with
aria-hidden="true"on theIcon. - When the icon changes the meaning (a check for "done"), say it in the copy, not only in the glyph or its color.
Properties
Name
Type
Default
Description
align"center""baseline"'center'Cross-axis alignment of icon and copy. `center` for single-line rows;
`baseline` when the copy may wrap or the sizes differ.
alignContent"center""start""end""between""around""evenly""stretch"nonePacking of wrapped lines / grid tracks on the block axis.
asElementType<any, keyof IntrinsicElements>'span'Tag of the pair. `span` inline by default; `li` for icon bullet lists.
childrenReactNodenoneCopy as nodes.
containmentstringnoneContainment marker for the `cq` channel: emits
`container-type` (+ `container-name` when the string form carries one,
e.g. `'inline-size card'`). Apply on the immediate wrapper of the
adapting component — NEVER on page-level shells.
cqPartial<Record<ContainerSizeTypes, Partial<Omit<Partial<{ area: string; padding: stringnumber; margin: stringnumber; isHidden: boolean; truncate: boolean; lineClamp: number; pageShell: boolean; ... 14 more ...; transform: string; }>, "containment"> & Partial<...> & SizeFactoryProps & Partial<...>>>>noneContainer-relative **layout** styles per `theme.containerSizes` key.
enableBreakpoint"xs""xl""sm""md""lg"noneForces a breakpoint's prop set to apply regardless of viewport (stories/previews).
icon *ReactNodenoneThe glyph — usually an `<Icon>`. Any node works (an `Avatar`, a `Spinner`).
iconPosition"left""right"'left'Side of the icon relative to the copy.
ignoreResponsivebooleannoneFully disables the responsive factory (tests / fixed snapshots).
justifyItems"center""start""end""stretch"noneGrid containers: inline alignment of every item in its cell.
legibility"on-photo"noneReading-shadow preset for text over a photographic background
(`on-photo`). Replaces the inline `style={{ textShadow }}` in the
consumer (brasil_2030 radar, gap A3). Token emission is deferred until a
2nd consumer asks for the raw var (see backlog).
lineClampnumbernoneCaps the text at this many lines and ends the cut with an ellipsis.
The full string stays in the DOM.
pageShellbooleannoneCenters the element and caps the width at `theme.layout.pageMaxWidth`.
The page shell of a classic centered layout.
placeItems"center""start""end""stretch"noneGrid containers: `place-items` shorthand (block + inline).
readablenumberbooleannoneMakes the `color` legible against the page surface: `true` = WCAG AA
(4.5), a number sets a custom floor. Ignored with `contrast`.
See the Layout Props concept page for the full semantics.
textstringnoneCopy as a string. Alternative to `children`; `children` wins when both are set.
transformstringnoneCSS `transform` value (e.g. `translate(-50%, -33px)`). Never leaks
to the DOM as an attribute.
viewportMediasPartial<Record<keyof BreakPoint<any>, Partial<Omit<Partial<{ area: string; padding: stringnumber; margin: stringnumber; isHidden: boolean; truncate: boolean; lineClamp: number; pageShell: boolean; ... 14 more ...; transform: string; }>, "containment"> & Partial<...> & SizeFactoryProps & Partial<...>>>>undef...noneViewport-driven **layout** styles per `theme.breakpoints` key.