Collapsible
Pokazuje i ukrywa obszar za pomocą wyzwalacza, który utrzymuje synchronizację aria-expanded i aria-controls.
Dostępny w- Angular: dostępny
- Vue: dostępny
- React: dostępny
- React Native: dostępny
Użycie
- Ada Park: share the launch checklist
- Sam Lee: review the pricing page copy
- Kai Moreno: book the design review
<section soneCollapsible [(expanded)]="open" class="demo-stack" style="max-width: 28rem">
<button soneCollapsibleTrigger>
<svg soneCollapsibleIcon viewBox="0 0 16 16" fill="none">
<path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<strong>Action items</strong>
</button>
<ul soneCollapsibleContent id="action-items" style="margin: 0; color: var(--text-secondary)">
<li>Ada Park: share the launch checklist</li>
<li>Sam Lee: review the pricing page copy</li>
<li>Kai Moreno: book the design review</li>
</ul>
</section>
Import
import {
SoneCollapsibleContentDirective,
SoneCollapsibleDirective,
SoneCollapsibleIconDirective,
SoneCollapsibleTriggerDirective,
} from "@surface-one/angular/collapsible";
Dokumentacja API
SoneCollapsibleContentDirectiveDyrektywa
- Selektor
[soneCollapsibleContent]
SoneCollapsibleDirectiveDyrektywa
- Selektor
[soneCollapsible]- Eksport jako
soneCollapsible
SoneCollapsibleIconDirectiveDyrektywa
- Selektor
[soneCollapsibleIcon]
SoneCollapsibleTriggerDirectiveDyrektywa
- Selektor
button[soneCollapsibleTrigger]