Toolbar
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.
Recommended practices
- 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
| Popis | Schedules responsive layout recalculation. |
| Signatúra | () => void |
updateResponsiveLayout
| Popis | Aktualizuje responsive layout podľa najnovších údajov komponentu. |
| Signatúra | () => Promise<void> |
measureBreadcrumbs
| Popis | Spustí metódu measureBreadcrumbs na vykonanie logiky komponentu a aktualizáciu jeho stavu. |
| Signatúra | (breadcrumbs: HTMLElement) => Promise<{count: number, fullWidth: number, compactWidth: number}> |
ensureBreadcrumbState
| Popis | Spustí metódu ensureBreadcrumbState na vykonanie logiky komponentu a aktualizáciu jeho stavu. |
| Signatúra | (breadcrumbs: HTMLElement, count: number) => {compactMaxItems: number} |
setBreadcrumbCompactState
| Popis | Nastaví breadcrumb compact state a aplikuje súvisiace zmeny stavu. |
| Signatúra | (breadcrumbs: HTMLElement|null, compact: boolean) => void |
setBreadcrumbMaxItems
| Popis | Nastaví breadcrumb max položky a aplikuje súvisiace zmeny stavu. |
| Signatúra | (breadcrumbs: HTMLElement, value: number) => void |