theme/material3/textfield.go
Functions
func PaintTextField
func (p TextFieldPainter) PaintTextField(canvas widget.Canvas, st textfield.PaintState) {
if st.Bounds.IsEmpty() {
return
}
colors := p.resolveColors()
m3PaintTextFieldBg(canvas, st, colors)
m3PaintTextFieldBorder(canvas, st, colors)
m3PaintTextFieldContent(canvas, st, colors)
m3PaintTextFieldCursor(canvas, st, colors)
m3PaintTextFieldError(canvas, st, colors)
}
Structs
type TextFieldPainter struct
TextFieldPainter renders text fields using Material 3 design tokens.
It implements the outlined text field variant with theme-derived colors.
If Theme is nil, TextFieldPainter falls back to the default M3 purple palette.
type TextFieldPainter struct {
Theme *Theme // nil uses default M3 purple fallback
}
PaintTextField renders a text field according to Material 3 specifications.