1. tailwind components
  2. forms

Forms and Inputs

Various form and input styles.

Account

Account Details
Shipping Address
Notes

Requirements

Skeleton relies on the official Tailwind Forms plugin to normalize form styling, also known as a reset. This plugin is required if you wish to use any form utility classes provided on this page.

View on Github

Install the @tailwindcss/forms package, then implement the @plugin directive in your global stylesheet.

sh
npm install -D @tailwindcss/forms
css
@import 'tailwindcss';
@plugin '@tailwindcss/forms';

/* ...Skeleton config here... */

Browser Support

The quality and appearance of native and semantic HTML form elements can vary between both operating systems and browser vendors. Skeleton does its best to adhere to progressive enhancement best practices. However, we advise you validate support for each element per your target audience.


Fieldsets

Use the optional .fieldset and .legend classes to group related form controls with an accessible title.

Account Details

Labels

Use .label and .label-text for styling the visible label text.

Input

Apply the .input class to all standard box-shaped input types .



Select

Apply the .select class to <select> elements for single or multiple option menus.

Textarea

Apply the .textarea class to <textarea> elements for multi-line text input.

Checkboxes

Use type="checkbox" for inputs that allow one or more independent options to be toggled on or off.

Radio Groups

Use type="radio" to present a set of mutually exclusive options where only one can be selected.

Range

Use type="range" to allow selection of a numeric value from a continuous or stepped range via a slider.

Progress

Use <progress> to indicate the completion status of a task, such as a file upload or loading operation.

Meter

Use <meter> to represent a scalar value within a known range, such as disk usage, battery level, or a score.

Color

Use type="color" to provide a native color picker for selecting a single color value.


Field Sizes

Use field-{size} paired with: xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl

xs sm base lg xl

Field Groups

Apply field-group to create a grouping of related box-shaped fields or buttons. This acts as a grid container, allowing for column configuration. Make use of Presets to style label columns.

View page on GitHub