Collapsible
An interactive component which expands/collapses a panel.
Loading...
API Reference
Root
Contains all the parts of a collapsible.
Prop | Default | Type |
---|---|---|
disabled | — | InputSignalWithTransform<boolean, BooleanInput> Determines whether a directive is available for interaction. When true, prevents the user from interacting with the collapsible. |
open | false | boolean The controlled open state of the collapsible. Sets the state of the directive. `true` - expanded, `false` - collapsed |
Emit | Payload |
---|---|
onOpenChange |
[value: boolean]
Emitted with new value when directive state changed. Event handler called when the open state of the collapsible changes. |
Data Attribute | Value |
---|---|
[data-state] | "open" | "closed" |
[data-disabled] | Present when disabled |
Trigger
The button that toggles the collapsible.
Data Attribute | Value |
---|---|
[data-state] | "open" | "closed" |
[data-disabled] | Present when disabled |
Content
The component that contains the collapsible content.
Data Attribute | Value |
---|---|
[data-state] | "open" | "closed" |
[data-disabled] | Present when disabled |
Accessibility
Adheres to the Disclosure WAI-ARIA design pattern .