Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

Read-only Textarea

Read-only textarea using readOnly prop for non-editable display with selectable text and normal appearance included in form submissions

Sometimes you need to display text users can read and copy but not edit—that's readOnly territory. This React textarea uses shadcn/ui's readOnly prop keeping normal styling and focus ability while preventing typing—users can select text, copy content, even tab to it—just can't change it. Built with Radix UI accessibility and defaultValue for initial content, read-only textareas stay in form submissions unlike disabled—perfect for displaying API responses, showing calculated values, presenting terms of service, confirmation previews, or any interface where text needs visibility and copyability without editability.

Read-only Textarea preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.