Documentation
¶
Index ¶
Constants ¶
View Source
const ( WidgetToggle = "toggle" WidgetSelect = "select" WidgetChips = "chips" WidgetCodeEditor = "code-editor" WidgetJSONEditor = "json-editor" WidgetKeyValue = "key-value" )
Built-in widget identifiers exposed by the registry.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry selects widget renderers for fields based on explicit hints or registered matchers. Higher priority wins; ties fall back to registration order. An empty registry never resolves a widget.
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry constructs a registry with the built-in widget matchers registered.
func (*Registry) Decorate ¶
Decorate implements model.Decorator, applying registry resolution to every field in the form. When a widget is resolved, both Metadata["widget"] and UIHints["widget"] are set to the chosen name, preserving existing values when present.
Click to show internal directories.
Click to hide internal directories.