Details

readyNot reviewed for a11y
This page may be removed. Primer plans to move all Rails component documentation to Lookbook.

Description

Use DetailsComponent to reveal content after clicking a button.

Arguments

NameRequiredDescription
overlay
Symbol

Dictates the type of overlay to render with. One of :dark, :default, or :none.

reset
Boolean

Defaults to false. If set to true, it will remove the default caret and remove style from the summary element

disabled
Boolean

Whether or not to disable the summary button.

system_arguments

Slots

summary

Use the Summary slot as the target for toggling the Details content open/closed.

NameRequiredDescription
button
Boolean

Whether or not to render the summary element as a button.

aria_label_open
String

Defaults to "Collapse". Value to announce when details element is open.

aria_label_closed
String

Defaults to "Expand". Value to announce when details element is closed.

body

Use the Body slot as the main content to be shown when triggered by the Summary.

NameRequiredDescription
tag
Symbol

One of :details-dialog, :details-menu, :div, or :ul.

kwargs
Hash

The same arguments as System arguments.

Methods

disabled

Returns the value of attribute disabled.

disabled?

Returns the value of attribute disabled.

open

Returns the value of attribute open.

open?

Returns the value of attribute open.