An open API service indexing awesome lists of open source software.

https://github.com/unlight/tailwind-float-label

Tailwind plugin to add floating label, control with float label components
https://github.com/unlight/tailwind-float-label

float-label float-label-pattern floating-label tailwind-component tailwind-components tailwind-plugin tailwind-plugins tailwindcss-plugin

Last synced: 15 days ago
JSON representation

Tailwind plugin to add floating label, control with float label components

Awesome Lists containing this project

README

          

# tailwind-float-label

Tailwind plugin to add floating label, control with float label components

Demo - https://unlight.github.io/tailwind-float-label

## Setup and configuration

1. `npm install --save-dev tailwind-float-label`
2. Add `@import 'tailwind-float-label'` to your main css file
3. Configure css variable `--float-label-background-color` for background of
float label
4. Plugin provides classes which must be set for label and input to make label floats.
- `.float-container` Container which holds input control and label
- `.float-input` Form input control
- `.float-always` Use with `.float-container` to make label always visible (sticky)

```html


Full Name

```

If you need animation, add to `.float-label` following classes: `transition-all duration-200`

## Similar Projects

- https://github.com/notiz-dev/floating-form-field-tailwindcss

## Resources

- https://tailwindow.github.io/component-tailwindcss/components/form/input-text/index.html
- https://github.com/you-dont-need/You-Dont-Need-JavaScript#Floating
- https://csslayout.io/floating-label/
- https://tailwindcomponents.com/component/login-form-with-float-label-input

## License

[MIT License](https://opensource.org/licenses/MIT) (c) 2025