Component

With Suffix Input

Input fields with suffixed text, units, or action buttons

  • Component
  • Tailwind
  • MIT

Preview

Live component

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

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Input/with-suffix
registry path: Tailwind/Components/Input/with-suffix

Source

Implementation

code.html
<!-- With Suffix - Weight -->
<div class="relative">
  <label class="block text-sm font-medium text-gray-700 mb-1">Package Weight</label>
  <input type="number" placeholder="0.00" class="w-full pl-4 pr-14 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" />
  <span class="absolute inset-y-0 right-0 flex items-center pr-4 pointer-events-none text-gray-500">kg</span>
</div>

<!-- With Suffix - Button -->
<div class="relative mt-4">
  <label class="block text-sm font-medium text-gray-700 mb-1">Username</label>
  <input type="text" placeholder="Choose a username" class="w-full pl-4 pr-24 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" />
  <button type="button" class="absolute inset-y-0 right-0 px-4 bg-blue-600 text-white text-sm font-medium rounded-r-lg hover:bg-blue-700 transition-colors">Check</button>
</div>

<!-- With Suffix - Dimension -->
<div class="relative mt-4">
  <label class="block text-sm font-medium text-gray-700 mb-1">Dimensions</label>
  <div class="flex items-center gap-2">
    <input type="number" placeholder="Length" class="w-full pl-4 pr-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" />
    <span class="text-gray-400">×</span>
    <input type="number" placeholder="Width" class="w-full pl-4 pr-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" />
    <span class="text-gray-400">×</span>
    <input type="number" placeholder="Height" class="w-full pl-4 pr-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" />
    <span class="text-gray-500 text-sm">cm</span>
  </div>
</div>

<!-- With Suffix - Upload -->
<div class="relative mt-4">
  <label class="block text-sm font-medium text-gray-700 mb-1">File Size Limit</label>
  <input type="number" placeholder="Maximum file size" class="w-full pl-4 pr-20 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" />
  <span class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
    <select class="bg-transparent text-gray-500 text-sm focus:outline-none cursor-pointer">
      <option>MB</option>
      <option>GB</option>
    </select>
  </span>
</div>
38 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://components/input/with-suffix
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/input/with-suffix/

Install: npx devsnips add
Tailwind/Components/Input/with-suffix

This is the With Suffix Input — Input fields with suffixed text, units, or action buttons

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://components/input/with-suffix