rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

Collapsible

Single expandable section that reveals or hides its content on toggle.

Examples

Basic toggle

Simple show/hide section triggered by a header button.

Default open

Collapsible that starts in the expanded state.

With icon

Trigger includes a leading icon for visual context.

Nested

Collapsible sections within collapsible sections.

Settings Panel

Collapsible used as a settings section.

File Tree

Collapsible sections forming a file tree structure.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { Collapsible } from "@rokle/components";
import { Collapsible } from "@rokle/components";

export function Example() {
  return <Collapsible />;
}

API Reference

PropTypeDefaultDescription
openbooleanfalseWhether the section is expanded.
onOpenChange(open: boolean) => void-Called when open state changes.
childrenReactNode-Collapsible content.