Filter Chips

Botones de filtro de una sola opción generados a partir de datos, como chips o pestañas, con un contador por opción y navegación con flechas.

Disponible en
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: disponible

Uso

Importación

ts
import {
  SoneFilterChipsComponent,
} from "@surface-one/angular/filter-chips";

Referencia de la API

SoneFilterChipsComponentComponente

`<sone-filter-chips>` — one-of-many filter buttons rendered from data, with an optional count badge per option. `variant="toggle"` is an outline Toggle Group of separate chips; `variant="tabs"` is a Tabs list. Either way each option is a toggle button (`aria-pressed`) in a labelled `role="group"` — a filter, not a tab panel — with arrow-key, Home and End navigation. `[(value)]` binds the selected option.

Selector
sone-filter-chips
Exportar como
soneFilterChips
Inputs
NombreTipo Predeterminado
optionsobligatorioreadonly FilterChipOption<T>[]—
valuebidireccional

The selected option's value (`[(value)]`).

T | nullnull
variantFilterChipsVariant"toggle"
size

The chip size of `variant="toggle"` (the tabs list has one size).

FilterChipsSize"sm"
ariaLabel

Names the group ("Filter by level").

string | nullnull