Component libraryComments thread
Comments thread
ProDiscuss one record with controlled replies, edits, deletion requests and resolved state.
npx shadcn@latest add @tidal-pro/comments-threadInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/comments-thread.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Consumer-owned comments require unique IDs, author names and ReactNode content. Optional avatar, timestamp/dateTime, edited label, reply relationship, attachment slot, and explicit per-comment Reply/Edit/Delete action configs support native button props/refs. Controlled resolved state and onResolvedChange expose a native toggle action. The controlled native composer supports comment/reply/edit context, draft proposal, native form action/method/submitter overrides, form and textarea props/refs, caller-first prevention, hint/error/attachment slots, pending state and synchronous accepted-action focus recovery. Root native section attributes/ref, bounded headingLevel, numeric/nullish slots, empty content and labels are supported. Consumers own authorization, content safety, comment state, mentions, uploads, confirmation, transport and persistence. The component performs no request or storage operation.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.