Skip to content
Personal note

Note Button

A portable note primitive with a geometric desktop expansion, adaptive mobile sheet, line-wrap gutter, and private local persistence.

Dependencies

gsap@gsap/reactlucide-react

Interaction

The panel expands from the trigger’s live position without scaling its border or typography. On mobile it becomes a bottom sheet that follows the visual viewport when the software keyboard opens.

Props

PropTypeDescription
storageKeystringLocal storage key used to persist note text.
openbooleanControls whether the note panel is open.
onOpenChange(open: boolean) => voidCalled when the panel open state changes.
defaultOpenbooleanInitial open state for uncontrolled usage.
valuestringControlled note text.
onValueChange(value: string) => voidCalled when note text changes.
placement"auto" | "top-left" | "top-right" | "bottom-left" | "bottom-right"Expansion quadrant on desktop.
widthnumberTarget desktop panel width in pixels.
heightnumberTarget desktop panel height in pixels.
breakpointnumberViewport width below which the panel becomes a sheet.
showLineNumbersbooleanDisplays measured line numbers next to the editor.

MIT License. Free to use in personal and commercial projects. Built for Peel UI.