You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/components/breadcrumb.mdx
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,8 @@ Use an ordered or unordered list with linked list items to create a minimally st
60
60
61
61
## Layout
62
62
63
+
### Breakpoints behavior
64
+
63
65
Breadcrumb will never wrap, the number of displayed items depends on the available width, the final two items will always be shown.
64
66
65
67
<Callouttype="danger">
@@ -83,3 +85,17 @@ Breadcrumb will never wrap, the number of displayed items depends on the availab
83
85
<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>
84
86
</ol>
85
87
</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
+
<Examplecode={`<nav aria-label="very large breadcrumb with no truncation on some items">
<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>
0 commit comments