Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Animated floating label that starts inside the input and moves above on focus or when filled. Material Design pattern that keeps the label always visible.
The data-floating-label attribute upscales the static <label> into an animated floating label. The label starts inside the input (like a placeholder) and smoothly animates above the border when the field gains focus or has a value. Unlike a placeholder, the label never disappears — the user always knows what the field is for.
<form-field data-floating-label> <label for="email">Email address</label> <input type="email" id="email"></form-field>
placeholder=" " to the input (if missing) so the CSS :placeholder-shown selector activates correctly. Marks the field as data-floating-label-ready.:focus-within — user focuses the field:not(:placeholder-shown) — field has a value| Attribute | On | Description |
|---|---|---|
data-floating-label |
<form-field> |
Enable floating label animation on this field. |
Works with all standard text-like inputs, textareas, and selects:
<form-field data-floating-label> <label for="name">Full name</label> <input type="text" id="name" required></form-field> <form-field data-floating-label> <label for="msg">Message</label> <textarea id="msg" rows="4"></textarea></form-field> <form-field data-floating-label> <label for="country">Country</label> <select id="country"> <option value="us">United States</option> <option value="uk">United Kingdom</option> </select></form-field>
Select elements float the label immediately since they always have a value.
Floating labels work alongside <form-field> validation. Required indicators, error messages, and valid states all function normally:
<form-field data-floating-label> <label for="email">Email</label> <input type="email" id="email" required aria-describedby="email-error"> <output id="email-error" class="error" for="email" aria-live="polite"></output></form-field>
<label> remains a real label with for binding — screen readers always announce it.pointer-events: none so clicking the label area focuses the input.prefers-reduced-motion — transitions are disabled.placeholder), maintaining context at all times.| Pattern | Label visible when typing? | Compact layout? |
|---|---|---|
| Standard label | Yes (always above) | No (takes vertical space) |
| Placeholder only | No (vanishes) | Yes |
| Floating label | Yes (floats up) | Yes (compact when empty) |