Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

OCR Extract File Upload Block for React

A scanning window with a skewed page, numbered region boxes you can show or hide, the recognised text as lines linked to their regions, an editable text box, a word count and Copy.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show recognised text next to the page it came from, with this file upload window for React with Base UI. It is the review window of Scribelift, a scanning desk for archivists. On one side a page of a parish register is drawn slightly skewed, as a real scan would be, with a numbered region box around each line of writing and a Switch that shows or hides the boxes. On the other, the recognised text is a list of lines, one per region, over an editable Textarea with a word count, a language Badge and a Copy Button. Choosing a line lights its region on the page, and choosing or focusing a region lights its line. The top bar's one Shine Button, Choose a scan, opens a File Upload picker. The window is framed by Guides and keeps one height. For digitisation tools, archives and any app that reviews recognition output.

FAQ

Does it read the scan?

No. The page and its six lines are typed sample data, and a file you choose is listed by name only and never opened. The status line says "Sample text, typed. Nothing is read." from load. No confidence number is shown, because none was measured. A real build would send the file to a recognition service and draw its boxes from the response.

What happens when I edit the text?

The text box is yours to change, and the word count, Copy and the "edited" note follow it. The line list and the regions stay as recognised, and the status line says "Edited: regions no longer match" so nobody thinks the boxes still describe the new words. Reload to start over.

What does Copy copy?

The whole text box, as it is now, and a polite message says "Text copied". If the clipboard refuses, the button says so.

What stays local, and how do I wire it to a server?

Everything. To make it real, post the chosen file to your recognition service, draw one region per word or line from its coordinates as percentages of the page, and fill the lines and the text box from its text.

How does it look on a phone?

The page sits above the text in a window of fixed height, each with its own scroll. The switch and the file picker stay in reach, and every button is at least 44 px tall.