API reference
FilterAddButton
Filter Add Button opens a popout of available filters and emits the chosen one
so your app can add it to the bar. Pass a flat list of options, or group them
under headings; selecting one fires a select event with the option's id
and closes the popout.
Like the other filter primitives it is intent-only: it does not track which
filters are active. Your app owns the active filters and decides what to do on
select (typically render a new Filter Field).
Mirrors the Provet Cloud filter add button.
<nord-filter-add-button></nord-filter-add-button>Props
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
disabled | disabled | Makes the component disabled. This prevents users from being able to interact with it and conveys its inactive state to assistive technologies. | boolean | false |
open | open | Whether the popout is open. Set it to open or close the popout programmatically. | boolean | false |
size | size | The size of the button. | 's' | 'm' | 'l' | 's' |
Methods
| Method name | Parameters | Description |
|---|---|---|
show() => void | N/A | Open the popout. |
hide() => void | N/A | Close the popout. |
| Event | Detail Type | Description |
|---|---|---|
select | FilterAddButtonSelectEvent | Dispatched with the chosen option's id when an option is selected. |
open | NordEvent | Dispatched when the popout is opened. |
close | NordEvent | Dispatched when the popout is closed. |
CSS Properties
CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.
| Property | Description | Default |
|---|---|---|
--n-filter-add-button-list-inline-size | Controls the inline size, or width, of the popout list. | 250px |
Dependencies
This component is internally dependent on the following components:
- <nord-button>
Button
Buttons are used for interface actions. Primary style should be used only once per section for main call-to-action, while other styles can appear more frequently.
- <nord-icon>
Icon
Icons are used to provide additional meaning or in places where text label doesn’t fit. Icon component allows you to display an icon from the Nordicons library.
- <nord-popout>
Popout
Popouts are small overlays that open on demand. They let users access additional content and actions without cluttering the page.