:TabSelector

type Tab = {
Name: string,
Focused: boolean?,
AutoSize: string?,
TabButton: boolean?,
Closeable: boolean?,
OnClosure: (Tab) -> nil,
Icon: (string|number)?
}
type TabSelector = {
NoTabsBar: boolean?,
NoAnimation: boolean?,
AutoSelectNewTabs: boolean?,
OnActiveTabChange: ((Tab: Tab, Previous: Tab) -> nil)?,
CreateTab: (TabsBox, Tab) -> Elements,
RemoveTab: (TabsBox, Target: (table|string)) -> nil,
SetActiveTab: (TabsBox, Target: (table|string)) -> nil,
}
Example usage:
local TabSelector = ...:TabSelector()
local Names = {"Avocado", "Broccoli", "Cucumber"}
for _, Name in Names do
local Tab = TabSelector:CreateTab({Name = Name}) --> Canvas
Tab:Label({
Text = `This is the {Name} tab!`
})
end
Theme colors:
Tag
Affects
TabsBarBg
Background color of tabs bar
TabsBarBgTransparency
Background transparency of tabs bar
Text
Text color
TextFont
Text font
TextSize
Text font size
TabPagePadding
Page padding
TabBgActive
Active tab button background color
TabTextActive
Active tab button text color
Last updated