Skip to content

Commit 379d2a8

Browse files
committed
docs: add no truncation information on breadcrumb
1 parent 70a6483 commit 379d2a8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

site/src/content/docs/components/breadcrumb.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Use an ordered or unordered list with linked list items to create a minimally st
6060

6161
## Layout
6262

63+
### Breakpoints behavior
64+
6365
Breadcrumb will never wrap, the number of displayed items depends on the available width, the final two items will always be shown.
6466

6567
<Callout type="danger">
@@ -83,3 +85,17 @@ Breadcrumb will never wrap, the number of displayed items depends on the availab
8385
<li class="breadcrumb-item active" aria-current="page"><span title="Very long page to show off responsiveness behavior">Very long page to show off responsiveness behavior</span></li>
8486
</ol>
8587
</nav>`} />
88+
89+
### Avoiding truncation
90+
91+
To prevent a specific item from being truncated, add `.flex-shrink-0` on the `<li>`. The penultimate item has this option set by default so it's not useful to add it. Be aware that adding this utility to all items would result in an overflow. The items will still be hidden on smaller screens.
92+
93+
<Example code={`<nav aria-label="very large breadcrumb with no truncation on some items">
94+
<ol class="breadcrumb">
95+
<li class="breadcrumb-item flex-shrink-0"><a href="#" title="Home">Home</a></li>
96+
<li class="breadcrumb-item flex-shrink-0"><a href="#" title="Very long subcategory to test responsive">Very long subcategory to test responsive</a></li>
97+
<li class="breadcrumb-item"><a href="#" title="Very long subcategory to test responsive 1">Very long subcategory to test responsive 1</a></li>
98+
<li class="breadcrumb-item"><a href="#" title="Very long subcategory to test responsive A">Very long subcategory to test responsive A</a></li>
99+
<li class="breadcrumb-item active" aria-current="page"><span title="Very long page to show off responsiveness behavior">Very long page to show off responsiveness behavior</span></li>
100+
</ol>
101+
</nav>`} />

0 commit comments

Comments
 (0)