Skip to main content
VelinStyle v1.3.0
⌂ Home
  1. Docs
  2. Forms
  3. Form Control

Form Control 1.2.2

Style text inputs and textareas with .velin-input. Supports sizing, disabled, readonly, and plaintext states. Deutsch: Formularsteuerung

Maturity: .velin-input / .velin-textarea are stable in 1.2.0. Error/success modifiers and [aria-invalid] borders ship in the core CSS.

When to use

When not

Text inputs

Apply .velin-input to any text-type <input> for consistent cross-browser styling.

<input type="text" class="velin-input" placeholder="Enter text">
<input type="email" class="velin-input" placeholder="name@example.com">
<input type="password" class="velin-input" placeholder="Password">

Textarea

The .velin-input class also works on <textarea> elements.

<textarea class="velin-input" rows="4" placeholder="Write something..."></textarea>

Sizing & density

Controls default to a minimum block size of 2.75rem (44px) for touch and pointer targets. Adjust density with spacing utilities and layout — there are no .velin-input--sm / .velin-input--lg modifiers in 1.2.0.

<div class="velin-field">
  <label class="velin-label" for="name">Default density</label>
  <input type="text" class="velin-input" id="name" placeholder="Min 44px target">
</div>

Disabled

Add the disabled attribute to grey out the input and prevent interaction.

<input type="text" class="velin-input" placeholder="Disabled input" disabled>
<textarea class="velin-input" placeholder="Disabled textarea" disabled></textarea>

Readonly

The readonly attribute prevents editing but keeps normal styling. Add .velin-input--plaintext to strip borders and background.

<input type="text" class="velin-input" value="Cannot edit this" readonly>
<input type="text" class="velin-input velin-input--plaintext" value="email@example.com" readonly>

File input

<input type="file" class="velin-input">
<input type="file" class="velin-input" multiple>

Color input

<input type="color" class="velin-input velin-input--color" value="#0d6efd">

Accessibility