Documentation
¶
Overview ¶
Package disclosure renders a single styled <details>/<summary> disclosure section. Use it for one-off "click to reveal" content (FAQ rows, expandable help, advanced-options panels). Accordion composes Group + Stack of these; this is the primitive.
Output:
<details data-fui-comp="ui-disclosure" class="ui-disclosure"> <summary class="ui-disclosure__summary">Title</summary> <div class="ui-disclosure__body">…</div> </details>
Native semantics — keyboard, screen reader, "find in page" expansion all work without JavaScript.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Title is the always-visible summary text (required).
Title string
// Open opts the disclosure into rendering open by default.
Open bool
// ID / Class / Attrs are passed through to the <details>.
ID string
Class string
ExtraAttrs html.Attrs
}
Config configures a Disclosure.
Click to show internal directories.
Click to hide internal directories.