shadcn.io is not affiliated with official shadcn/ui
Legal Assistant AI Block for Radix UI
Pick a clause type and a stance and read one of twelve typed clauses, with a word-level diff against the balanced wording, two lines on why it matters and a copy button.
Installation
Overview
Draft a clause in the stance you want, with this legal assistant for React with Radix UI. A header names Clausebrook, a clause library, and a hairline frame holds two cells. At the start four clause types (termination, limitation of liability, confidentiality, payment terms) are a radio list, a Native Select on a phone, with a "Show differences" Switch under them. At the end a Toggle Group picks the stance, favours us, balanced or favours them, and the clause is shown in a scroll region. With differences on, a real word-level diff against the balanced wording is worked out in the page: words that come in are underlined and words that go are struck, and the heading counts how many differ. Under it, two lines say why it matters, and a Copy Button puts the plain clause on the clipboard. The frame is ruled by Guides.
FAQ
What stays local, and how do I wire it for real?
All of it. The twelve clauses and their explanations are typed at the top of the file, written for a supplier ("us") and a customer ("them"), and no model drafts them. The diff is computed in the page by a longest-common-run table over words. To make it real, load your own clause library into the same Variant shape, or generate a variant on the server and feed it in.
Is this legal advice?
No. It says "Sample wording, not legal advice" under the clause and in the status area. The clauses are illustrations for a demo, and a real agreement needs a lawyer who knows the law that applies to it.
How does the diff work?
Both texts are split into words, the longest sequence of words they share is found, and everything else is marked as added (underlined) or removed (struck). Screen readers hear "(added)" and "(removed)" after those words, since strike and underline alone say nothing. The balanced clause is the baseline, so on Balanced there is nothing to compare.
What does the copy button copy?
The plain clause for the chosen type and stance, with no marks from the diff. It uses the clipboard and announces "Clause copied" to a screen reader.
Is it usable with a keyboard and a screen reader?
The clause list is a radio group, so the arrow keys move through it, the stance buttons are a named toggle group, and the clause sits in a labelled region that takes focus so it can scroll. One polite status line says which clause and stance you are reading.