Detailscomponent
Details({ title, open = false, name, children, ...props }: DetailsProps): ReactElement| Param | Type | |
|---|---|---|
props | DetailsProps | Props for DetailsItem — a single collapsible disclosure. required |
.title | ReactNode | Content of the always-visible summary (e.g. a question). required |
.open | boolean | Whether the item starts expanded. |
.name | string | Shared group name — items with the same name open exclusively (only one at a time). |
.children | ReactNode | Content revealed when the item is expanded. required |
| Return | |
|---|---|
ReactElement |
A single collapsible panel within an Details, built on native <details> and <summary>
- Panel animates to its true height (where
interpolate-size+::details-contentare supported), - Give sibling items a shared
nameto make them open exclusively.