Collapsible β
Default Closed
Loading...
Default Open
Loading...
<flint-collapsible-trigger> β
Toggle button for a collapsible. Place inside flint-collapsible. Automatically wires up to the nearest flint-collapsible ancestor.
- Tag:
<flint-collapsible-trigger> - Class:
FlintCollapsibleTrigger
Import β
ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCollapsibleTrigger } from '@getufy/flint-ui';Usage β
html
<flint-collapsible-trigger></flint-collapsible-trigger>Properties β
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
expanded | expanded | boolean | false | Reflects the parent collapsible's open state. Set by flint-collapsible. |
disabled | disabled | boolean | false | Disables the trigger. Set by flint-collapsible or directly. |
Slots β
| Name | Description |
|---|---|
(default) | Trigger label or any content (icon, text, avatarβ¦). |
CSS Parts β
| Name | Description |
|---|---|
base | The component's base wrapper element. |
<flint-collapsible-content> β
The collapsible panel. Animates open/closed with a CSS grid transition. Place inside flint-collapsible; its open state is managed automatically.
- Tag:
<flint-collapsible-content> - Class:
FlintCollapsibleContent
Import β
ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCollapsibleContent } from '@getufy/flint-ui';Usage β
html
<flint-collapsible-content></flint-collapsible-content>Properties β
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open | boolean | false | Whether the panel is visible. Managed by the parent flint-collapsible. |
Slots β
| Name | Description |
|---|---|
(default) | Content to reveal when expanded. |
CSS Parts β
| Name | Description |
|---|---|
base | The component's base wrapper element. |
content | The content container. |
CSS Custom Properties β
| Property | Default |
|---|---|
--flint-collapsible-duration | β |
--flint-collapsible-easing | β |
<flint-collapsible> β
Root container for a collapsible panel. Manages open/closed state and coordinates child trigger and content.
- Tag:
<flint-collapsible> - Class:
FlintCollapsible
Import β
ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCollapsible } from '@getufy/flint-ui';Usage β
html
<flint-collapsible></flint-collapsible>Properties β
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open | boolean | false | Current open state (controlled). When set, the component reflects this state and does not manage its own state. Reflects to attribute for CSS targeting. |
defaultOpen | default-open | boolean | false | Initial open state (uncontrolled). Only used on first render; ignored after mount. |
disabled | disabled | boolean | false | Disables the trigger, preventing user interaction. |
Events β
| Event | Detail | Description |
|---|---|---|
flint-collapsible-change | { open: boolean } | Fired when the open state changes. detail: { open: boolean } |
Slots β
| Name | Description |
|---|---|
(default) | Accepts flint-collapsible-trigger, flint-collapsible-content, and any other elements that should always be visible. |
CSS Custom Properties β
| Property | Default |
|---|---|
--flint-collapsible-duration | 200ms |
--flint-collapsible-easing | ease |
Methods β
| Method | Description |
|---|---|
toggle(): void | Toggle the open state and fire flint-collapsible-change. |