tabs.ts
8 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
Reference
fncreateFallbackElement(tabs: TabData[]): ElementCreate fallback HTML using <details> elements.
Create fallback HTML using <details> elements.
Parameters
-
tabsTabData[]
Returns
Element
fncreateTabsElement(tabs: TabData[], groupId: string): ElementCreate the HTML structure for tabs.
Create the HTML structure for tabs.
Parameters
-
tabsTabData[] -
groupIdstring
Returns
Element
fngenerateTabsCSS(groupCount: number): stringGenerate dynamic CSS for :has() based tab switching. This is needed because :ha…
Generate dynamic CSS for :has() based tab switching. This is needed because :has() selectors need unique IDs.
Parameters
-
groupCountnumber
Returns
string
fngetAttribute(el: Element, name: string): string | undefinedGet element attribute value.
Get element attribute value.
Parameters
-
elElement -
namestring
Returns
string | undefined
fnparseTabChildren(children: Element["children"]): TabData[]Parse Tab elements from Tabs children.
fnrehypeTabs()Rehype plugin to transform Tabs components.
Rehype plugin to transform Tabs components.