Skip to content

Field

Todo

Required icons

check
minus

Props

current-length?: number
The current length of the value.

error?: string
The error message shown after the input.

hint?: string
The hint message shown after the input.

is-optional?: boolean
Mark the field as optional.

label: string
The label of the field.

max-length?: number
The maximum length of the value.

Slots

default ({
    readonly id: string;
})

The input for the field.

addition ({
    readonly currentLength?: number;
    readonly error?: string;
    readonly hint?: string;
    readonly isOptional?: boolean;
    readonly label?: string;
    readonly maxLength?: number;
})

Any optional additions for the field.

value ({
    readonly currentLength?: number;
    readonly error?: string;
    readonly hint?: string;
    readonly isOptional?: boolean;
    readonly label?: string;
    readonly maxLength?: number;
})

An optional value that can be shown next to the label.