Skip to main content Home
About About the Design SystemRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridIconographySpacingTypography
Tokens Overview Global colorbox shadowTypographyborderopacityspacelengthIconBreakpointsMedia Queries
Elements All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Navigation (primary) Navigation (secondary) Pagination PopoverPlanned Progress stepsPlanned Site status Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Theming OverviewColor PalettesCustomizingDevelopers
Patterns All PatternsCardTabsFilterFormLinkLink with iconLogo wallSearch barSkip navigationSticky bannerSticky cardTileVideo thumbnail
Personalization All Personalization PatternsAnnouncement
Accessibility FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers
Design/code status Release notes Get support

Disclosure

OverviewStyleGuidelinesCodeAccessibilityDemos
ImportingUsagerh-disclosureImportingUsagerh-disclosure

Importing

Add rh-disclosure to your page with this import statement:

<script type="module">
  import '@rhds/elements/rh-disclosure/rh-disclosure.js';
</script>
Copy to Clipboard Wrap lines

To learn more about installing RHDS elements on your site using an import map read our getting started docs.

Lightdom CSS shim

Warning

Lightdom CSS shims are an optional, temporary solution for reducing CLS. Learn more about lightdom CSS shims .

<link rel="stylesheet" href="/path/to/rh-disclosure/rh-disclosure-lightdom-shim.css">

Note

Replace /path/to/ with path to the CSS file, whether local or CDN.

Usage

<rh-disclosure summary="Collapsed panel title">
  <p>Lorem ipsum dolor sit amet consectetur adipisicing, elit. Velit distinctio, nesciunt nobis sit, a dolor, non numquam rerum recusandae, deserunt enim assumenda quidem. Id impedit necessitatibus obcaecati ratione reprehenderit laborum?</p>
</rh-disclosure>

<script type="module">
  import '@rhds/elements/rh-disclosure/rh-disclosure.js';
</script>
Copy to Clipboard Wrap lines

rh-disclosure

A disclosure toggles the visibility of content when triggered.

Slots 2
Slot Name Description

Place the content you want to disclose in the default slot. This content is hidden by default.

summary

The title of the disclosure

Attributes 3
Attribute DOM Property Description Type Default
color-palette colorPalette

Set the colorPalette of the disclosure. Overrides parent context. Possible values are:

  • lightest (default)
  • lighter
  • light
  • dark
  • darker
  • darkest
ColorPalette | undefined
unknown
open open

Sets the disclosure to be in its open state

boolean
false
summary summary

Sets the disclosure title via an attribute

string | undefined
unknown
Methods 0
None
Events 1
Event Name Description
toggle

Fires when a user opens or closes a disclosure.

CSS Shadow Parts 1
Part Name Description
caret

The caret icon in the shadow DOM

CSS Custom Properties 0
None
Design Tokens 17
Token Copy
--rh-border-width-md
Full CSS Variable Permalink to this token
--rh-border-width-sm
Full CSS Variable Permalink to this token
--rh-box-shadow-sm
Full CSS Variable Permalink to this token
--rh-color-border-subtle
Full CSS Variable Permalink to this token
--rh-color-brand-red
Full CSS Variable Permalink to this token
--rh-color-interactive-primary-default
Full CSS Variable Permalink to this token
--rh-color-surface
Full CSS Variable Permalink to this token
--rh-color-surface-dark
Full CSS Variable Permalink to this token
--rh-color-surface-lighter
Full CSS Variable Permalink to this token
--rh-color-text-primary
Full CSS Variable Permalink to this token
--rh-font-family-body-text
Full CSS Variable Permalink to this token
--rh-font-size-body-text-md
Full CSS Variable Permalink to this token
--rh-font-weight-body-text-medium
Full CSS Variable Permalink to this token
--rh-line-height-body-text
Full CSS Variable Permalink to this token
--rh-space-lg
Full CSS Variable Permalink to this token
--rh-space-md
Full CSS Variable Permalink to this token
--rh-space-xl
Full CSS Variable Permalink to this token
© 2021-2025 Red Hat, Inc. Deploys by Netlify