Skip to main content

Disclosure

A disclosure component is the implementation of native details and summary controls, which toggles the visibility of the extra content. Visually, it can look like a button or a hyperlink beneath extra content.

Use cases:

  • displaying a button that controls the visibility of a section of content
  • flagging an item as part of a category
  • showing the number of unread messages
note

When the controlled content is hidden, it is often styled as a typical push button with a right-pointing arrow or triangle that hints that the button will display additional content.

When the content is visible, the arrow or triangle typically points down.

Example

The example below displays a hyperlink to further content.

Read about Foundation UI
Foundation UI is a collection of technologies built on Web Components and modern Web Standards, designed to help you efficiently tackle some of the most common challenges in website and application design and development.

Declaration

<rapid-disclosure></rapid-disclosure>

Usage

@customElement({
name: 'my-element',
template: html`
<rapid-disclosure appearance="lightweight">
<strong slot="title">Read about Foundation UI</strong>
<div>
Foundation UI is a collection of technologies built on Web Components and modern Web Standards, designed to help you
efficiently tackle some of the most common challenges in website and application design and development.
</div>
</rapid-disclosure>
`,
})
export class MyElement extends GenesisElement {
}

API

This table shows attribute binding examples for Genesis Component syntax. The HTML closing tag is not included.

Attributes

NameTypeDescriptionExample
expandedbooleanIf the disclosure is expanded.
<rapid-disclosure expanded>

Properties

This component doesn't have any properties.

Slots

NameDescription
startContent that can be provided before the summary content.
endContent that can be provided after the summary content.
titleThe summary content.
DefaultThe default slot for the content that is displayed when the user clicks on the summary.

Parts

This component doesn't have any parts.

Events fired

This component doesn't fire any events.

Events listened to

This component doesn't listen to any events.