Componentform0.91 KB gzipZero dependencies
Wishlist Button
Heart wishlist button with pop fill and floating burst.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add wishlist-buttonOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { WishlistButton } from "@/components/ui/wishlist-button"; <WishlistButton />Source code
wishlist-button.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxwishlist-button.tsx80 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface WishlistButtonProps extends Omit<React.HTMLAttributes<HTMLElement>, "onToggle"> { active?: boolean; onToggle?: (active: boolean) => void; size?: "sm" | "md" | "lg"; className?: string;} export function WishlistButton({ active = false, onToggle, size = "md", className, ...propsProps
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { WishlistButton } from "@/components/ui/wishlist-button"; <WishlistButton />| Prop | Type | Description |
|---|---|---|
| active | boolean | Toggles active. (Default: false) |
| onToggle | (active: boolean) => void | Callback invoked on toggle. |
| size | "sm" | "md" | "lg" | Component size preset. (Default: "md") |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |