Tabs
Tabs are used to structure your Obsidian UI.
Tabs are the main way to sepearate each section for your UI. Each tab can have a name, icon and a description. The order is determined by the order of when Window:AddTab()
is called.
Quick Start
We recommend storing your tabs in a table to make it easier to manage.
Once you have created your tabs, you can add UI elements to them via groupboxes and/or tabboxes.
Usage
You can create a Tab by calling the AddTab
method on a Window.
Arguments
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Name of the tab | string | nil |
2 | Custom Icon or Icon name from lucide.dev | string | nil |
3 | Tab description | string | nil |
Configuration Table
Prop
Type
Methods
You can use the following methods to interact with the tab:
UpdateWarningBox
Updates the warning box in a tab. This can be used to display warnings/errors, or any useful information.
Prop
Type
SetVisible
Shows or hides the tab.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Whether to show the tab | boolean | nil |
SetOrder
Changes the order of the tab.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | New order of the tab | number | nil |
SetName
Updates the name of the tab.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | New name of the tab | string | nil |
SetDescription
Updates the description of the tab.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | New description of the tab | string | nil |
SetIcon
Updates the icon of the tab.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | New icon of the tab | string | nil |
Example
Key Tabs
Key tabs are used to display items at the center and it's intended use as a menu to display a key system page.
Usage
You can create a Key Tab by calling the AddKeyTab
method on a Window.
Arguments
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Title of the key tab | string | nil |
2 | Custom Icon or Icon name from lucide.dev | string | nil |
Methods
Key tabs inherit all methods from the groupboxes and tabboxes which means you can add any UI element to it as well.
AddKeyBox
Adds a key box to the key tab.