Disclosure
Examples
Disclosure
Dark Modern
import {ReactNode} from "react"import {DisclosureActions,DisclosureBody,DisclosureDescription,DisclosureHeader,DisclosureLabel,DisclosureRoot,Icon,} from "@qui/react-vscode"export default function Showcase(): ReactNode {return (<DisclosureRoot className="w-full max-w-[300px]"><DisclosureHeader><DisclosureLabel>Label<DisclosureDescription>Description</DisclosureDescription></DisclosureLabel><DisclosureActions><Icon as="button" icon="new-file" /></DisclosureActions></DisclosureHeader><DisclosureBody>Suspendisse potenti. Maecenas eu egestas metus. Nulla eget placerat mi,et efficitur augue.</DisclosureBody></DisclosureRoot>)}
API
DisclosureRootProps
| Name & Description | Option(s) | Default |
|---|---|---|
The component used for the root node. It can be a React component or
element. |
| 'div' |
ReactNode | ||
The default value when uncontrolled. |
| |
Callback fired when panel visibility changes.
|
| |
The controlled state for the component's visibility. |
|
Type
| ElementType| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or
element.
Type
boolean
Description
The default value when uncontrolled.
Type
(isOpen: boolean,event?: SyntheticEvent,) => void
Description
Callback fired when panel visibility changes.
- isOpenThe updated state. If
true, the panel is visible. - eventthe DOM event that triggered the change.
Type
boolean
Description
The controlled state for the component's visibility.
DisclosureBodyProps
| Name & Description | Option(s) | Default |
|---|---|---|
Animate the hide/show of the body. |
| true |
The component used for the root node. It can be a React component or
element. |
| 'div' |
ReactNode | ||
Controlled id. If omitted, a unique identifier will be automatically
generated for accessibility. |
|
Type
boolean
Default
true
Description
Animate the hide/show of the body.
Type
| ElementType| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or
element.
Type
string
Description
Controlled id. If omitted, a unique identifier will be automatically
generated for accessibility.
DisclosureHeaderProps
Type
| ElementType| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or
element.
Type
string
Description
Controlled id. If omitted, a unique identifier will be automatically
generated for accessibility.