Docs
Installation
j__
How to install and use useKit hooks in your project
useKit hooks are designed to be lightweight and dependency-free, allowing you to easily integrate them into your projects without any additional setup. Below are the steps to get started:
Method 1: Copy-Paste
- Browse the Collection: Visit the hooks page and find the hook you need.
- Copy the Hook: Click on the hook you want to use and copy the code.
- Paste into Your Project: Create a new file in your project's
hooks
directory (e.g.,use-local-storage.tsx
) and paste the code. - Customize as Needed: Modify the hook to fit your specific use case.
Method 2: Using shadcn CLI (Recommended)
You can quickly add useKit hooks to your project using the shadcn CLI:
pnpm dlx shadcn@latest add https://usekit.kiron.dev/k/[hookName]
Replace [hookName]
with the name of the hook you want to add (e.g., use-local-storage
).
This will automatically download the hook and add it to your project.