import { Component } from '@angular/core';
import { WrToolbar } from 'ngwr/toolbar';
@Component({ imports: [WrToolbar] })
export class MyComponent {}Toolbar
An action bar with start, center and end zones.
Installation
Import the class, and @use the entry point in your global styles: without it the component renders unstyled.
Basic
An empty zone takes no space.
<wr-toolbar>
<div wrToolbarStart><strong>Items</strong></div>
<div wrToolbarCenter><wr-btn>Grid</wr-btn> <wr-btn>List</wr-btn></div>
<div wrToolbarEnd><wr-btn color="primary">New</wr-btn></div>
</wr-toolbar>Narrow container (container query)
With responsive, the zones stack when the toolbar itself is narrow.
<div style="width: 320px"><wr-toolbar responsive>…</wr-toolbar></div>API
| Name | Description | Type | Default |
|---|---|---|---|
responsive | Stack the zones vertically when the toolbar's own box is too narrow to fit them in a row (a container query on its own width, not the viewport — so it adapts inside a narrow column or split pane). | boolean | false |
CSS variables
Set these on the component's selector or a wrapper, not on :root: the defaults are declared on ngwr/toolbar's own element.
| Variable | Default | Declared on |
|---|---|---|
--wr-toolbar-border | var(--wr-border-base) | .wr-toolbar |
--wr-toolbar-font-family | var(--wr-font-family-base) | .wr-toolbar |
--wr-toolbar-gap | var(--wr-space-md) | .wr-toolbar |
--wr-toolbar-padding-x | var(--wr-space-lg) | .wr-toolbar |
--wr-toolbar-padding-y | var(--wr-space-sm) | .wr-toolbar |
--wr-toolbar-radius | var(--wr-border-radius-base) | .wr-toolbar |
--wr-toolbar-zone-gap | var(--wr-space-sm) | .wr-toolbar |
See also
Component Page HeaderA page title with slots for breadcrumbs, actions and tags.Component Button GroupJoins buttons into one control with shared borders.Component ButtonA button for an action or a link.Component LayoutAn app shell: header, sider, content and footer.Guide Mobile & responsiveMake ngwr layouts work on touch screens and narrow containers.