Atoms / Collapsible

Collapsible

One section that folds. Short stepped motion, none under reduced motion.

import { Collapsible } from "@forgeron/ui";
/01 → Section
import { Collapsible } from "@forgeron/ui";

export default function Section() {
  return (
    <div style={{ width: "min(100%, 420px)" }}>
      <Collapsible title="Advanced options" hint="3">
        Retries, timeouts and the region the tool runs in.
      </Collapsible>
    </div>
  );
}
API → Props
PropTypeDefaultDescription
titleReactNode—The button that folds and unfolds.
hintReactNode—Mono text at the end of the header.
open / defaultOpen / onOpenChangeboolean / boolean / (open) => void—Controlled or not.
keepMountedboolean—Keeps the content in the page while folded.
variant"framed" | "plain""framed"A frame, or a line only.
disabledboolean—Not editable.
classNamestring—Extra classes.