Skip to content

Commit 4e2bd9a

Browse files
docs(TabStrip): add adaptive tabstrip docs (#2723)
* docs(TabStrip): add adaptive tabstrip docs * Update components/tabstrip/sizing.md Co-authored-by: Iva Stefanova Koevska-Atanasova <koevska@progress.com> * Update components/tabstrip/sizing.md Co-authored-by: Iva Stefanova Koevska-Atanasova <koevska@progress.com> * Update components/tabstrip/overview.md Co-authored-by: Iva Stefanova Koevska-Atanasova <koevska@progress.com> * Update components/tabstrip/overview.md Co-authored-by: Iva Stefanova Koevska-Atanasova <koevska@progress.com> * docs(TabStrip): apply recommendations * docs(TabStrip): polish articles based on recommendations --------- Co-authored-by: Iva Stefanova Koevska-Atanasova <koevska@progress.com>
1 parent 7ba2f9d commit 4e2bd9a

File tree

3 files changed

+95
-1
lines changed

3 files changed

+95
-1
lines changed

components/tabstrip/overview.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ The Blazor TabStrip component allows you to control the position of the tabs. [R
5252

5353
The Blazor TabStrip component allows you to control the alignment of the tabs. [Read more about the Tabs Alignment...](slug://tabstrip-tabs-alignment)
5454

55+
## Tab Size
56+
57+
The Blazor TabStrip component allow you to set different size of the tabs and scroll buttons. [Read more about the TabStrip Sizing...](slug://tabstrip-tabs-size)
58+
5559
## Persist Content
5660

5761
The Blazor TabStrip component can persist the content of the tabs. When the user navigates between the tabs, their content will be hidden with CSS only to avoid re-initialization. [Read more about the Persist Content...](slug://tabstrip-persist-content)
@@ -75,6 +79,9 @@ The TabStrip provides the following features to allow further customization of i
7579
| `ActiveTabIndex` | `int` | The index of the currently shown tab. Supports two-way binding.
7680
|`PersistTabContent` | `bool` | Whether to remove the content of inactive tabs from the DOM (if `false`), or just hide it with CSS (if `true`). See [Persist Content](slug://tabstrip-persist-content)
7781
| `Scrollable` | `bool` | Whether the tabs will be scrollable. See [Scrollable Tabs](slug://tabstrip-scroll-tabs)
82+
| `ScrollButtonsPosition` | `TabStripScrollButtonsPosition` enum <br/> (`TabStripScrollButtonsPosition.Split`)| Specifies the position of the buttons when the TabStrip is scrollable.
83+
| `ScrollButtonsVisibility` | `TabStripScrollButtonsVisibility` enum <br/> (`TabStripScrollButtonsVisibility.Visible`)| Specifies the visibility of the buttons when the TabStrip is scrollable.
84+
| `Size` | `string` <br/> (`ThemeConstants.TabStrip.Size.Medium`)| Controls the size of the tabs.
7885
| `TabPosition` | `TabPosition` enum <br/> (`TabPosition.Top`)| Controls the position of the tabs.
7986
| `TabAlignment` | `TabStripTabAlignment` enum <br/> (`TabStripTabAlignment.Start`)| Controls the alignment of the tabs.
8087

components/tabstrip/scrollable-tabs.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,58 @@ To scroll the tabs only, set the `Scrollable` bool parameter of the TabStrip to
4545
</TelerikTabStrip>
4646
````
4747

48+
## Scroll Buttons Visibility
49+
50+
You can configure the TabStrip to show scroll buttons on both ends of the tab list. To customize this behavior, use the `ScrollButtonsVisibility` parameter of the TabStrip. This option accepts the following values of type `TabStripScrollButtonsVisibility`:
51+
52+
* `Visible` (default) - The scroll buttons will be constantly visible. If the tabs fit inside the TabStrip boundaries, the buttons will be disabled.
53+
* `Auto` - The scroll buttons will be automatically shown if the tabs do not fit inside the TabStrip boundaries.
54+
* `Hidden` - The scroll buttons won't be displayed.
55+
56+
The following example demonstrates this option in action.
57+
58+
````RAZOR
59+
<TelerikTabStrip Scrollable="true"
60+
ScrollButtonsVisibility="@TabStripScrollButtonsVisibility.Auto"
61+
Width="100%">
62+
<TabStripTab Title="First">
63+
First tab content.
64+
</TabStripTab>
65+
<TabStripTab Title="Second">
66+
Second tab content.
67+
</TabStripTab>
68+
<TabStripTab Title="Third">
69+
Third tab content.
70+
</TabStripTab>
71+
</TelerikTabStrip>
72+
````
73+
74+
## Scroll Buttons Position
75+
76+
By default, the TabStrip renders its scroll buttons on both ends of the tab list. To customize the position of the scroll buttons, use the `ScrollButtonsPosition` parameter of the TabStrip. This option accepts the following values of type `TabStripScrollButtonsPosition`:
77+
78+
* `Split` (default) — The scroll buttons will be rendered on both sides of the tab list.
79+
* `Start` — The scroll buttons will be rendered before the tab list.
80+
* `End` — The scroll buttons will be rendered after the tab list.
81+
82+
The following example demonstrates this option in action.
83+
84+
````RAZOR
85+
<TelerikTabStrip Scrollable="true"
86+
ScrollButtonsVisibility="@TabStripScrollButtonsPosition.Start">
87+
<TabStripTab Title="First">
88+
First tab content.
89+
</TabStripTab>
90+
<TabStripTab Title="Second">
91+
Second tab content.
92+
</TabStripTab>
93+
<TabStripTab Title="Third">
94+
Third tab content.
95+
</TabStripTab>
96+
</TelerikTabStrip>
97+
````
98+
4899
## See Also
49100

50-
* [Live Demo: TabStrip - Persist Tab Content](https://demos.telerik.com/blazor-ui/tabstrip/persist-content)
101+
* [Live Demo: TabStrip - Persist Tab Content](https://demos.telerik.com/blazor-ui/tabstrip/persist-content)
102+
* [Live Demo: TabStrip - Scrollable Tabs](https://demos.telerik.com/blazor-ui/tabstrip/scrollable-tabs)

components/tabstrip/sizing.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Tabs Size
3+
page_title: TabStrip Tabs Size
4+
description: The Size parameter in the TabStrip component allows you to control the size of the tabs. By default, tabs size is medium.
5+
slug: tabstrip-tabs-size
6+
tags: telerik,blazor,tab,strip,tabstrip,size
7+
published: True
8+
position: 16
9+
---
10+
11+
# TabStrip Tabs Size
12+
13+
By design, the tabs are displayed in medium size.
14+
15+
You can customize the size of the TabStrip tabs using the `Size` parameter. It is recommended to use predefined constants from the `ThemeConstants.TabStrip.Size` static class. The available options are:
16+
17+
* `small` — Reduces the default padding of the TabStrip tabs. This size is useful when you want to fit more tabs in a limited space.
18+
* `medium` (default) — Represents the default padding of the TabStrip tabs.
19+
* `large` — Increases the default padding of the TabStrip tabs. This size is useful when you want to provide larger elements for easier end-user interaction.
20+
21+
>caption Set the desired tab size.
22+
23+
````RAZOR
24+
<TelerikTabStrip Size="@ThemeConstants.TabStrip.Size.Large">
25+
<TabStripTab Title="First">
26+
First tab content.
27+
</TabStripTab>
28+
<TabStripTab Title="Second">
29+
Second tab content.
30+
</TabStripTab>
31+
<TabStripTab Title="Third">
32+
Third tab content.
33+
</TabStripTab>
34+
</TelerikTabStrip>
35+
````

0 commit comments

Comments
 (0)