Skip to content

Show/Hide

Design guidelines

Show/Hide is used to show more of the same content that is already visible. For example a list of items or attributes that is longer than its initial container view allows.

HTML
React
Angular

Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.

This content is hidden by default. Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.

<certara-show-hide>
<p>Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.</p>
<div slot="hidden-content">
<p>
This content is hidden by default. Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.
</p>
</div>
</certara-show-hide>
import { CertaraShowHide } from '@certara/certara-ui-react';
<CertaraShowHide>
<p>Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.</p>
<div slot="hidden-content">
<p>
This content is hidden by default. Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.
</p>
</div>
</CertaraShowHide>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-show-hide>
<p>Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.</p>
<div slot="hidden-content">
<p>
This content is hidden by default. Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.
</p>
</div>
</certara-show-hide>

closedLabel

Attributeclosed-label
Typestring
Default'Show more'
Requiredfalse
DescriptionDefault label for closed state

open

Attributeopen
Typeboolean
Defaultfalse
Requiredfalse
DescriptionHidden content will be visible

openedLabel

Attributeopened-label
Typestring
Default'Show less'
Requiredfalse
DescriptionDefault label for opened state
NameDescriptionBubbles
certaraClicktrue

There are no public methods available for this component

NameDescription
Container for visible content
hidden-contentContainer for the hidden content

Show/Hide is used to show more of the same content that is already visible. For example a list of items or attributes that is longer than its initial container view allows.

Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.

Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus. Lacinia neque, sit amet dictum enim enim ut libero. Pellentesque sagittis tellus.

The Show/Hide uses the link button style with left icon placement. It includes the plus (+) icon by default and is labeled “Show More”. When selected, the icon changes to a minus (-) and the label changes to “Show Less”.

Use Show/Hide in sections or containers that are compact but include additional information that should be accessible. This component is generally used individually as needed and does not appear in groups.

  • Show/Hide is keyboard operable.
  • The Show/Hide requires javascript. Creating this widget in a frontend framework (or with vanilla javascript) would involve:
    • A button (or a control with role=“button”) that acts as the control that toggles display.
    • Adding aria-expanded with either true or false to convey to assistive technology whether the widget is expanded or not.
    • Adding aria-controls with with the value of the id from the element whose visibility is being toggled. Screen reader support for this is sparse, but this association may allow for easier reference via CSS or script.
  • For more information, see our accessibility guidelines.
View component in Figma