Badge
Tones
NeutralInfoPositiveCautionCriticalPromote
<Inline space="small"> <Badge tone="neutral">Neutral</Badge> <Badge tone="info">Info</Badge> <Badge tone="positive">Positive</Badge> <Badge tone="caution">Caution</Badge> <Badge tone="critical">Critical</Badge> <Badge tone="promote">Promote</Badge></Inline>Without vertical bleed
AvoidWithout "bleedY", the badge's vertical padding adds to the line height, causing uneven spacing between lines.
A line of text for comparison.
This line contains New and has uneven spacing.
A line of text for comparison.
<Stack space="x-small"> <Text element="p" size="small"> A line of text for comparison. </Text> <Text element="p" size="small"> This line contains <Badge tone="info">New</Badge> and has uneven spacing. </Text> <Text element="p" size="small"> A line of text for comparison. </Text></Stack>With vertical bleed
The "bleedY" prop cancels the badge's vertical padding contribution to line height, keeping surrounding line spacing consistent.
A line of text for comparison.
This line contains Fixed and spacing is unchanged.
A line of text for comparison.
<Stack space="x-small"> <Text element="p" size="small"> A line of text for comparison. </Text> <Text element="p" size="small"> This line contains{' '} <Badge tone="positive" bleedY> Fixed </Badge>{' '} and spacing is unchanged. </Text> <Text element="p" size="small"> A line of text for comparison. </Text></Stack>