Snippets
Reusable code recipes for React, TypeScript, and more.
useLocalStorage
typescriptPersist state to localStorage with automatic serialization and SSR safety.
useDebounce
typescriptDebounce a value with a configurable delay.
useMediaQuery
typescriptSubscribe to CSS media query changes.
useClickOutside
typescriptDetect clicks outside a referenced element.
StrictOmit
typescriptA stricter version of Omit that only allows valid keys.
DeepPartial
typescriptMake all properties in an object optional recursively.
ExtractRouteParams
typescriptExtract dynamic route parameters from a path string.
cn (classnames)
typescriptMerge Tailwind classes with clsx and tailwind-merge.
Focus Ring Pattern
cssAccessible focus ring that works in light and dark mode.
Dark Mode Prose
tsxTypography plugin with proper dark mode support.
Fade In Variants
typescriptReusable fade-in animation variants for Framer Motion.
Spring Configurations
typescriptPreset spring physics for different animation feels.
Scroll Reveal Hook
typescriptTrigger animations when elements enter viewport using Intersection Observer.
Metadata Factory
typescriptCreate consistent metadata with defaults for SEO.
API Response Helpers
typescriptConsistent API responses for Route Handlers.
Type-Safe Search Params
typescriptParse and validate URL search parameters with Zod.
16 snippets