Knit UI
GitHub

Playground

Loading playground…

false
false
Playground
<Accordion
  variant="default"
  chevronPosition="right"
  multiple={false}
  disableChevronRotation={false}
  defaultValue="apples"
/>

Examples

Variants

Each container variant.

Loading example…

VariantsSourceStorybook

Shadows

Elevation via the shared shadow ladder — inherited from Box, so every component accepts it; no shadow unless set.

Loading example…

ShadowsSourceStorybook

Multiple

Multiple panels open at once.

Loading example…

MultipleSourceStorybook

Chevron Left

Chevron pinned to the left of the label.

Loading example…

Chevron LeftSourceStorybook

Custom Chevron

A custom chevron glyph replaces the default.

Loading example…

Custom ChevronSourceStorybook

With Icons

An icon to the left of each label.

Loading example…

With IconsSourceStorybook

Disabled Control

A disabled control cannot be toggled.

Loading example…

Disabled ControlSourceStorybook

Heading Order

order promotes each control to a real heading level for screen readers.

Loading example…

Heading OrderSourceStorybook

Controlled

Controlled — the open item is owned by the parent.

Loading example…

ControlledSourceStorybook

Sizes

Representative size keys — controls scale the header height and label font.

Loading example…

SizesSourceStorybook

Styles

Per-slot styles targets individual parts — here the control, label, and panel.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
chevronReactNodeCustom chevron icon.
chevronIconSizestring | number | undefinedSize of the default chevron glyph; ignored when a custom `chevron` is set. When unset the glyph keeps the kit's default size (14px) — a deliberate divergence from Mantine's 16 so a plain `<Accordion>` is pixel-identical.
chevronPositionAccordionChevronPosition | undefined
left · right
'right'Position of the chevron.
chevronSizestring | number | undefined'auto'Size of the chevron container — gives every chevron a fixed centered slot.
childrenReactNode`Accordion.Item` children.
defaultValueAccordionValue<Multiple> | undefinedUncontrolled initial value.
disableChevronRotationboolean | undefinedfalseDisable the default chevron rotation animation.
disabled systemboolean | undefined
keepMountedboolean | undefinedtrueKeep inactive panels mounted (hidden).
multipleMultiple | undefinedfalseAllow multiple items open simultaneously.
onChange((value: AccordionValue<Multiple>) => void) | undefinedCalled when value changes.
orderAccordionHeadingOrder | undefinedundefinedHeading level at which `Accordion.Control` is announced — renders the control inside `role="heading"` + `aria-level={order}`. When unset, the control has no heading semantics (a plain pressable).
radius systemstring | number | undefined'md'Corner rounding.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined'md'Control size — scales the header `paddingHorizontal`/`minHeight`, the label font, and the default chevron glyph off the shared `controlMetrics` row.
styles systemSlotStyles<AccordionStyles> | undefinedUniform per-slot style passthrough — sugar over the composable parts. Slots: `root` / `item` / `control` / `label` / `chevron` / `panel`. Distributed through context so it reaches every nested part. Explicit inline props on a composed part always win.
theme systemThemeName | null | undefinedApplies a theme to this element
transitionDurationnumber | undefined200Panel expand/collapse transition duration in ms.
transitionTimingFunctionstring | undefined'ease'Panel expand/collapse transition timing function.
valueAccordionValue<Multiple> | undefinedControlled value.
variant systemAccordionVariant | undefined
default · contained · filled · separated
'default'Visual style.

Style slots

Every part of Accordion can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
chevronstyles={{ chevron: { … } }}
controlstyles={{ control: { … } }}
itemstyles={{ item: { … } }}
labelstyles={{ label: { … } }}
panelstyles={{ panel: { … } }}
rootstyles={{ root: { … } }}

Plus 496 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.