Back to Components
Feedback
Sale Badge
Corner badge showing discount percentage or custom sale text with configurable position.
PropsUsage ExampleVariations
Sale
25% Off
New
50% Off
Dependencies
- clsx
- tailwind-merge
- class-variance-authority
Files
- components/ui/sale-badge.tsx
Installation
Using shadcn CLI
npx shadcn add sale-badge --url https://ui.hampton.ioManual installation
Copy the component file to your project and install dependencies:
npm install clsx tailwind-merge class-variance-authorityRelated Feedback Components
Alert Banner
Full-width dismissible banner for announcements with icon and close button.
Announcement Banner
Dismissible banner with icon, message, and optional action button.
Badge
Small badge component with multiple style variants for labels or tags.
Badge Group
Grouped badges for displaying multiple status labels or tags.
Callout
Information callout box with tip, info, warning, and danger variants. Supports collapsible content.
Empty State
Centered empty state placeholder with icon, text, and optional action.