성능
주의프레임 속도: 평균 60 fps, p5 59.5 · 긴 작업: 0개, 총 0 ms, 최장 0 ms · 소스 gzip 6.6 KB · 런타임 281 KB
LikeMIT버튼Bencho
Lorenzo Cabra가 만든 버튼 React 컴포넌트입니다. MIT 라이선스에 따라 Bencho에서 수정 없이 수집했으며 여기서 실시간으로 보여 줍니다.
품질 보고
등급과 점수는 빌드 또는 테스트 때 실행한 자동 검사에서 나옵니다. 실행하지 않은 항목은 '미검사'로 표시하며, 숫자를 지어내지 않습니다.
프레임 속도: 평균 60 fps, p5 59.5 · 긴 작업: 0개, 총 0 ms, 최장 0 ms · 소스 gzip 6.6 KB · 런타임 281 KB
문제 0 · 스크린 리더: 주의
지속 움직임 없음
넘침 없음
프레임 속도와 긴 작업 수치는 헤드리스 Chromium에서 소프트웨어 WebGL로 측정했습니다. 이 사이트의 컴포넌트끼리만 비교해야 하며, 실제 기기의 성능이 아닙니다.
해당 없음: 정지 상태에서 보이는 애니메이션이 없습니다. 호버로 시작되는 애니메이션은 검사하지 않았습니다.
axe-core 위반이 없습니다.

