Highlights
- Icons and tags in a TableOfContents item, or an icon before a Link's text, now sit beside the text. They get a gap, keep their size, and line up with the first line of a label that wraps.
- ToggleButton icons keep their size when a long label wraps.
Bug Fixes
- link: space and align icons in the default slot by @metonym in #5757
- table-of-contents: line up slotted icons and tags with the text by @metonym in #5755
- toggle-button-group: keep the icon its size when the label wraps by @metonym in #5757
TableOfContents
A TableOfContentsItem's default slot now renders in its own row inside the link. Icons and tags sit 8px from the text, keep their size, and line up with the first line of a label that wraps. Rows without slotted content keep their height. The docs add examples of status tags and of a progress outline with a leading icon on every item.
<TableOfContentsItem href="#theme">
Theme <Tag size="sm" type="blue">New</Tag>
</TableOfContentsItem>Link
The icon prop puts an icon after the text. An icon placed before the text in the default slot touched the text, shrank when the text wrapped, and lifted the link off the line's baseline. Items in a link are now spaced with a gap: 4px, or 8px for lg, the same as the built-in icon. A slotted icon keeps its size and centers on the first line. The gap replaces the built-in icon's margin-left, so its spacing now flips in right-to-left pages too.
<Link href="/reports/q3-usage.pdf">
<DocumentPdf />
Q3 usage report
</Link>Anything else in a Link's slot that renders as separate elements now sits 4px apart. Before, the space between them collapsed, so Read <strong>more</strong> rendered as "Readmore".
ToggleButton
In a narrow segment, a long label wrapped and squeezed the icon to about 6px. The icon now keeps its size, whether it comes from the icon prop or slot.
Full Changelog: v0.114.5...v0.114.6