Define unfold (Pro)
ProIncluded in $99A term that explains itself like a folded note opening out of its underline.
On this page
ProPoint at a term and its underline draws across; the definition unfolds out of the line in two panels like a folded note, and folds back up the same way.
Point at a dotted term and its underline draws across; then the definition unfolds out of the line in two panels, the top swinging down and the second unfolding from its edge, the crease catching a little shadow as it opens. It folds back up the same way.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { DefineUnfold } from "@/components/ui/chatcn/pro/define-unfold"
<p>
Answers stream faster once the <DefineUnfold term="KV cache" source="From the glossary">Keys and values kept from earlier tokens.</DefineUnfold> is warm.
</p>Props
| Prop | Type | Notes |
|---|---|---|
term | string | The word in the text |
children | ReactNode | The definition |
source | string | Where it comes from |
open / onOpenChange | boolean | Optional control |
Keyboard
| Key | Action |
|---|---|
Tab | Focus the term, which opens it |
Escape | Fold it |
Accessibility
- The term is a button with
aria-expanded; the note describes it.
Motion
- Underline 220 ms, then two 3D panels, 200 and 300 ms. Reduced motion: it shows and hides.