BeginField#
func BeginField(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect) FieldBeginField starts a vertical field group.
type Field struct {
// contains filtered or unexported fields
}Field is a structural form recipe. It paints label, description, and error slots, then returns the rectangle reserved for the caller-owned control. It deliberately does not impersonate an input or own editor state.
BeginField#func BeginField(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect) FieldBeginField starts a vertical field group.
Disabled#func (field Field) Disabled() FieldDisabled mutes field metadata. The caller remains responsible for making the control painted into the returned slot inert.
For#func (field Field) For(control ui.ID) FieldFor makes the title the label of the control painted into the returned slot, as `htmlFor` does: pressing the title focuses and clicks the control (see ui.Canvas.HitLabel). The caller declares the control itself, with that identity.
Invalid#func (field Field) Invalid() FieldInvalid applies destructive title and error semantics.
Orientation#func (field Field) Orientation(orientation FieldOrientation) FieldOrientation selects vertical, horizontal, or width-responsive layout.
Paint#func (field Field) Paint(title, description, errorText string) ui.RectPaint emits metadata slots and returns the control rectangle. Error is caller-deduplicated: avoiding a runtime map keeps paint deterministic and allocation-free while preserving Base UI's alert treatment. For several errors paint the control's slot yourself and use FieldError.
Required#func (field Field) Required() FieldRequired appends a destructive required marker to the title.