Floating Label Input JS
FloatingLabelInput can be applied to any input. It appends a label on top of an input, and adds aria-label
for accessibility.
Base
Starting Value
Original
import {FloatingLabelInput} from 'uniform';
const input = new FloatingLabelInput({
label: 'Name'
}).render()
document.append(input.el)
Options
Option | Type | Description | |
---|---|---|---|
label |
String |
Label to float. | REQUIRED |
input |
Object || Element |
What to use for the input. If not element, then it will render using options passed to input |
OPTIONAL |
class: "text-red", ... |
Accepts any html attribute that is then appended to the element that wraps the input. | OPTIONAL |