Collapsible Section
Ein einklappbarer Abschnitt mit Titel: eine Kopfzeilen-Schaltfläche mit Pfeil, Untertitel und Anzahl, darunter der Inhalt.
Angular: verfügbar Vue: verfügbar React: verfügbar React Native: noch nicht verfügbar
Verwendung
- Ada Park: share the launch checklist
- Sam Lee: review the pricing page copy
- Kai Moreno: book the design review
Every read of a locked note, newest first.
<div class="demo-stack" style="max-width: 30rem">
<sone-collapsible-section
title="Action items"
subtitle="From the last 3 meetings"
[count]="items.length"
[(open)]="open"
>
<button soneCollapsibleSectionActions soneBtn variant="ghost" size="xs" type="button">
Copy
</button>
<ul style="margin: 0; color: var(--text-secondary)">
@for (item of items; track item) {
<li>{{ item }}</li>
}
</ul>
</sone-collapsible-section>
<sone-collapsible-section title="Audit trail" [count]="12">
<p style="margin: 0; color: var(--text-secondary)">Every read of a locked note, newest first.</p>
</sone-collapsible-section>
</div>Import
import {
SoneCollapsibleSectionActionsDirective,
SoneCollapsibleSectionComponent,
} from "@surface-one/angular/collapsible-section";API-Referenz
SoneCollapsibleSectionActionsDirectiveDirektive
`[soneCollapsibleSectionActions]` — controls at the end of the header, outside the toggle button.
SoneCollapsibleSectionComponentKomponente
`<sone-collapsible-section>` — a titled section that folds, built on the Collapsible: a full-width header button (chevron, `title`, optional `subtitle` and a secondary-badge `count`) that keeps `aria-expanded` / `aria-controls` in sync, and the projected body below it. `[(open)]` binds the state. Controls in `[soneCollapsibleSectionActions]` sit at the end of the header, outside the button.
| Name | Typ | Standard |
|---|---|---|
titleerforderlichThe section's name, shown in the header button. | string | — |
subtitleA quiet line after the title (a date range, a source). | string | null | null |
countA count in a secondary badge after the title; `null` hides it. | number | string | null | null |
openbidirektionalWhether the body is shown (`[(open)]`). | boolean | false |
disabled | boolean | false |