검사일 2026년 11월 15일 · 수치는 자동 스크립트에서 오며, 손으로 쓴 예시가 아닙니다.
실제 크기로 보여 줍니다.
복사한 내용은 라이선스 고지로 시작합니다. 코드를 쓸 때 남겨 두세요.
<div id="root"></div>:root{--bg:#f6f4f0;--ink:#17181a;--background:40 20% 96%;--foreground:24 10% 8%;--card:0 0% 100%}html,body{min-height:100%;margin:0;background:var(--bg);color:var(--ink)}html,body{height:100%;overflow:hidden}body{display:grid;place-items:center}#root{display:grid;place-items:center;max-width:100%;max-height:100%;box-sizing:border-box;padding:16px;color:hsl(var(--foreground))}#root.full{width:100%;height:100%;padding:0}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-play-state:paused!important;transition-duration:0s!important}}
/*
MIT License
Copyright (c) 2026 Lorenzo Cabra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Not covered by this licence: the Bencho name and the goat mark, and the
photographs shown on bencho.dev (none are included here). Third-party
material keeps its own licence; see THIRD_PARTY.md.
Icon substitution (this copy only): lucide-react (ISC) was replaced with @tabler/icons-react (MIT).
Sample photographs were replaced with Incidental AI assets. The Bencho name and goat mark are not licensed for marketing use.
*/
/* ── Bencho tokens ─────────────────────────────────────────
The custom properties the free blocks read, at the values
bencho.dev draws them with. Light by default; dark under
[data-theme="dark"] on any ancestor, or automatically with
the system setting unless [data-theme="light"] says otherwise.
Map these to your own theme rather than keeping two: a block
only ever reads the names, never the values. */
:root {
--font-ui: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
--bg: #ffffff;
--board: #ffffff;
--card: #f7f7f6;
--surface: #f7f7f6;
--surface-2: #f1f1f0;
--surface-3: #ecebe7;
--ink: #17181a;
--ink-rgb: 23, 24, 26;
--ink-2: #3c3b37;
--ink-3: #5c5b56;
--ink-4: #6f6e68;
--ink-5: #85847e;
--on-ink: #ffffff;
--on-ink-rgb: 255, 255, 255;
--slab: #17181a;
--on-slab: #ffffff;
--slab-dark: #0e0f11;
--fill-slab: #ffffff;
--fill-on: #17181a;
--fill-on-rgb: 23, 24, 26;
--pane: var(--fill-slab);
--pane-edge: rgba(23, 24, 26, 0.08);
--pane-thumb: rgba(23, 24, 26, 0.07);
--inlay: rgba(255, 255, 255, 0.55);
--inlay-hi: rgba(23, 24, 26, 0.09);
--elev-rgb: 255, 255, 255;
--glass-rgb: 255, 255, 255;
--shadow-rgb: 23, 24, 26;
--wash: 0.06;
--pick: #0d99ff;
--signal: #2231dd;
--focus: #2231dd;
--ok: #15803d;
--ember: #b8431c;
color-scheme: light;
}
[data-theme="dark"] {
--bg: #000000;
--board: #1a1a1a;
--card: #0a0a0a;
--surface: #0f0f0f;
--surface-2: #181818;
--surface-3: #202020;
--ink: #ffffff;
--ink-rgb: 255, 255, 255;
--ink-2: #b4b4b4;
--ink-3: #9a9a9a;
--ink-4: #828282;
--ink-5: #6b6b6b;
--on-ink: #000000;
--on-ink-rgb: 0, 0, 0;
--slab: #1a1a1a;
--on-slab: #ffffff;
--slab-dark: #262626;
--fill-slab: #262626;
--fill-on: #ffffff;
--fill-on-rgb: 255, 255, 255;
--pane-edge: rgba(255, 255, 255, 0.08);
--pane-thumb: rgba(255, 255, 255, 0.07);
--inlay: rgba(255, 255, 255, 0.1);
--inlay-hi: rgba(255, 255, 255, 0.09);
--elev-rgb: 32, 32, 32;
--shadow-rgb: 0, 0, 0;
--wash: 0.09;
--pick: #3aa9ff;
--ok: #34d17a;
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #000000;
--board: #1a1a1a;
--card: #0a0a0a;
--surface: #0f0f0f;
--surface-2: #181818;
--surface-3: #202020;
--ink: #ffffff;
--ink-rgb: 255, 255, 255;
--ink-2: #b4b4b4;
--ink-3: #9a9a9a;
--ink-4: #828282;
--ink-5: #6b6b6b;
--on-ink: #000000;
--on-ink-rgb: 0, 0, 0;
--slab: #1a1a1a;
--on-slab: #ffffff;
--slab-dark: #262626;
--fill-slab: #262626;
--fill-on: #ffffff;
--fill-on-rgb: 255, 255, 255;
--pane-edge: rgba(255, 255, 255, 0.08);
--pane-thumb: rgba(255, 255, 255, 0.07);
--inlay: rgba(255, 255, 255, 0.1);
--inlay-hi: rgba(255, 255, 255, 0.09);
--elev-rgb: 32, 32, 32;
--shadow-rgb: 0, 0, 0;
--wash: 0.09;
--pick: #3aa9ff;
--ok: #34d17a;
color-scheme: dark;
}
}
/* Like.css */
/*
MIT License
Copyright (c) 2026 Lorenzo Cabra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Not covered by this licence: the Bencho name and the goat mark, and the
photographs shown on bencho.dev (none are included here). Third-party
material keeps its own licence; see THIRD_PARTY.md.
Icon substitution (this copy only): lucide-react (ISC) was replaced with @tabler/icons-react (MIT).
Sample photographs were replaced with Incidental AI assets. The Bencho name and goat mark are not licensed for marketing use.
*/
/* ══ Like ═════════════════════════════════════════════════ */
/* a fixed frame: the pill grows by a digit at 9,999 and the
block must not rescale on the wall when it does */
.lk-frame {
width: 240px;
height: 130px;
display: grid;
place-items: center;}
.lk {
display: flex;
align-items: center;
gap: 8px;
padding: 0 20px 0 16px;
border: 0;
border-radius: var(--r);
background: var(--fill-slab, var(--card));
color: var(--fill-on, var(--ink));
font: inherit;
font-family: var(--font-ui);
font-size: 16px;
font-weight: 500;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: scale 220ms cubic-bezier(0.22, 1, 0.36, 1);
letter-spacing: -0.01em;}
[data-stroke="on"] .lk { box-shadow: inset 0 0 0 1px var(--pane-edge); }
.lk:active { scale: 0.96; }
.lk:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--fill-slab, #fff), 0 0 0 4px var(--signal, #2231dd);}
.lk-heart {
position: relative;
display: grid;
place-items: center;
width: 20px;
height: 20px;}
.lk-glyph { position: relative; z-index: 1; display: grid; }
/* the heart is gone while the bloom happens, then springs in
from nothing, red, past its size and back */
.lk-glyph[data-on] {
color: var(--lk-on);
/* the default landing: squeeze, swell past its size, settle */
animation: lk-pop 520ms cubic-bezier(0.3, 1.5, 0.4, 1) both;}
.lk[data-fx="Bloom"] .lk-glyph[data-on] {
animation: lk-heart 760ms cubic-bezier(0.3, 1.6, 0.4, 1) both;}
.lk-burst {
position: absolute;
left: 50%;
top: 50%;
pointer-events: none;}
/* the bloom: a full disc that grows, then hollows out from the
middle into a ring and thins to nothing — a border as wide as
the radius is a disc, and a border going to 0 is the hole */
.lk-bloom {
position: absolute;
left: -17px;
top: -17px;
width: 34px;
height: 34px;
box-sizing: border-box;
border-radius: 50%;
border: 17px solid #cc8ef5;
animation: lk-bloom 560ms cubic-bezier(0.25, 0.8, 0.35, 1) both;}
.lk[data-color="Ink"] .lk-bloom { border-color: var(--lk-on); animation-name: lk-bloom-ink; }
/* seven spokes, each a pair of dots, thrown as the ring opens */
.lk-spoke {
position: absolute;
left: 0;
top: 0;
rotate: var(--a);}
.lk-spoke i {
position: absolute;
width: 5px;
height: 5px;
margin: -2.5px 0 0 -2.5px;
border-radius: 50%;
background: var(--c);
animation: lk-dot 620ms cubic-bezier(0.2, 0.8, 0.3, 1) 200ms both;}
/* the pair sits either side of the spoke, one a little behind */
.lk-spoke i:first-child { --side: -4px; --far: 0px; }
.lk-spoke i:last-child { --side: 4px; --far: -5px; width: 4px; height: 4px; margin: -2px 0 0 -2px; }
/* ── Firework: up and out, then they fall ────── */
.lk-fw {
position: absolute;
left: 0;
top: 0;
animation: lk-fw-x 1000ms cubic-bezier(0.2, 0.7, 0.4, 1) var(--d) both;}
.lk-fw i {
position: absolute;
left: -2px;
top: -2px;
width: 4px;
height: 4px;
border-radius: 50%;
animation: lk-fw-y 1000ms linear var(--d) both;}
/* the count: one wheel per digit, each its own window */
.lk-count {
display: flex;
font-variant-numeric: tabular-nums;
line-height: 1;}
.lk-wheel {
position: relative;
display: inline-block;
height: 1.25em;
overflow: hidden;}
.lk-digit {
display: block;
line-height: 1.25em;}
.lk-comma { line-height: 1.25em; }
@media (prefers-reduced-motion: reduce) {
.lk-glyph[data-on], .lk-bloom, .lk-spoke i, .lk-fw, .lk-fw i { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
.lk-burst { display: none; }
}
@keyframes lk-pop {
0% { scale: 0.6; }
45% { scale: 1.28; }
100% { scale: 1; }}
@keyframes lk-heart {
0%, 28% { scale: 0; }
62% { scale: 1.25; }
100% { scale: 1; }}
@keyframes lk-bloom {
0% { scale: 0.15; border-width: 17px; border-color: #e5484d; }
40% { scale: 1; border-width: 17px; border-color: #cc8ef5; }
75% { border-width: 2px; opacity: 1; }
100% { scale: 1.12; border-width: 0; opacity: 0; border-color: #cc8ef5; }}
@keyframes lk-bloom-ink {
0% { scale: 0.15; border-width: 17px; }
40% { scale: 1; border-width: 17px; }
75% { border-width: 2px; opacity: 1; }
100% { scale: 1.12; border-width: 0; opacity: 0; }}
@keyframes lk-dot {
0% { translate: 12px var(--side); scale: 1; opacity: 0; }
12% { opacity: 1; }
100% { translate: calc(18px + var(--fly) * 14px + var(--far)) calc(var(--side) * 1.6); scale: 0; opacity: 1; }}
@keyframes lk-fw-x { from { translate: 0 0; } to { translate: var(--x) 0; } }
@keyframes lk-fw-y {
0% { translate: 0 0; opacity: 1; animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
45% { translate: 0 var(--y); opacity: 1; animation-timing-function: cubic-bezier(0.5, 0, 0.8, 0.5); }
100% { translate: 0 calc(var(--y) + 30px); opacity: 0; }}
// bencho source (MIT). npm i @tabler/icons-react motion react · Tailwind CSS v4
// ── blocks/like/Like.tsx (https://github.com/cabralorenzo/bencho/blob/c65992417427bb09e661674ffa800bef29adef49/blocks/like/Like.tsx)
/*
MIT License
Copyright (c) 2026 Lorenzo Cabra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Not covered by this licence: the Bencho name and the goat mark, and the
photographs shown on bencho.dev (none are included here). Third-party
material keeps its own licence; see THIRD_PARTY.md.
Icon substitution (this copy only): lucide-react (ISC) was replaced with @tabler/icons-react (MIT).
Sample photographs were replaced with Incidental AI assets. The Bencho name and goat mark are not licensed for marketing use.
*/
import { useState } from "react";
import { AnimatePresence, motion } from "motion/react";
import { IconHeart as Heart } from "@tabler/icons-react";
/* ══ Like ═════════════════════════════════════════════════
A heart and a count. Press it and the heart vanishes, a disc
blooms where it was and hollows out into a ring, seven pairs
of coloured dots burst off the ring, and the heart springs
back in red and past its size — while the count rolls up one.
Press again and it empties and the count rolls back down.
── ONLY THE DIGITS THAT CHANGE ROLL ────────────────────
An odometer, not a number being replaced: 1,284 to 1,285
turns the last wheel and leaves the rest where they are,
and 1,299 to 1,300 turns three, each a beat after the one
to its right, the way a carry travels. Every digit is keyed
by its place and its value, so a digit that did not change
is the same element and never moves.
── UP FOR MORE, DOWN FOR LESS ─────────────────────────
Liking rolls the new digit in from below and the old one out
the top; unliking runs the other way. Direction is the whole
difference between a count going up and a count being
replaced. */
const H = 44;
const RED = "#e5484d";
/* the confetti: a pair of dots per spoke, never the same colour
twice in a pair */
const CONFETTI = ["#f48ea7", "#cc8ef5", "#8ce8c3", "#91d2fa", "#f5a524", "#e5484d", "#9fc7fa"];
const clamp = (v: number, a: number, b: number) => Math.min(b, Math.max(a, v));
const fmt = (n: number) => n.toLocaleString("en-US");
function Roll({ value, up }: { value: number; up: boolean }) {
const chars = fmt(value).split("");
/* places counted from the right, so a new leading digit does
not shift the keys of the ones already there */
return (
<span className="lk-count" aria-hidden="true">
{chars.map((c, i) => {
const place = chars.length - 1 - i;
if (c === ",") return <span key={`c${place}`} className="lk-comma">,</span>;
return (
<span key={`p${place}`} className="lk-wheel">
<AnimatePresence initial={false} mode="popLayout">
<motion.span
key={c}
className="lk-digit"
initial={{ y: up ? "100%" : "-100%", opacity: 0 }}
animate={{ y: "0%", opacity: 1 }}
exit={{ y: up ? "-100%" : "100%", opacity: 0 }}
transition={{ duration: 0.42, ease: [0.22, 1, 0.36, 1], delay: place * 0.04 }}
>
{c}
</motion.span>
</AnimatePresence>
</span>
);
})}
</span>
);
}
/* ── the effects ───────────────────────────────────────────
Two ways for a like to land, one knob. Every one plays once
per press from a layer keyed by the press, and every number
in them is fixed rather than random: several copies share a
wall and a bench, and must all do the same thing. */
export const EFFECTS = ["Bloom", "Firework"] as const;
/* a spread of fixed "random" numbers, one per particle */
const jit = (k: number, seed: number) => {
const x = Math.sin(k * 12.9898 + seed * 78.233) * 43758.5453;
return x - Math.floor(x);
};
function Burst({ fx, fly, ink }: { fx: string; fly: number; ink: boolean }) {
const c = (k: number) => (ink ? "var(--lk-on)" : CONFETTI[k % CONFETTI.length]);
const style = (o: Record<string, string | number>) => o as React.CSSProperties;
if (fx === "Firework") {
/* thrown up and out, then they fall: the x is steady, the y
is its own element on a rise-then-drop curve */
return (
<>
{Array.from({ length: 12 }, (_, k) => {
const a = -Math.PI / 2 + (k / 11 - 0.5) * Math.PI * 1.25;
const v = 22 + fly * 22 + jit(k, 7) * 10;
return (
<span key={k} className="lk-fw" style={style({ "--x": `${Math.cos(a) * v}px`, "--d": `${jit(k, 8) * 60}ms` })}>
<i style={style({ "--y": `${Math.sin(a) * v}px`, background: c(k) })} />
</span>
);
})}
</>
);
}
/* Bloom: a disc that hollows into a ring, and pairs of confetti */
return (
<>
<span className="lk-bloom" />
{Array.from({ length: 7 }, (_, k) => (
<span key={k} className="lk-spoke" style={style({ "--a": `${k * (360 / 7) - 90}deg` })}>
<i style={style({ "--c": c(k) })} />
<i style={style({ "--c": c(k + 3) })} />
</span>
))}
</>
);
}
export function Like({
/* the count before you press */
start = 1300,
/* how the like lands */
effect = "Bloom",
/* how far the particles fly, 0..100 */
burst = 50,
color = "Red",
corner = H / 2,
}: {
start?: number;
effect?: string;
burst?: number;
color?: string;
corner?: number;
} = {}) {
const base = Math.max(0, Math.round(start));
const [liked, setLiked] = useState(false);
const [beat, setBeat] = useState(0);
const count = base + (liked ? 1 : 0);
const fly = clamp(burst, 0, 100) / 100;
const r = clamp(corner, 0, H / 2);
const ink = color === "Ink";
const fx = (EFFECTS as readonly string[]).includes(effect) ? effect : "Bloom";
const press = () => {
const next = !liked;
setLiked(next);
if (next) {
setBeat((b) => b + 1);
}
};
return (
<div className="lk-frame">
<button
type="button"
className="lk"
data-liked={liked || undefined}
data-color={color}
data-fx={fx}
aria-pressed={liked}
aria-label={`Like. ${fmt(count)} likes`}
style={{ height: H, "--r": `${r}px`, "--lk-on": ink ? "var(--fill-on, var(--ink))" : RED } as React.CSSProperties}
onClick={press}
>
<span className="lk-heart">
{/* keyed by the press, so every like plays once */}
<span key={liked ? `on${beat}` : "off"} className="lk-glyph" data-on={liked || undefined}>
<Heart size={20} strokeWidth={2} fill={liked ? "currentColor" : "none"} />
</span>
{liked && fly > 0 && (
<span key={beat} className="lk-burst" style={{ "--fly": fly } as React.CSSProperties} aria-hidden="true">
<Burst fx={fx} fly={fly} ink={ink} />
</span>
)}
</span>
<Roll value={count} up={liked} />
</button>
</div>
);
}컨트롤 · HTML · CSS · JS
코드를 고치고 컨트롤로 다듬어 보세요. 입력하는 대로 미리보기가 바뀝니다.

이 컴포넌트는 번들된 빌드로 실행되므로 여기서는 스크립트를 읽기만 할 수 있습니다. HTML과 CSS는 수정할 수 있고 전체 소스는 코드 탭에 있습니다.
모든 컴포넌트를 바로 편집하고, 컨트롤로 다듬고, 전체 소스를 내려받고, 고급 프롬프트를 복사하세요.
1회 결제 $49임시 가격
테스트 모드: 실제 결제는 이루어지지 않습니다.
무료: 미리보기, 복사 버튼, 레슨 설명.
분명한 모양, 강한 한 가지 색, 짧은 눌림 반응이 손에 잡히는 느낌을 줍니다.
주요 동작, 행동 유도, 툴바.
모서리 둥글기, 안쪽 여백, 호버 전환 시간을 바꿉니다.
Bencho (github.com/cabralorenzo/bencho)(MIT)의 "Like" 컴포넌트를 내 React + Tailwind CSS 앱에 추가해 줘. 소스 파일: https://github.com/cabralorenzo/bencho/blob/c65992417427bb09e661674ffa800bef29adef49/blocks/like/Like.tsx. 분명한 모양, 강한 한 가지 색, 짧은 눌림 반응이 손에 잡히는 느낌을 줍니다. 사용처: 주요 동작, 행동 유도, 툴바. 조정할 설정: 모서리 둥글기, 안쪽 여백, 호버 전환 시간을 바꿉니다. 라이트와 다크 테마를 지원하고 prefers-reduced-motion을 존중해 줘. MIT 라이선스 고지는 유지해 줘.
조정, 접근성, 연동 단계까지 담은 긴 프롬프트입니다.