Toggle Group & Tabs

Toggles, Toggle-Gruppen und Tabs mit Roving Focus in jeder Ausrichtung.

Verfügbar für
  • Angular: verfügbar
  • Vue: verfügbar
  • React: verfügbar
  • React Native: verfügbar

Verwendung

Overview content goes here.

Import

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

API-Referenz

SoneTabsListDirectiveDirektive

Selektor
[soneTabsList]
Inputs
NameTyp Standard
variantTabsVariant"default"
orientationToggleOrientation"horizontal"
stretch

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

booleanfalse

SoneTabsTriggerDirectiveDirektive

Selektor
[soneTabsTrigger]
Inputs
NameTyp Standard
activebooleanfalse
iconbooleanfalse

SoneToggleDirectiveDirektive

Selektor
[soneToggle]
Inputs
NameTyp Standard
variantToggleVariant"default"
sizeToggleSize"default"
pressedbooleanfalse

SoneToggleGroupDirectiveDirektive

`[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`.

Selektor
[soneToggleGroup]
Inputs
NameTyp Standard
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
valuebidirektional

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

ToggleGroupValuenull
disabled

Every item disabled.

booleanfalse

SoneToggleGroupItemDirectiveDirektive

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

Selektor
[soneToggleGroupItem]
Inputs
NameTyp Standard
pressedbooleanfalse
value

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

string | nullnull
disabledbooleanfalse