Account
Make changes to your account here. Click save when you are done.
Installation
Install the component
templui add tabsAdd the JavaScript to your layout
@tabs.Script()Call this template in your base layout file (e.g., in the <head> section).
API Reference
Tabs
Root container for the tabs component.
| Name | Type | Default |
|---|---|---|
Unique identifier for the tabs container. Auto-generated if not provided. | | - |
Additional CSS classes to apply to the tabs container. | | - |
Additional HTML attributes to apply to the tabs container. | | - |
List
Container for tab triggers with styled background and indicator.
| Name | Type | Default |
|---|---|---|
Unique identifier for the tab list element. | | - |
Additional CSS classes to apply to the tab list. | | - |
Additional HTML attributes to apply to the tab list element. | | - |
Trigger
Individual tab button that activates corresponding content.
| Name | Type | Default |
|---|---|---|
Unique identifier for the tab trigger element. | | - |
Additional CSS classes to apply to the tab trigger. | | - |
Additional HTML attributes to apply to the tab trigger element. | | - |
Unique value that identifies this tab and its corresponding content. | | - |
Whether this tab is currently active/selected. | | |
ID of the parent tabs container. Auto-detected if not provided. | | - |
Content
Container for tab content that shows when corresponding trigger is active.
| Name | Type | Default |
|---|---|---|
Unique identifier for the tab content element. | | - |
Additional CSS classes to apply to the tab content. | | - |
Additional HTML attributes to apply to the tab content element. | | - |
Value that matches the corresponding tab trigger. | | - |
Whether this content is currently visible/active. | | |
ID of the parent tabs container. Auto-detected if not provided. | | - |
JavaScript API
// Set active tab programmatically
window.tui.tabs.setActive("tabs-id", "tab-value");