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
Installation
Related Components
Disabled Textarea
Fully disabled non-interactive state
Simple Textarea
Fully editable basic textarea
Read-only Input
Read-only single-line input
Textarea with Label
Label above textarea for context
Basic Card
Alternative for displaying static text
Code Block
Formatted read-only code display
FAQ
Was this page helpful?
Sign in to leave feedback.