Detailscomponent

Details({ title, open = false, name, children, ...props }: DetailsProps): ReactElement
ParamType
propsDetailsProps
Props for DetailsItem — a single collapsible disclosure. required
    .titleReactNode
Content of the always-visible summary (e.g. a question). required
    .openboolean
Whether the item starts expanded.
    .namestring
Shared group name — items with the same name open exclusively (only one at a time).
    .childrenReactNode
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-content are supported),
  • Give sibling items a shared name to make them open exclusively.