docs(segment): clarify usage of scrollable segments (#20765)

resolves #20692
This commit is contained in:
Liam DeBeasi
2020-03-16 09:51:13 -04:00
committed by GitHub
parent 2982c95993
commit cfc6773cb9

View File

@ -4,6 +4,9 @@ Segments display a group of related buttons, sometimes known as segmented contro
Their functionality is similar to tabs, where selecting one will deselect all others. Segments are useful for toggling between different views inside of the content. Tabs should be used instead of a segment when clicking on a control should navigate between pages.
### Scrollable Segments
Segments are not scrollable by default. Each segment button has a fixed width, and the width is determined by dividing the number of segment buttons by the screen width. This ensures that each segment button can be displayed on the screen without having to scroll. As a result, some segment buttons with longer labels may get cut off. To avoid this we recommend either using a shorter label or switching to a scrollable segment by setting the `scrollable` property to `true`. This will cause the segment to scroll horizontally, but will allow each segment button to have a variable width.
<!-- Auto Generated Below -->