shadcn-hooks
v0.0.3
Published
shadcn hooks
Maintainers
Readme
✨ Features
- TypeScript First: All hooks are written in TypeScript with full type safety
- SSR Compatible: Hooks work seamlessly with server-side rendering
- Modern React: Built for React 19+ with latest patterns and optimizations
- Zero Dependencies: Most hooks have minimal or no external dependencies
- Tree Shakeable: Import only what you need
- Well Tested: Each hook is thoroughly tested and documented
- Tested: Each hook is thoroughly tested
🚀 Quick Start
Installation
Each hook can be installed individually using the shadcn CLI:
pnpm install shadcn-hooksUsage
import { useCounter } from 'shadcn-hooks'
function Counter() {
const { count, increment, decrement, reset } = useCounter(0)
return (
<div>
<p>Count: {count}</p>
<button onClick={increment}>+</button>
<button onClick={decrement}>-</button>
<button onClick={reset}>Reset</button>
</div>
)
}📚 Documentation
Visit shadcn-hooks.vercel.app for complete documentation, examples, and API references.
🤝 Credits
This collection is inspired by and builds upon the excellent work of:
- ahooks - Comprehensive React hooks library
- usehooks-ts - TypeScript-first hooks collection
