Comment

Card variant for a single comment. Pass a name and a timestamp — initials, avatar color (from the squad brand palette), and relative time are all derived automatically.

MVMarisol Vega2h ago
Here's Round 2. We leaned into the 70s marquee reference, pushed the italic coral pop on "Summer", and softened the gradient behind it. Let me know where to tighten.
Installation
$Terminal
npx shadcn@latest add https://sdk-components.thesqd.com/r/comment.json
Usage
Renders as a Card with type="comment" under the hood. Use either Comment or Card directly.
TSImport
import { Comment } from "@/components/ui/comment";
TSExample
import { Comment } from "@/components/ui/comment";

// Just pass the name and a timestamp — initials and avatar color are
// derived from the name (hashed into the squad brand palette), and the
// timestamp is auto-formatted into a relative string ("2h ago").
export function Example() {
  return (
    <Comment name="Marisol Vega" timestamp={new Date()}>
      Here's Round 2. We leaned into the 70s marquee reference.
    </Comment>
  );
}
Composition
One component, prop-driven avatar + name + time + body.
Comment              — wrapper over <Card type="comment" />
├── name             — author name (required); drives initials + color
├── timestamp        — Date / ISO string / number → relative string
├── initials         — optional override (auto from name)
├── color / colorFg  — optional bg/fg override (auto from brand palette)
├── avatarUrl        — optional image URL
└── children         — comment body
Default
Pass only a name — initials and avatar color are derived automatically.
MVMarisol Vega2h ago
Here's Round 2. We leaned into the 70s marquee reference, pushed the italic coral pop on "Summer", and softened the gradient behind it. Let me know where to tighten.
Small
`size="sm"` tightens the paddings.
SRSarah Reyes1h ago
Looks great! Adding a couple pins.
With avatar image
Pass `avatarUrl` to use a photo instead of initials.
Marisol VegaMarisol Vega2h ago
Here's Round 2. We leaned into the 70s marquee reference and softened the gradient behind the title.
Thread
Stack multiple comments — each name auto-picks its own color.
MVMarisol Vega2h ago
Here's Round 2. We leaned into the 70s marquee reference, pushed the italic coral pop on "Summer", and softened the gradient behind it.
SRSarah Reyes1h ago
Looks great! Adding a couple pins.
JPJordan Patel10m ago
Approved on my end — shipping this round.
API Reference
Comment-specific props on top of Card.
PropTypeDefaultDescription
namestringAuthor display name. Drives initials + avatar color when not overridden.
timestampDate | string | numberAuto-formatted into a relative string ("just now", "5m ago", "3h ago", "Mar 19").
initialsstringfirst letters of nameOverride the auto-derived initials.
avatarUrlstringUse a photo instead of initials.
colorstringhashed from nameOverride the avatar background color.
colorFgstringfrom paletteOverride the avatar text color paired with `color`.
size"default" | "sm""default"Forwarded to the underlying Card.
actionReactNodeTop-right slot (e.g. a bookmark icon).
footerReactNodeForwarded to the underlying Card.
classNamestringExtra classes merged onto the Card.