Component

Disabled Readonly Input

Input fields with disabled and read-only states for non-editable content

  • Component
  • Tailwind
  • MIT

Preview

Live component

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

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Input/disabled-readonly
registry path: Tailwind/Components/Input/disabled-readonly

Source

Implementation

code.html
<!-- Disabled Input -->
<div>
  <label class="block text-sm font-medium text-gray-700 mb-1">Account ID</label>
  <input type="text" value="acc_1234567890" disabled class="w-full px-4 py-2.5 bg-gray-100 border border-gray-300 rounded-lg text-gray-500 cursor-not-allowed" />
  <p class="mt-1.5 text-xs text-gray-400">Account ID cannot be changed</p>
</div>

<!-- Read-only Input -->
<div class="mt-6">
  <label class="block text-sm font-medium text-gray-700 mb-1">Invoice Number</label>
  <input type="text" value="INV-2024-001234" readonly class="w-full px-4 py-2.5 bg-gray-50 border border-gray-300 rounded-lg text-gray-700 cursor-default" />
  <p class="mt-1.5 text-xs text-gray-400">Auto-generated invoice number</p>
</div>

<!-- Disabled with Icon -->
<div class="mt-6">
  <label class="block text-sm font-medium text-gray-700 mb-1">API Endpoint</label>
  <div class="relative">
    <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
      <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" />
      </svg>
    </div>
    <input type="text" value="https://api.example.com/v2" disabled class="w-full pl-10 pr-4 py-2.5 bg-gray-100 border border-gray-300 rounded-lg text-gray-500 cursor-not-allowed" />
  </div>
</div>

<!-- Read-only Floating -->
<div class="mt-6">
  <label class="block text-sm font-medium text-gray-700 mb-1">Subscription Plan</label>
  <div class="relative">
    <input type="text" value="Pro Plan" readonly class="w-full px-4 py-3 pt-5 pb-2 bg-blue-50 border border-blue-200 rounded-xl text-blue-700 font-medium" />
    <span class="absolute left-4 top-2 text-xs text-blue-500 font-medium">Current Plan</span>
  </div>
  <p class="mt-1.5 text-xs text-gray-400">Upgrade or downgrade in Billing settings</p>
</div>
36 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/disabled-readonly
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/input/disabled-readonly/

Install: npx devsnips add
Tailwind/Components/Input/disabled-readonly

This is the Disabled Readonly Input — Input fields with disabled and read-only states for non-editable content

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/disabled-readonly