Skip to main content

Toolbar

shadow

The Element Toolbar is a flexible container designed to display a variety of content in an organized manner, typically used at the top of web applications or pages. It may contain buttons, navigation, search box, and more. It supports content alignment and can also be glued to the top of the screen.

Part of the Toolbar is the ToolbarActions element, which groups various actions in the form of buttons into a single unit.

Basic usage

The sample represents a basic toolbar with a default composition of content and controls.

Dynamic breadcrumbs

The sample consists of a toolbar from a dynamically generated breadcrumb trail, which is useful for context-dependent navigation.

Dynamic action

The preview changes the toolbar actions according to the context, so you can see how to react to the state of the current screen.

When to use

Use wje-toolbar 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

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

Events

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

Methods

scheduleResponsiveLayout

PopisSchedules responsive layout recalculation.
Signatúra() => void

updateResponsiveLayout

PopisAktualizuje responsive layout podľa najnovších údajov komponentu.
Signatúra() => Promise<void>

measureBreadcrumbs

PopisSpustí metódu measureBreadcrumbs na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(breadcrumbs: HTMLElement) => Promise<{count: number, fullWidth: number, compactWidth: number}>

ensureBreadcrumbState

PopisSpustí metódu ensureBreadcrumbState na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra(breadcrumbs: HTMLElement, count: number) => {compactMaxItems: number}

setBreadcrumbCompactState

PopisNastaví breadcrumb compact state a aplikuje súvisiace zmeny stavu.
Signatúra(breadcrumbs: HTMLElement|null, compact: boolean) => void

setBreadcrumbMaxItems

PopisNastaví breadcrumb max položky a aplikuje súvisiace zmeny stavu.
Signatúra(breadcrumbs: HTMLElement, value: number) => void

getVisibleActionsForWidth

PopisVráti visible actions for width z aktuálneho stavu komponentu.
Signatúra(actionMetrics: object, width: number) => number

setVisibleActions

PopisApplies visible action count.
Signatúra(action: HTMLElement|null, count: number) => void

clearVisibleActions

PopisVyčistí visible actions a obnoví súvisiace hodnoty.
Signatúra(action: HTMLElement|null) => void

getToolbarAction

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

getBreadcrumbs

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

isSelfManagedAction

PopisOverí, či je self managed action aktuálne pravda.
Signatúra(action: HTMLElement|null) => boolean

isSelfManagedBreadcrumbs

PopisOverí, či je self managed breadcrumbs aktuálne pravda.
Signatúra(breadcrumbs: HTMLElement|null, action: any) => boolean

nextFrame

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

CSS shadow parts

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

CSS custom variables

NázovPopis
--wje-toolbar-backgroundVlastná CSS premenná na štýlovanie komponentu (background).
--wje-toolbar-heightVlastná CSS premenná, ktorá riadi height.
--wje-toolbar-min-heightVlastná CSS premenná, ktorá riadi min height.
--wje-toolbar-padding-topVlastná CSS premenná, ktorá riadi padding top.
--wje-toolbar-padding-bottomVlastná CSS premenná, ktorá riadi padding bottom.
--wje-toolbar-padding-inlineVlastná CSS premenná, ktorá riadi padding inline.
--wje-toolbar-border-colorVlastná CSS premenná, ktorá riadi border color.
--wje-toolbar-topVlastná CSS premenná na štýlovanie komponentu (top).

Slots

NázovPopis
startSlot pre obsah zobrazený pred hlavným obsahom.
endSlot pre obsah zobrazený za hlavným obsahom.