API reference
components/disclosure
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/disclosure";Exports
Section titled “Exports”| 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”type DisclosureTone = "neutral" | "error";Semantic tone of the disclosure header.
DisclosureSizetype alias
Section titled “DisclosureSize”type DisclosureSize = "group" | "row";Density: group for a summary header, row for a compact nested row.
DisclosurePropstype alias
Section titled “DisclosureProps”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()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
DisclosureProps |
Returns
Section titled “Returns”Element