Component
Filled Input
Input fields with solid background colors that shift on focus
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/input/filled/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Input/filled Tailwind/Components/Input/filled <!-- Filled Input - Default -->
<div class="relative">
<label class="block text-sm font-medium text-gray-700 mb-1">Username</label>
<input type="text" placeholder="Enter username" class="w-full px-4 py-3 bg-gray-100 border-0 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white transition-colors" />
</div>
<!-- Filled Input - Colored -->
<div class="relative mt-4">
<label class="block text-sm font-medium text-gray-700 mb-1">With Background</label>
<input type="text" placeholder="Type something" class="w-full px-4 py-3 bg-blue-50 border-0 rounded-lg text-blue-900 placeholder-blue-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors" />
</div>
<!-- Filled Input - Dark -->
<div class="relative mt-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Dark Fill</label>
<input type="text" placeholder="Dark style" class="w-full px-4 py-3 bg-gray-800 border-0 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-400 transition-colors" />
</div>
<!-- Filled Input - Soft Rounded -->
<div class="relative mt-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Soft Rounded</label>
<input type="text" placeholder="Fully rounded" class="w-full px-4 py-3 bg-gray-100 border-0 rounded-full focus:outline-none focus:ring-2 focus:ring-purple-500 focus:bg-purple-50 transition-colors" />
</div> # Filled Input
Filled surface text input.
## Usage
```bash
npx devsnips add Tailwind/Components/Input/filled
```
Copy from `code.html`.
## File Structure
`code.html` · `preview.html` · `metadata.json` · `README.md` 23 lines UTF-8 · LF · Spaces: 2
Continue browsing