Skip to content

Installation

Add Reflet UI components to any project that uses shadcn/ui.

Prerequisites

Install a component

Install any component from the Reflet registry with the shadcn CLI.

Sweep Corner

npx shadcn add https://www.reflet.app/r/feedback-sweep-corner.json

Minimal Notch

npx shadcn add https://www.reflet.app/r/feedback-minimal-notch.json

Editorial Feed

npx shadcn add https://www.reflet.app/r/feedback-editorial-feed.json

Horizontal Track

npx shadcn add https://www.reflet.app/r/milestone-track-view.json

Editorial Accordion

npx shadcn add https://www.reflet.app/r/milestone-editorial-accordion.json

Dashboard Timeline

npx shadcn add https://www.reflet.app/r/milestone-dashboard-timeline.json

What gets installed

Each command adds one component file to your components/ui/ directory, adds the --tag-* color tokens to your CSS, and installs the packages the component needs: motion, clsx, tailwind-merge and, for the feedback cards, @phosphor-icons/react.

Project tree
components/
  ui/
    feedback-sweep-corner.tsx
    feedback-minimal-notch.tsx
    feedback-editorial-feed.tsx

Usage

Compose the subcomponents and pass your data as children and props.

import {
  SweepCorner,
  SweepCornerBadge,
  SweepCornerCard,
  SweepCornerContent,
  SweepCornerFooter,
  SweepCornerTitle,
} from "@/components/ui/feedback-sweep-corner";

<SweepCorner defaultUpvotes={42} onVoteChange={(vote) => console.log(vote)}>
  <SweepCornerCard>
    <SweepCornerContent>
      <SweepCornerTitle>Add dark mode support</SweepCornerTitle>
    </SweepCornerContent>
    <SweepCornerBadge />
    <SweepCornerFooter comments={7} time="1 day ago" />
  </SweepCornerCard>
</SweepCorner>

Connect to Reflet data

These components are presentational: they take data through props and don’t call any backend. To show live Reflet data, fetch it with Reflet SDK hooks such as useFeedbackList() and pass the items in.