Import
import {
Tabs,
TabsList,
TabsTrigger,
TabsContent
} from '@strongtie/design-system/tabs';
Usage
<Tabs defaultValue="account">
<TabsList>
<TabsTrigger value="account">Account</TabsTrigger>
<TabsTrigger value="password">Password</TabsTrigger>
</TabsList>
<TabsContent value="account">
Make changes to your account here.
</TabsContent>
<TabsContent value="password">
Change your password here.
</TabsContent>
</Tabs>
<Tabs> Props
If true, the component will render as a child of the parent component.
The value of the tab that should be active when initially rendered.
The controlled value of the active tab. Should be used with onValueChange.
Callback that fires when the active tab is changed.
orientation
"horizontal" | "vertical"
The orientation of the tabs.
The direction of the tabs.
The activation mode of the tabs.
<TabsList> Props
If true, the component will render as a child of the parent component.
If true, the tabs will loop when navigating.
<TabsTrigger> Props
If true, the component will render as a child of the parent component.
A unique value that associates the trigger with a content panel.
When true, prevents the user from interacting with the tab.
<TabsContent> Props
If true, the component will render as a child of the parent component.
A unique value that associates the content with a trigger.
Used to force mounting when more control is needed.
Styling Classes
The following CSS classes are applied by the Tabs components:
tabs-list – Tab navigation list container
tabs-trigger – Individual tab trigger/button
tabs-content – Tab content panel
For more examples, visit the Storybook.<StudsTabs>
<Tabs>
<StudsTabsItem Text="Customers">
Customers content
</StudsTabsItem>
<StudsTabsItem Text="Orders">
Orders content
</StudsTabsItem>
<StudsTabsItem Text="Order Details">
Order details content
</StudsTabsItem>
</Tabs>
</StudsTabs>
StudsTabs Parameters
RenderMode
TabRenderMode
default:"TabRenderMode.Server"
Gets or sets the render mode for the tabs. Can be either Server or Client.
Gets or sets the index of the selected tab.
Gets or sets the callback that is invoked when the selected index changes.
Gets or sets the callback that is invoked when a tab selection changes.
Gets or sets the tab items to be displayed.
Attributes
Dictionary<string, object>
Specifies additional custom attributes that will be rendered by the component.
MouseEnter
EventCallback<ElementReference>
Gets or sets the callback that is invoked when the mouse enters an item.
MouseLeave
EventCallback<ElementReference>
Gets or sets the callback that is invoked when the mouse leaves an item.
A callback that will be invoked when the user right-clicks the component. Commonly used to display a context menu.
Culture
CultureInfo
default:"CultureInfo.CurrentCulture"
Gets or sets the culture used to display localizable data (numbers, dates). Set by default to “CultureInfo.CurrentCulture”.
Gets or sets the inline CSS style.
Gets or sets a value indicating whether this “T:Studs.StudsComponent” is visible. Invisible components are not rendered.
StudsTabsItem Parameters
Gets or sets the text content of the tab.
Gets or sets the icon for the tab.
Gets or sets the color of the tab icon.
Gets or sets whether this tab is selected.
Gets or sets whether this tab is disabled.
Gets or sets whether this tab is visible.
Template
RenderFragment<StudsTabsItem>
Gets or sets custom template content for the tab.
Gets or sets the content to be displayed when the tab is selected.
Attributes
IDictionary<string, object>
Gets or sets the arbitrary attributes.
Styling Classes
The following CSS classes are applied by the Tabs components:
tabview – Base tabs container
tabview-nav – Tab navigation list
tabview-panels – Tab content panels container
tabview-panel – Individual tab content panel
For more examples, visit the Storybook.