Selectors
Selectors are the behavior layer of the Form Definition API. While gui.inputs.*, gui.layouts.*, etc. describe the form’s structure, gui.selectors.* describes how those widgets should look and behave — by type, by tag, or by uid — without you having to weave that behavior into every shortcut call.
A selector is built by chaining methods off the gui.selectors root, then matching a target type and supplying a config:
import { gui } from '@golemui/gui-shared';
const formSelectors = [ // Suppress auto-labels on every input gui.selectors.inputs({ suppressAutomaticLabels: true }),
// For inputs tagged 'identity', also suppress auto-placeholders gui.selectors.tag('identity').inputs({ suppressAutomaticPlaceholders: true }),
// Hide a specific dropdown by uid in a particular state gui.selectors.state('loaded').dropdownByUid('country', { disabled: false }),];Pass the array as formSelectors on <gui-form>.
Read on
Section titled “Read on”- Type selectors —
inputs,dropdowns,actions, etc. - Chaining — composing scope methods.
- Scope operators —
tag,state. - Multi-value scope operators —
tagsAnd,tagsOr. - Sensible defaults — what the engine auto-fills for you.
- Precedence — the merge order between defaults, selectors, and shortcut props.
See also
Section titled “See also”- Form Definition Overview — the full
gui.*namespace.