lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
GitHub

Field

Label, helper, error and required — around any control.

Field is the form-field wrapper: it adds the label above, helper or error text below, and the required marker — around any control (Input, Select, Checkbox, a custom widget). The control knows nothing about it; composition, not slots.

Installation

Use the module import (the default), or own the source: lotusui add vendors the component into your app and lotusui update keeps the copy mergeable — see Registry.

Go
go get github.com/ikaito-com/lotusui

# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add field

Usage

open demo ↗

Helper text

Helper renders muted guidance under the control.

open demo ↗

Required

Required marks the label; validation stays yours.

open demo ↗

Error

Error replaces the helper with the message in danger ink — pair it with the control's own invalid chrome.

open demo ↗

Any control

The wrapped control is any layout.Widget — here a Select.

open demo ↗

API

OptionTypeDescription
LabelstringThe label above the control.
HelperstringMuted guidance below; recomputed each frame (counters).
ErrorstringReplaces Helper in danger ink.
RequiredboolMarks the label.

lotusui is a Go design system for native desktop and mobile — and the web when you want it. Docs demos are the real components (WebAssembly) — one gallery app, each Preview an iframe addressed by URL hash.