Skip to content

Disclosure

Design guidelines

Disclosures are expandable areas of content that are summarized or otherwise labeled to indicate what they relate to. There is a trigger that must be manually selected which allows the user to show and hide the additional content that is available.

HTML
React
Angular
Click the component to disclose its content.
Content of the disclosure is now shown
<certara-disclosure summary="Label">Content of the disclosure is now shown</certara-disclosure>
import { CertaraDisclosure } from '@certara/certara-ui-react';
<CertaraDisclosure summary="Label">Content of the disclosure is now shown</CertaraDisclosure>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-disclosure summary="Label">Content of the disclosure is now shown</certara-disclosure>

Custom summary

More complex formatting is available within a slot="custom-summary" element
<certara-disclosure>
<div slot="custom-summary">
<h3>
<certara-icon icon="bell" role="presentation"></certara-icon>
Custom summary
</h3>
</div>
More complex formatting is available within a
<code>slot="custom-summary"</code>
element
</certara-disclosure>
import { CertaraDisclosure, CertaraIcon } from '@certara/certara-ui-react';
<CertaraDisclosure>
<div slot="custom-summary">
<h3>
<CertaraIcon icon="bell" role="presentation" />
Custom summary
</h3>
</div>
More complex formatting is available within a
<code>slot="custom-summary"</code>
element
</CertaraDisclosure>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-disclosure>
<div slot="custom-summary">
<h3>
<certara-icon icon="bell" role="presentation"></certara-icon>
Custom summary
</h3>
</div>
More complex formatting is available within a
<code>slot="custom-summary"</code>
element
</certara-disclosure>
Caret aligns to summary baseline
<certara-disclosure summary="Default" description="Baseline alignment" align-items="baseline">
Caret aligns to summary baseline
</certara-disclosure>
import { CertaraDisclosure } from '@certara/certara-ui-react';
<CertaraDisclosure summary="Default" description="Baseline alignment" alignItems="baseline">
Caret aligns to summary baseline
</CertaraDisclosure>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-disclosure summary="Default" description="Baseline alignment" align-items="baseline">
Caret aligns to summary baseline
</certara-disclosure>

alignItems

Attributealign-items
Type"baseline" | "center" | "end" | "start"
Defaultundefined
Requiredfalse
DescriptionControl vertical alignment of disclosure triange

arrowEnd

Attributearrow-end
Typeboolean
Defaultfalse
Requiredfalse
DescriptionDisclosure arrow will show at the end of the content

description

Attributedescription
Typestring
Defaultundefined
Requiredfalse
DescriptionDescription text that appears below label

hasHover

Attributehas-hover
Typeboolean
Defaulttrue
Requiredfalse
DescriptionControls the default hover effect

hasPadding

Attributehas-padding
Typeboolean
Defaultundefined
Requiredfalse
DescriptionContent is padded to be flush with the opener DEPRECATED. Use layout instead. Will be removed in the next major version.

innerClassName

Attributeinner-class-name
Typestring
Defaultundefined
Requiredfalse
DescriptionAdditional class name(s) to apply to the inner content wrapper

layout

Attributelayout
Type"indented" | "none"
Defaultundefined
Requiredfalse
DescriptionArrangement of the revealed content. indented pads the content to be flush with the opener. Defaults to none.

open

Attributeopen
Typeboolean
Defaultfalse
Requiredfalse
DescriptionHidden content will be visible

summary

Attributesummary
Typestring
Defaultundefined
Requiredfalse
DescriptionVisible label of the disclosure control

There are no events available for this component

There are no public methods available for this component

NameDescription
Content hidden by the disclosure goes in the main slot
custom-descriptionSlot available if description requires custom formatting
custom-summarySlot available if summary requires custom formatting

Disclosures are expandable areas of content that are summarized or otherwise labeled to indicate what they relate to. There is a trigger that must be manually selected which allows the user to show and hide the additional content that is available.

Click the component to disclose its content.
The hidden content that is now shown.

The Disclosure component simplifies the user experience by revealing interfaces upon request. It combines inline and block layout components to improve readability, allowing users to easily scan and comprehend the content for a better overall experience.

  • Disclosures have two main parts:
    • The trigger that opens and closes the related content.
    • The container that displays the disclosed content.
  • The disclosed content may include interactive elements.
  • Disclosures are collapsed by default. However, the default state can be changed if needed.
  • More than one disclosure item can be expanded at one time.
  • Disclosure triggers are keyboard operable.
  • The Disclosure is a native browser control and does not require additional JS.
  • For more information, see our accessibility guidelines.
W3C guidelines for accessible disclosure UIView component in Figma