tabs.ts

Source

6 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

6 symbols 5 functions 1 modules 3 parameters 5 returns

Reference

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.

Signature

export function generateTabsCSS(groupCount: number): string

View source

Parameters

  • groupCount number

Returns

string
fngetTabGroupCounter(): numberRead the shared tab group counter. Other tab-like transforms (such as the packa…

Read the shared tab group counter. Other tab-like transforms (such as the package-manager tabs) share this counter so data-group ids and the CSS generated by generateTabsCSS stay unique across a page.

Signature

export function getTabGroupCounter(): number

View source

Returns

number
fnresetTabGroupCounter(): voidReset tab group counter (for testing and per dev-server request).

Reset tab group counter (for testing and per dev-server request).

Signature

export function resetTabGroupCounter(): void

View source

Returns

void
fnsetTabGroupCounter(value: number): voidSet the shared tab group counter (advanced by other tab-like transforms).

Set the shared tab group counter (advanced by other tab-like transforms).

Signature

export function setTabGroupCounter(value: number): void

View source

Parameters

  • value number

Returns

void
moduletabsTabs Plugin - Pure CSS implementation Transforms <Tabs>/<Tab> components into accessible HTML with CSS :has() based tab…

Tabs Plugin - Pure CSS implementation

Transforms <Tabs>/<Tab> components into accessible HTML with CSS :has() based tab switching (no JavaScript required).

The HTML rewrite is performed in Rust (transformTabsEmbeds in

View source

fntransformTabs(html: string): Promise<string>Transform Tabs components in HTML.

Transform Tabs components in HTML.

Signature

export async function transformTabs(html: string): Promise<string>

View source

Parameters

  • html string

Returns

Promise<string>