Skip to main content

ToolbarActions

shadow

The ToolbarActions element serves as a wrapper for the buttons inserted into the Toolbar element and thus groups the different toolbar actions into a single unit.

wje-toolbar-actions supports responsive action collapsing through the breakpoint attribute. When actions move into the overflow menu, direct wje-button elements are handled automatically. Custom actions can join the same mechanism by adding the data-toolbar-action attribute.

When an icon-only action without visible text is moved into the overflow menu, the menu item uses a readable label from aria-label, title, label, data-label, or tooltip. For icon-only actions, always provide at least aria-label so the menu text and accessibility name are clear.

note

For more information on using ToolbarActions, go to the [Toolbar] element documentation(./toolbar).

When to use​

Use wje-toolbar-actions to compose a stable page layout with a clear content hierarchy.

When not to use​

Do not use it to solve business logic or for stateful orchestration of components.

Accessibility​

Preserve the semantics of the document (header, main, aside, footer) and the logical order of focusable elements.

  • Define desktop/mobile breakpoints first and then fine-tune the details.
  • Prefer consistent spacing tokens over ad-hoc margin/padding values.
  • For layouts with overflow, always test keyboard navigation and readers.

Attributes and properties​

breakpoint​

PopisNastavuje textovú hodnotu uloženú vo voľbe breakpoint.
Atribútbreakpoint
Typstring
Predvolené-

maxItems​

PopisNastavuje číselnú hodnotu používanú vo voľbe max-items.
Atribútmax-items
Typnumber|string
Predvolené0

visibleItems​

PopisNastavuje číselnú hodnotu používanú vo voľbe visible-items.
Atribútvisible-items
Typnumber|string
Predvolené-

Events​

Pre tento komponent nie sú dostupné žiadne udalosti.

Methods​

scheduleOverflow​

PopisSpustí metódu scheduleOverflow na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(doubleFrame?: boolean) => void

getActions​

PopisVráti actions z aktuálneho stavu komponentu.
Signatúra() => Array<HTMLElement>

getAssignedElements​

PopisVráti assigned elements z aktuálneho stavu komponentu.
Signatúra() => Array<HTMLElement>

getExistingDropdown​

PopisVráti existing dropdown z aktuálneho stavu komponentu.
Signatúra() => HTMLElement|null

observeExistingDropdown​

PopisSpustí metódu observeExistingDropdown na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => void

getOverflowDropdown​

PopisVráti overflow dropdown z aktuálneho stavu komponentu.
Signatúra() => HTMLElement

getOverflowMenu​

PopisVráti overflow menu z aktuálneho stavu komponentu.
Signatúra() => HTMLElement|null

getVisibleLimit​

PopisVráti visible limit z aktuálneho stavu komponentu.
Signatúra() => number

shouldCollapseByBreakpoint​

PopisSpustí metódu shouldCollapseByBreakpoint na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => boolean

isCollapsedByBreakpoint​

PopisOverí, či je collapsed by breakpoint aktuálne pravda.
Signatúra() => boolean

getBreakpointWidth​

PopisVráti breakpoint width z aktuálneho stavu komponentu.
Signatúra() => number|null

applyOverflow​

PopisSpustí metódu applyOverflow na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => void

restoreManagedActions​

PopisSpustí metódu restoreManagedActions na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(actions: Array<HTMLElement>) => void

restoreManagedOverflowContent​

PopisSpustí metódu restoreManagedOverflowContent na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => void

createMenuItem​

PopisVytvorí menu položku a pripojí ho do štruktúry komponentu.
Signatúra(action: HTMLElement) => HTMLElement

cloneActionMenuNode​

PopisSpustí metódu cloneActionMenuNode na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(node: Node) => Node

normalizeActionMenuIconSlot​

PopisSpustí metódu normalizeActionMenuIconSlot na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(element: Element) => void

getActionLabel​

PopisVráti action label z aktuálneho stavu komponentu.
Signatúra(action: HTMLElement) => string

createOverflowDivider​

PopisVytvorí overflow divider a pripojí ho do štruktúry komponentu.
Signatúra() => HTMLElement

measureActionMetrics​

PopisSpustí metódu measureActionMetrics na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => {count: number, widths: number[], gap: number, moreWidth: number, getWidthForCount: Function}

measureMoreWidth​

PopisSpustí metódu measureMoreWidth na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => number

CSS shadow parts​

NázovPopis
nativeŠtýluje koreňovú shadow časť komponentu.

CSS custom variables​

Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.

Slots​

NázovPopis
defaultPredvolený slot pre hlavný obsah komponentu.