Component

Filled Input

Input fields with solid background colors that shift on focus

  • Component
  • Tailwind
  • MIT

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.dev/library/tailwind/components/input/filled/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Input/filled
registry path: Tailwind/Components/Input/filled

Source

Implementation

code.html
<!-- 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>
23 lines UTF-8 · LF · Spaces: 2

AI-ready

Available to your agent.

This component is reachable through the DevSnips CLI, MCP server and Skills integrations — one registry, one resource path.

Resource path

devsnips://components/input/filled

Continue browsing

View all