@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Adapter for floating-point numbers.

    Strips non-numeric characters (except ., e, E, +, -), parses to a number, and displays with locale-based formatting. The value output is the clean number string. Shows a calculator prefix icon.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • Optionallocale: string

      Returns FloatTextAdapter

    Properties

    prefixIcon: "<rect width=\"16\" height=\"20\" x=\"4\" y=\"2\" rx=\"2\" /><line x1=\"8\" x2=\"16\" y1=\"6\" y2=\"6\" /><line x1=\"16\" x2=\"16\" y1=\"14\" y2=\"18\" /><path d=\"M16 10h.01\" /><path d=\"M12 10h.01\" /><path d=\"M8 10h.01\" /><path d=\"M12 14h.01\" /><path d=\"M8 14h.01\" /><path d=\"M12 18h.01\" /><path d=\"M8 18h.01\" />" = UIIcons.Lucide.Math.Calculator

    Optional SVG icon content to display before the input.

    Should be a Lucide SVG inner-content string (e.g. UIIcons.Lucide.Text.AtSign).

    Methods

    • Optional display formatter.

      When present, the native input element shows the string returned by this method instead of the raw toValue result. Use this to add locale-specific formatting (e.g. thousands separators) while keeping value() as the clean programmatic output.

      Parameters

      • value: string

        The adapted value produced by toValue.

      Returns string

      Formatted string to display in the input element.

    • Transform the raw text into the adapted value.

      Called on every input event. The result is stored in the value model and written back to the native input element, so the user sees the adapted text. The original keystrokes are preserved in the text model.

      Parameters

      • text: string

        Raw text from the input element.

      Returns string

      Adapted value string (displayed in the field and emitted via value).

    • Validate the raw text and return a result indicating whether the current input is valid.

      When present, UIInput exposes a valid signal and applies the invalid host class when validation fails.

      Parameters

      • text: string

        Raw text from the input element.

      Returns TextAdapterValidationResult

      Validation result with valid flag and error messages.