Updated
Pin Comment
ProCustomize
Color
Installation
ProPin Comment is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/pin-comment
Loading your installation…
Usage
import { PinComment } from "@/components/uibrik/pin-comment/pin-comment";<PinComment color="#7c5cff" label="Comment" pickHint="Pick anything to comment on" author="Tom Becker" defaultComments={[]} placeholder="Add a comment" postLabel="Post" resolveLabel="Resolve" // comments={[…]} // onCommentsChange={(comments) => {}} // authorAvatar="…" // onPost={(comment) => {}} // onResolve={(comment) => {}}> …</PinComment>Where to use Pin Comment
Design and staging reviews
Comments land on the exact button or heading, with its name attached, so nobody has to describe where.
Beta feedback widgets
Testers point at what's wrong instead of writing a bug report from memory.
Pairs with Feature Votes
Client approvals
Numbered pins and resolve turn a page into a checklist of changes.
Props
PinComment- color
- Type string
- "#7c5cff"
- Colour of the pins, the outline and comment mode.
- label
- Type string
- "Comment"
- Text of the dock button.
- pickHint
- Type string
- "Pick anything to comment on"
- Shown in the dock while picking.
- author
- Type string
- "Tom Becker"
- Name shown on new comments.
- childrenrequired
- Type ReactNode
- –
- The content people comment on. Add data-pin-name to an element to give it a clearer name.
- comments / onCommentsChange
- Type PinCommentItem[] / (comments) => void
- –
- Controlled comments: { id, x, y, target, text, author, avatar?, createdAt }, with x and y as fractions of the area.
- authorAvatar
- Type string
- –
- Image URL for the current person's pins and comments; initials show without one.
- defaultComments
- Type PinCommentItem[]
- –
- Comments on mount when uncontrolled.
- onPost / onResolve
- Type (comment) => void
- –
- Called when a comment is posted, or resolved and its pin removed.
- placeholder / postLabel / resolveLabel
- Type string
- –
- Composer placeholder and button text.
- className
- Type string
- –
- Classes for the wrapper.