Skip to content
API reference

components/disclosure

Import
import * as api from "@fungi.computer/caps/components/disclosure";
Kind Export Description
type alias DisclosureTone Semantic tone of the disclosure header.
type alias DisclosureSize Density: group for a summary header, row for a compact nested row.
type alias DisclosureProps Props accepted by Disclosure.
function Disclosure() A controlled one-line disclosure over Base UI Collapsible. The header is a native button carrying aria-expanded and aria-controls, so Enter and Space toggle it.

DisclosureTonetype alias

Section titled “DisclosureTone”
Signature
type DisclosureTone = "neutral" | "error";

Semantic tone of the disclosure header.


DisclosureSizetype alias

Section titled “DisclosureSize”
Signature
type DisclosureSize = "group" | "row";

Density: group for a summary header, row for a compact nested row.


DisclosurePropstype alias

Section titled “DisclosureProps”
Signature
type DisclosureProps = Readonly<{
open: boolean;
onOpenChange: (open) => void;
summary: ReactNode;
leading?: ReactNode;
trailing?: ReactNode;
children?: ReactNode;
tone?: DisclosureTone;
size?: DisclosureSize;
className?: string;
}>;

Props accepted by Disclosure.

Disclosure()function

Section titled “Disclosure()”
Signature
function Disclosure(__namedParameters): Element;

A controlled one-line disclosure over Base UI Collapsible. The header is a native button carrying aria-expanded and aria-controls, so Enter and Space toggle it.

Parameter Type
__namedParameters DisclosureProps

Element