TextInputInfoView

public struct TextInputInfoView
extension TextInputInfoView: View
extension TextInputInfoView: _ViewEmptyChecking

A protocol that combines informational and counter capabilities for use below a text input field.

This protocol enables a unified component to display auxiliary content beneath a TextField, such as an optional icon, descriptive text, and a character/input counter. The appearance (e.g., color, styling) is controlled via modifiers like .textInputInfoViewStyle(.success), .error, .informational, or .warning.

Usage example:

TextInputInfoView(
    icon: Image(systemName: "checkmark.circle"),
    description: AttributedString("Valid input"),
    counter: AttributedString("10/50")
)
.textInputInfoViewStyle(.success)
.textInputInfoViewStyle(.error)
.textInputInfoViewStyle(.informational)
.textInputInfoViewStyle(.warning)
  • Undocumented

    Declaration

    Swift

    public init(@ViewBuilder icon: () -> any View = { EmptyView() },
                @ViewBuilder description: () -> any View = { EmptyView() },
                @ViewBuilder counter: () -> any View = { EmptyView() },
                componentIdentifier: String? = TextInputInfoView.identifier)
  • Undocumented

    Declaration

    Swift

    static let identifier: String
  • Undocumented

    Declaration

    Swift

    init(icon: Image? = nil,
         description: AttributedString? = nil,
         counter: AttributedString? = nil)
  • Undocumented

    Declaration

    Swift

    init(_ configuration: TextInputInfoViewConfiguration)
  • Declaration

    Swift

    @MainActor
    public var body: some View { get }
  • Undocumented

    Declaration

    Swift

    public var isEmpty: Bool { get }