Skip to main content
Mantı UI logoMantı UIv0.13.0
Studio

Collapsible

Pass the button content as trigger and the revealed region as children. Use open with onOpenChange to control it.

The default indicator follows state. Pass indicator={false} to hide it or a React node to replace it.

import { Collapsible, Text } from '@manti-ui/react';

export default function CollapsibleBasic() {
  return (
    <div className="w-full max-w-[calc(var(--manti-space-16)*6)]">
      <Collapsible trigger="Show chef's note">
        <Text className="p-3 px-1 pt-3" emphasis="muted">
          Rest the dough for 30 minutes so it rolls out smooth and thin.
        </Text>
      </Collapsible>
    </div>
  );
}

API

PropTypeDefaultDescription
triggerReactNode—The content of the toggle button.
indicatorReactNode | false—Trailing indicator. Uses the state-aware Manti icon by default; pass false to hide it.
childrenReactNode—The collapsible content revealed when open.
openboolean—Controlled open state.
defaultOpenboolean—Initial open state for uncontrolled usage.
onOpenChange(open: boolean) => void—Called whenever the open state changes.
disabledboolean—Disable the trigger.

Styling

Anatomy

PartSelectorDescription
root[data-scope="collapsible"][data-part="root"]The wrapper around the trigger and content.
trigger[data-scope="collapsible"][data-part="trigger"]The button that toggles the disclosure.
indicator[data-scope="collapsible"][data-part="indicator"]The paired chevrons that identify the disclosure control.
content[data-scope="collapsible"][data-part="content"]The region that animates its height open and closed.

Tokens

TokenControls
--manti-collapsible-radiusradius
--manti-collapsible-padding-xpadding x
--manti-collapsible-padding-ypadding y
--manti-collapsible-gapgap
--manti-collapsible-icon-sizeicon size

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub