eidos.components.tabs
HTMX-based tab container that loads tabs dynamically.
Args:
initial_tab_url: URL to load the initial tab contentcls: Additional classes for the containertarget_id: ID for the tab container (default: "tabs")
Returns:
Tag: The tab container that will be populated via HTMX
Example:
TabContainer("/settings/general")
Parameters:
content: <class 'air.tags.models.special.Tag'>initial_tab_url: <class 'str'>class_: <class 'str'>target_id: <class 'str'> = tabskwargs: typing.Any
Returns: <class 'air.tags.models.special.Tag'>
HTMX-based tab list for server-rendered tabs.
Args:
*tabs: Variable number of (label, url) tuplesselected: Index of the selected tab (0-based)tab_cls: Additional classes for tab buttonshx_target: HTMX target for tab content (default: "#tabs")hx_swap: HTMX swap method (default: "innerHTML")
Returns:
Tag: The tab list component
Example:
TabList( ("General", "/settings/general"), ("Security", "/settings/security"), ("Advanced", "/settings/advanced"), selected=0 )
Parameters:
tabs: tuple[str, str]selected: <class 'int'> = 0class_: <class 'str'>hx_target: <class 'str'> = #tabshx_swap: typing.Literal['innerHTML', 'outerHTML', 'beforebegin', 'afterbegin', 'beforeend', 'afterend', 'delete', 'none'] = innerHTMLkwargs: typing.Any
Returns: <class 'air.tags.models.special.Tag'>
Tab panel content wrapper.
Args:
content: The content to display in the tab panelpanel_cls: Additional classes for the panel
Returns:
Tag: The tab panel component
Parameters:
content: <class 'air.tags.models.special.Tag'>class_: <class 'str'>kwargs: typing.Any
Returns: <class 'air.tags.models.special.Tag'>
Complete tab component with list and panel.
Args:
tab_list: The TabList componenttab_panel: The TabPanel componentcls: Additional classes for the container
Returns:
Tag: The complete tabs component
Example:
# In your route handler: tab_list = TabList( ("General", "/settings/general"), ("Security", "/settings/security"), selected=0 ) tab_panel = TabPanel(general_settings_content) return Tabs(tab_list, tab_panel)
Parameters:
tab_list: <class 'air.tags.models.special.Tag'>tab_panel: <class 'air.tags.models.special.Tag'>cls: <class 'str'>kwargs: typing.Any
Returns: <class 'air.tags.models.special.Tag'>