Sweep Corner
A feedback card with a corner vote badge. A gradient sweeps across the card whenever the vote changes.
Preview
Installation
Usage
import {
SweepCorner,
SweepCornerBadge,
SweepCornerCard,
SweepCornerContent,
SweepCornerFooter,
SweepCornerTag,
SweepCornerTags,
SweepCornerTitle,
} from "@/components/ui/feedback-sweep-corner";<SweepCorner defaultUpvotes={24} defaultDownvotes={3}>
<SweepCornerCard>
<SweepCornerContent>
<SweepCornerTitle>
Add keyboard shortcuts for common actions
</SweepCornerTitle>
<SweepCornerTags>
<SweepCornerTag color="purple">UX</SweepCornerTag>
<SweepCornerTag color="green">Feature</SweepCornerTag>
</SweepCornerTags>
</SweepCornerContent>
<SweepCornerFooter comments={7} time="3 days ago" />
</SweepCornerCard>
<SweepCornerBadge />
</SweepCorner>Features
- Corner badge with up and down vote buttons and a net count that rolls on change.
- A gradient sweeps across the footer each time the vote changes.
- Works uncontrolled out of the box, or controlled from your own vote state.
- Tag pills read the --tag-* color tokens installed with the component.
API reference
SweepCornerCard
Card surface with border and hover shadow.
SweepCornerContent
Padded content area that leaves room for the corner badge.
SweepCornerTitle
Title, rendered as an h3.
SweepCornerTags
Wrapping row for tag pills.
SweepCornerBadge
Corner vote badge with up and down buttons and the net count. Reads vote state from context.
Every subcomponent also accepts className, merged with its default classes.