Accordion

Gestapelte Abschnitte, die ihren Inhalt ein- und ausblenden – einzeln oder mehrere gleichzeitig – nach dem WAI-ARIA-Muster Accordion.

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

Verwendung

Standard delivery takes 3–5 working days; express arrives the next day.

Import

ts
import {
  SoneAccordionContentDirective,
  SoneAccordionDirective,
  SoneAccordionIconDirective,
  SoneAccordionItemDirective,
  SoneAccordionTriggerComponent,
} from "@surface-one/angular/accordion";

API-Referenz

SoneAccordionContentDirectiveDirektive

`[soneAccordionContent]` / `<sone-accordion-content>` — the region the trigger shows.

Selektor
[soneAccordionContent], sone-accordion-content

SoneAccordionDirectiveDirektive

`[soneAccordion]` / `<sone-accordion>` — a stack of headed sections that show and hide their content (WAI-ARIA Accordion). `type` single or multiple, `collapsible` (single), two-way `[(value)]` with the open item values. Up / Down, Home and End move between the triggers.

Selektor
[soneAccordion], sone-accordion
Export als
soneAccordion
Inputs
NameTyp Standard
type

`single`: one item open at a time; `multiple`: any number.

AccordionType"single"
collapsible

A `single` accordion lets its open item close again.

booleanfalse
disabled

Disables every item.

booleanfalse
valuebidirektional

The open item values: a value (or `null`) when `single`, a list when `multiple`.

AccordionValuenull

SoneAccordionIconDirectiveDirektive

`[soneAccordionIcon]` — your own icon in place of the chevron; it turns when open.

Selektor
[soneAccordionIcon]

SoneAccordionItemDirectiveDirektive

`[soneAccordionItem]` / `<sone-accordion-item>` — one section: a trigger and its content.

Selektor
[soneAccordionItem], sone-accordion-item
Export als
soneAccordionItem
Inputs
NameTyp Standard
value

Names the item in the accordion's `value`; unique by default.

stringthis.uid
disabledbooleanfalse

SoneAccordionTriggerComponentKomponente

`<sone-accordion-trigger>` — the item's heading (`role="heading"`, `level`) with the button that opens and closes it. Project an `[soneAccordionIcon]` to replace the chevron.

Selektor
sone-accordion-trigger
Inputs
NameTyp Standard
level

The heading level of the trigger (`aria-level`).

number3