Skip to content
Sign upGet access
MicrointeractionsDefine unfoldMenu

Define unfold (Pro)

ProIncluded in $99

A term that explains itself like a folded note opening out of its underline.

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

$ pnpm dlx shadcn@latest add @chatcn-pro/define-unfold

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

tsx
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

PropTypeNotes
termstringThe word in the text
childrenReactNodeThe definition
sourcestringWhere it comes from
open / onOpenChangebooleanOptional control

Keyboard

KeyAction
TabFocus the term, which opens it
EscapeFold 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.