Launch sale — 60% off Pro
Contact
TextareaStandard

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Read-only Textarea

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

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


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.

Pattern created by @haydenbleasel

Installation

Questions you might have