Team Pro
Até 25 usuários, billing mensal e permissões avançadas.
Organizes related content into sections that can be expanded or collapsed.
Running with the stable ds-tis/accordion JavaScript runtime.
Open the HTML/CSS/JS playground
Conteúdo expandido do painel.
.ds-accordion — group of related items..ds-accordion__item — visual container for each section..ds-accordion__trigger — button that toggles aria-expanded..ds-accordion__leading-icon — optional Lucide icon..ds-accordion__chevron — visual indicator for open/closed state..ds-accordion__panel — content slot associated with the trigger.
Use a button for the trigger. The documentation helper synchronizes aria-expanded, hidden, and data-state; in product, keep the same contract.
Invoices are generated on the first business day of each month and sent to account owners.
Admins can enforce two-factor authentication and session expiration policies.
The panel is a slot. Compose complex content with public DS components instead of isolated internal classes.
Até 25 usuários, billing mensal e permissões avançadas.
Este painel fica indisponível até que a permissão seja liberada.
The live component set exposes Title, not Label. Use the public Figma property name for handoff and documentation; the CSS class remains .ds-accordion__title.
| Property | Type | Repo equivalent |
|---|---|---|
Title | TEXT | .ds-accordion__title |
Content | TEXT | .ds-accordion__panel com texto simples |
Content Slot | SLOT | Custom content inside .ds-accordion__panel. |
Show Leading Icon | BOOLEAN | Render or omit .ds-accordion__leading-icon. |
Leading Icon | INSTANCE_SWAP | Lucide icon with data-lucide. |
State | VARIANT | Default, Hover, Focus, Disabled |
Open | VARIANT | aria-expanded, hidden e data-state |
| Parte | CSS | Token atual |
|---|---|---|
| Item | .ds-accordion__item | component.accordion.item.{radius,border-width,bg,border-color} |
| Trigger | .ds-accordion__trigger | component.accordion.trigger.{height,padding,gap} |
| Title | .ds-accordion__title | component.accordion.trigger.content.color + typography body/md bold |
| Content | .ds-accordion__panel | component.accordion.content.{color,padding,gap} |
| Chevron | .ds-accordion__chevron | component.accordion.chevron.{size,color,stroke-width} |
| Leading icon | .ds-accordion__leading-icon | component.accordion.leading-icon.{size,color,stroke-width} |
| Focus ring | .ds-accordion__trigger:focus-visible | component.accordion.focus-ring.radius.default + component.focus-ring.* |
Endereço e janela de recebimento.
Cartão e faturamento.
Informação essencial para decisão.
npm install ds-tispnpm add ds-tisyarn add ds-tisbun add ds-tisimport 'ds-tis/css'
import { initAccordions } from 'ds-tis/accordion'
initAccordions()<div class="ds-accordion" data-accordion-mode="single">
<div class="ds-accordion__item" data-state="open">
<button
class="ds-accordion__trigger"
type="button"
id="billing-trigger"
aria-expanded="true"
aria-controls="billing-panel"
>
<span class="ds-accordion__title">Faturamento</span>
</button>
<div
class="ds-accordion__panel"
id="billing-panel"
role="region"
aria-labelledby="billing-trigger"
>
Gerencie formas de pagamento e dados fiscais.
</div>
</div>
</div>| Contract | Rule |
|---|---|
aria-expanded | State source on the trigger; true opens the associated panel. |
hidden | Must be present on closed panels and absent on open panels. |
data-state | Mirrors open/closed on the item for CSS, tests, and debugging. |
data-accordion-mode="single" | Optional. Closes siblings when one item opens, matching patterns such as Radix Accordion single. |
| Class | Description |
|---|---|
ds-accordion | Container for the item group. |
ds-accordion__item | Visual container for one section. |
ds-accordion__item--disabled | Disabled item — trigger with disabled. |
ds-accordion__trigger | Button that toggles panel visibility. |
ds-accordion__leading-icon | Optional Lucide icon before the title. |
ds-accordion__title | Trigger text. |
ds-accordion__chevron | Decorative state indicator. |
ds-accordion__panel | Expanded content slot. |
data-state | Synchronized item state: open or closed. |
CSS defines anatomy and visual states, but expand/collapse, keyboard, and single mode depend on the public ds-tis/accordion module (initAccordions / destroyAccordions). Events: ds-accordion-open, ds-accordion-close. Call destroyAccordions on unmount.
| Key | Action |
|---|---|
Tab | Moves focus between Accordion triggers and controls inside open panels. |
Enter / Space | Toggles the panel associated with the focused trigger. |
Arrow Up / Arrow Down | Moves focus between group triggers. |
Home / End | Moves focus to the first or last trigger in the group. |
| Rule | Application |
|---|---|
button | The trigger must be a real button, not a clickable div. |
aria-expanded | Reflects the open/closed state on the trigger. |
aria-controls | Points to the controlled panel id. |
role="region" | Use on panels with enough content to merit a landmark, always with aria-labelledby. |
hidden | Removes closed panels from the accessibility tree. |
disabled | Removes unavailable triggers from interaction and the tab order. |
Initialize the public runtime after render and destroy it when the owning view unmounts.
Covered by the stable Storybook, public runtime tests when applicable, keyboard scenarios, responsive checks, and Axe.