Component
With Helper Input
Input fields with helper text, hints, and guidance for users
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/input/with-helper/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Input/with-helper Tailwind/Components/Input/with-helper <!-- With Helper - Text -->
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Username</label>
<input type="text" placeholder="Choose a username" class="w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors" />
<p class="mt-1.5 text-sm text-gray-500">Must be 3-20 characters. Letters, numbers, and underscores only.</p>
</div>
<!-- With Helper - Hint -->
<div class="mt-6">
<label class="block text-sm font-medium text-gray-700 mb-1">API Key</label>
<input type="password" placeholder="sk-..." class="w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors" />
<p class="mt-1.5 text-sm text-purple-600">
<span class="inline-flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
Find your API key in Settings → Developer
</span>
</p>
</div>
<!-- With Helper - Tooltip -->
<div class="mt-6">
<div class="flex items-center gap-1">
<label class="block text-sm font-medium text-gray-700">Project ID</label>
<button type="button" class="text-gray-400 hover:text-gray-600">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</button>
</div>
<input type="text" placeholder="proj_xxxxxxxx" class="w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-colors" />
<p class="mt-1.5 text-sm text-gray-500">Your unique project identifier. Starts with <code class="px-1 py-0.5 bg-gray-100 rounded">proj_</code></p>
</div>
<!-- With Helper - Link -->
<div class="mt-6">
<label class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" placeholder="Create a strong password" class="w-full px-4 py-2.5 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors" />
<p class="mt-1.5 text-sm text-gray-500">
Must be at least 8 characters.
<a href="#" class="text-blue-600 hover:text-blue-800 hover:underline">Password requirements</a>
</p>
</div> # With Helper
Input with helper text.
## Usage
```bash
npx devsnips add Tailwind/Components/Input/with-helper
```
Copy from `code.html`.
## File Structure
`code.html` · `preview.html` · `metadata.json` · `README.md` 44 lines UTF-8 · LF · Spaces: 2
Continue browsing