ButtonsNew

Like Button

A chunky button with a heart. On hover the heart fills and beats; a press keeps the like. Screen readers hear the state.

Customize

heartColor
background
ringColor
textColor

Based on loud-walrus-26 by LilaRest (MIT license) · Terms of use

More in Pro

View all

Props

9 properties
PropertyTypeDefaultDescription
labelstring"Like"Button text.
defaultLikedbooleanfalseWhether the button starts liked.
likedboolean—Controlled state. Without it the button keeps its own.
onLikedChange(liked: boolean) => void—Called with the new state after a press.
heartColorstring"#fafafa"Heart color.
backgroundstring"#1f1f1f"Button background.
ringColorstring"#2e2e2e"Color of the thick ring.
textColorstring"#a3a3a3"Text color.
classNamestring—Classes for the wrapper.

Dependencies

2 required packages

npm install clsx tailwind-merge

Related components

View all