TrademarkTrademark
Docs
Ctrl k
Search docs...
Components

Accordion

Updated: October 18, 2026
View on GitHub
Soon
Not released yet. This is on main and is not in any published version yet. It will not install today.

Accordion is a header that opens and closes the content under it. The content's height eases open and the icon turns. Closed content stays mounted, so it keeps its state. See the web Accordion for the same component in the browser.

Uncontrolled

The accordion keeps its own state. defaultOpen (or open without a handler) sets the first state.

Controlled

Pass open with onOpenChange (or onToggle) when the screen owns the state. onOpenChange is called with the next state.

Methods

A ref gives toggle, open and close, so another control can open the accordion.

Differences from the web

  • Accordion also takes core 3.0's defaultOpen and onOpenChange.
  • With open and no onToggle or onOpenChange, open only sets the first state, and later changes to it are followed.
  • Flex props other than those listed go to the content area, as on the web.

API reference

Prop
Type
Default
Description
titleReactNodeThe header. A string is drawn as heading-strong-s. Required.
childrenReactNodeThe content that opens and closes. Required.
openbooleanThe state. With onToggle or onOpenChange the caller owns it; without them, only the first state.
defaultOpenbooleanfalseCore 3.0's name for the first state when the accordion owns it.
onToggle() => voidCalled when the header is pressed or a method changes the state.
onOpenChange(open: boolean) => voidCore 3.0's change handler, called with the next state.
iconIconName"chevronDown"The icon at the end of the header.
iconRotationnumber180Degrees the icon turns while open.
size"s" | "m" | "l""m"Padding of the header and content.
radius"xs" | "s" | "m" | "l" | "xl" | "full""m"Corner radius of the pressed header.
headerPropsFlexPropsProps for the header row.
contentPropsFlexPropsProps for the content column.
toggleOnHeaderClickbooleantruePressing the header toggles the content. Set false to open it only with the ref methods.
styleViewStyleStyle for the header row.
refAccordionHandletoggle(), open() and close().
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club