Documentation
¶
Overview ¶
Package multiselect renders a checkbox-group inside a disclosure with chip rendering of the selected values above the trigger.
Output structure:
<div data-fui-comp="ui-multiselect">
<div class="ui-multiselect__chips" data-fui-multiselect-chips>
<!-- runtime fills with chips for each :checked option -->
</div>
<details class="ui-multiselect__disclosure">
<summary>Pick languages…</summary>
<fieldset role="group">
<label><input type="checkbox" name="…" value="…"> Go</label>
…
</fieldset>
</details>
</div>
Server gets standard checkbox-group submission semantics (Name repeats for each checked option). No RPC dance — apps that need server-fetched options should compose this with a partial render.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Name is the form-field name (required). All checkboxes share
// this name; the form receives the repeated key for each checked
// option.
Name string
// Label is the accessible label (required).
Label string
// Placeholder is the disclosure-summary text shown when no
// options are selected. Defaults to "Choose…".
Placeholder string
// Options are the choices (≥1).
Options []Option
// Open opts the disclosure into rendering open by default.
Open bool
// ID / Class / Attrs are passed through to the wrapper.
ID string
Class string
ExtraAttrs html.Attrs
}
Config configures a MultiSelect.
Click to show internal directories.
Click to hide internal directories.