Skip to content

HiddenTextExpander

Table of contents
Table of contents

Use HiddenTextExpander to indicate and toggle hidden text.

Examples

Default

<%= render(Primer::HiddenTextExpander.new) %>

Inline

<%= render(Primer::HiddenTextExpander.new(inline: true)) %>

Styling the button

<%= render(Primer::HiddenTextExpander.new(button_arguments: { p: 1, classes: "my-custom-class" })) %>

Arguments

NameTypeDefaultDescription
inlineBooleanfalseWhether or not the expander is inline.
button_argumentsHash{}System arguments for the button element.
system_argumentsHashN/ASystem arguments