ThemeTextFieldStyle
public struct ThemeTextFieldStyle : TextFieldStyle
A custom text field style that applies theming based on a Theme context.
This style supports Material-style variants like filled, outlined, and underlined,
and adjusts typography, padding, shape, color, and focus indicators accordingly.
Parameters
variant
|
The visual style of the field (e.g. |
size
|
The field size which controls padding and font. |
shape
|
The shape used to clip and stroke the background (e.g. rounded, capsule). |
font
|
Optional font override using a |
isError
|
Whether to display the error state (e.g. red border and text). |
-
Initializes a new themed text field style with customization options.
Declaration
Swift
public init( variant: TextFieldVariant, size: TextFieldSize, shape: TextFieldShape, font: ThemeFontToken? = nil, isError: Bool ) -
The core method that builds the styled text field.
Declaration
Swift
public func _body(configuration: TextField<`Self`._Label>) -> some View