Command Palette

Search for a command to run...

Components · Core component

Disclosure

Disclosure

A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.

The default <Disclosure> dictating the layout and borders of multiple Disclosure components.

Usage

TSX
import { Disclosure } from '@console/nimbus-ui/core';

Examples

Variant

Disclosures come in four distinct visual variants= enclosed | outline | subtle | plain.

No Icon

The default <Disclosure> without an icon.

Custom Icon

The default <Disclosure> with a custom icon.

Custom Icon Render Props

The default <Disclosure> with a custom icon. This example uses custom render props to control the icon displayed.

Default Expanded

Use defaultExpanded prop to control the initial expanded state.

Disabled

Use isDisabled prop to control the disabled state.

API

Disclosure

PropTypeDefaultDescription
data-rac-idstring—
data-testidstring—
variantenumoutline

Disclosure.Header

PropTypeDefaultDescription
classNamestring—

DisclosureGroup

PropTypeDefaultDescription
data-testidstring—
variantenumenclosed

DisclosureGroup

A DisclosureGroup is a grouping of related disclosures, usually called an accordion. It supports both single and multiple expanded items.

The default <DisclosureGroup> dictating the layout and borders of multiple Disclosure components.

Usage

TSX
import { DisclosureGroup, Disclosure } from '@console/nimbus-ui/core';

Examples

Variant

Disclosures groups come in four distinct visual variants: enclosed, outline, subtle, and plain.

Allows Multiple

Whether multiple disclosure items can be expanded at the same time.

Disabled

Applying the isDisabled prop prevents user interaction and applies a dimmed visual state to the entire group.

API

Disclosure

PropTypeDefaultDescription
data-rac-idstring—
data-testidstring—
variantenumoutline

Disclosure.Header

PropTypeDefaultDescription
classNamestring—

DisclosureGroup

PropTypeDefaultDescription
data-testidstring—
variantenumenclosed