Skip to content

Floating Labels

Floating labels sit inside the field and move up once a value is entered, saving vertical space in sign-in, checkout and contact forms.

1Email and password

The classic pair; the placeholder is required for the label animation.

2Textarea

A floating label on a textarea.

3Taller textarea

Set a height instead of rows - rows is ignored inside form-floating.

4Select

Floating labels work with selects too; the label always stays up.

5Disabled

Disabled floating fields keep the label readable.

6Read-only plain text

form-control-plaintext with a floating label displays a saved value.

7In an input group

A floating field inside an input group with a leading addon.

@

8With validation

Feedback below a floating field inside an input group with has-validation.

Enter a complete email address.

9Grid layout

Floating fields in a responsive row with gutters.

10Sign-in card

A compact sign-in form built with floating labels.

Sign in to Yaraly Works

11Shipping address

Address fields with floating labels in a 2 / 1 split.

12Date field

Date inputs always show their label floated because the browser draws a format hint.

13Number with addon

An amount with a currency addon next to a floating label.

USD

14Pre-filled values

With a value present the label starts in its floated position.

15Contact form

Name, email, topic and message - a full contact form with floating labels.

16Payment details

Card fields laid out with floating labels and a lock note.

Payments are encrypted.

17Search with button

A large floating search field joined to an icon button.

18Dark mode

Floating labels inside a dark section.

19With help text

Help text sits below the floating container, linked by aria-describedby.

Lowercase letters, numbers and dashes only.

20Feedback form

A rating select and comment textarea for quick feedback.

How was your secure file sharing?