PhoenixDuskmoon.Component.Tab (PhoenixDuskmoon v7.2.1)
View SourceDuskmoon UI Tab Component
Summary
Functions
Generates tabs
Functions
Generates tabs
Example
<.dm_tab active_tab_index={0}>
<:tab>Menu1</:tab>
<:tab>Menu2</:tab>
<:tab_content>Menu1 Content</:tab_content>
<:tab_content>Menu2 Content</:tab_content>
</.dm_tab>Attributes
id(:any) - html attribute id. Defaults tofalse.class(:any) - html attribute class. Defaults to"".header_class(:any) - header html attribute class. Defaults to"".orientation(:string) - header html attribute class. Defaults to"horizontal". Must be one of"horizontal", or"vertical".active_tab_index(:integer) - the index of active tab, if active_tab_name is not set, this will be used. Defaults to0.active_tab_name(:string) - the name of active tab, use for match tab and tab_content. Defaults to"".variant(:string) - tab style variant (lifted, bordered, boxed). Defaults tonil.size(:string) - tab size (xs, sm, lg). Defaults tonil.content_class(:any) - tab_content html attribute class. Defaults to"".
Slots
tab- Render tab. Accepts attributes:id(:any)class(:any)name(:string)
tab_content- Render tab content. Accepts attributes:id(:any)class(:any)name(:string)