Production-Ready Patterns
Interactive, runnable blueprints for advanced UI cases — seamless routing, async dismissal, nested layers, focus recovery, and portal integration.
All recipes
11 runnable projectsRoute-controlled sheet
Open from URL state, cold-open without a trigger, and update navigation only after exit motion completes.
Async editor close
Flush a dirty draft at the dismissal-request boundary before committing controlled state or starting exit motion.
Destructive confirmation
Give destructive work an alert-dialog role, a safe initial target, and dismissal ownership while the mutation is busy.
Nested modal navigation
A centered library with a body-safe native scroller and a right-side detail surface that swipes back independently.
Nested navigation with Tailwind v4
The same nested modal architecture expressed with Tailwind v4 while preserving structural CSS and gesture handoff.
Detail → confirmation → lightbox
Compose host-relative navigation, an alert dialog, and a family-correct Lightbox without losing dismissal order.
Radix popover in a Sheet
Keep Radix positioning and focus behavior while enrolling its portaled Content in Velvet dismissal ownership.
React Aria popover in a Sheet
Let React Aria own accessible popover semantics while Velvet coordinates the parent modal and dismissal stack.
Base UI popover in a Sheet
Place Velvet's Base UI boundary inside Popover.Portal and slot the real Positioner, leaving Base UI in charge of layout.
Reduced-motion initial-open sheet
Prove that a controlled draggable sheet mounted open never turns setup-time runway normalization into a false close.
Deleted-trigger focus fallback
Restore focus safely when the control that opened a sheet disappears during an optimistic update.