Rokkit 1.0.3

Inputs

Form field with label, description, and validation states

InputField is a self-contained form field from @rokkit/forms. It wraps a label, the input element, an optional description, and a validation message — all driven by data attributes that themes style.

Live Demo

Used on your public profile

States

Pass a status prop ('pass' or 'fail') to show validation state. The optional message prop shows helper text below the field.

Enter a valid email address
Looks good!
svelte
Highlighting code...

Input Types

The type prop maps to standard HTML input types plus 'textarea' and 'integer' (number with step="1").

With Description

Use description to show helper text below the field (always visible).

Lowercase letters, numbers, and underscores only.

Props

PropTypeDescription
namestringHTML name attribute (required)
labelstringField label text
typestringInput type: text, email, password, number, integer, textarea
valueanyBindable field value
placeholderstringPlaceholder text
status'pass' | 'fail'Validation state
messagestring | {state, text}Helper or error message below field
descriptionstringPersistent helper text
disabledbooleanDisables the field
iconstringIcon class to show inside the input