Toggle Group & Tabs

Bascules, groupes de bascules et onglets avec focus itinérant, dans toutes les orientations.

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

Utilisation

Overview content goes here.

Importation

ts
import {
  SoneTabsListDirective,
  SoneTabsTriggerDirective,
  SoneToggleDirective,
  SoneToggleGroupDirective,
  SoneToggleGroupItemDirective,
} from "@surface-one/angular/toggle-group";

Référence de l’API

SoneTabsListDirectiveDirective

Sélecteur
[soneTabsList]
Inputs
NomType Par défaut
variantTabsVariant"default"
orientationToggleOrientation"horizontal"
stretch

Fill the container's width, every trigger an equal share.

booleanfalse

SoneTabsTriggerDirectiveDirective

Sélecteur
[soneTabsTrigger]
Inputs
NomType Par défaut
activebooleanfalse
iconbooleanfalse

SoneToggleDirectiveDirective

Sélecteur
[soneToggle]
Inputs
NomType Par défaut
variantToggleVariant"default"
sizeToggleSize"default"
pressedbooleanfalse

SoneToggleGroupDirectiveDirective

`[soneToggleGroup]` — a set of toggle buttons; arrow keys move between them. Without `type`, each item takes its own `pressed`. With `type="single"` or `"multiple"` the group presses the items that carry a `value`, two-way through `[(value)]`, and becomes one Tab stop (roving tabindex: the last focused item, else the first pressed one); items keep `aria-pressed`.

Sélecteur
[soneToggleGroup]
Inputs
NomType Par défaut
variantToggleVariant"default"
sizeToggleSize"default"
spacingnumber0
orientationToggleOrientation"horizontal"
stretch

Fill the container's width on one row, every item an equal share.

booleanfalse
type

The group presses its items (`single` / `multiple`); unset, each item's `pressed` decides.

ToggleGroupType | nullnull
valuebidirectionnel

The pressed value (`single`, `null` for none) or values (`multiple`), two-way.

ToggleGroupValuenull
disabled

Every item disabled.

booleanfalse

SoneToggleGroupItemDirectiveDirective

`[soneToggleGroupItem]` — takes its variant, size and (with a `value` in a typed group) pressed state from the group.

Sélecteur
[soneToggleGroupItem]
Inputs
NomType Par défaut
pressedbooleanfalse
value

Its value in a group with `type`: the group presses it.

string | nullnull
disabledbooleanfalse