Bookmark
EngagementAdd bookmark/save functionality to any content. Users can save items to their personal collection.
@prisma/client@prisma/adapter-pgpgdotenvzustandlucide-reactprisma@types/pg
9 files generated
Install via CLI
npx feature101@latest add bookmarkImport
import { BookmarkButton } from '@/features/bookmark'Usage
<BookmarkButton userId="user_123" targetId="post_456" targetType="post" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
userId* | string | — | ID of the user bookmarking the content. |
targetId* | string | — | Unique ID of the content being bookmarked. |
targetType* | "post" | "article" | "video" | "product" | "repo" | — | Type of content being bookmarked. |
initialBookmarked | boolean | false | Start as already bookmarked. |
className | string | — | Custom CSS classes for styling. |
File layers:clientui componentzustandhook / storeserverserver actionprismaprisma model
Pro Feature
Get access to this feature
One payment. Every feature. Forever. License key delivered instantly.
Get Pro — $49
No subscription · You own the code