Documentation
¶
Overview ¶
Package pill renders a labeled cycle selector - "type ‹ Task ›" - a compact one-of chooser for a form field that needs no text area. It is the counterpart to titlebox: where a box frames somewhere to type, a pill frames a value stepped through a fixed set, so the two read as distinct affordances.
Like titlebox it is style-agnostic: the label and chevron colors arrive through Styles, so a caller signals focus by handing it a brighter pair.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chevrons ¶ added in v0.2.5
Chevrons is the glyph pair framing the value. The glyphs travel as a pair: the zero value renders the default "‹ ›", and an override only applies when both are set, so a half-set pair can never render lopsided.
type Styles ¶
type Styles struct {
// Label styles the field name to the left of the value.
Label lg.Style
// Chevron styles the markers that frame the value.
Chevron lg.Style
// Chevrons overrides the marker glyphs (both together, or neither).
Chevrons Chevrons
}
Styles are the pill's injected render styles, so the widget stays theme-agnostic: a caller signals focus by handing it a brighter pair.