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

검사일 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;
}
}
/* ToastStack.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.
*/
/* ══ Toast stack (lab/ToastStack.tsx) ══════════════════════════
Three toasts stacked, fanning into a list on hover. Tones are the
reference's: the front one white, the tucked ones a barely-there
2% grey — both the same, so they read as paper behind paper rather
than a darkening ramp. Where the reference separates them with a
soft shadow, this uses a faint hairline (no drop shadows on the
bench). Status icons are their own solid colours, never faded. */
.tst {
position: relative;
font-family: var(--font-ui);
color: var(--fill-on, var(--ink));
--tst-mute: color-mix(in srgb, var(--fill-on, #17181a) 52%, var(--fill-slab, #ffffff));
--tst-wash: color-mix(in srgb, var(--fill-on, #17181a) 6%, var(--fill-slab, #ffffff));}
.tst-toast {
position: absolute;
left: 0;
top: 0;
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
gap: 12px;
padding: 0 12px 0 16px;
border-radius: var(--tst-r);
background: var(--fill-slab, #ffffff);
transform-origin: 50% 0;
transition: background-color 220ms ease, box-shadow 220ms ease;}
/* tucked: the same near-white for both, and a faint edge so each
sliver has a line to read by */
.tst:not([data-open]) .tst-toast:not([data-front]) {
background: color-mix(in srgb, var(--fill-on, #17181a) 6%, var(--fill-slab, #ffffff));
box-shadow: 0 0 0 1px color-mix(in srgb, var(--fill-on, #17181a) 6%, transparent);}
[data-stroke="on"] .tst-toast { box-shadow: 0 0 0 1px var(--pane-edge); }
/* only the front one is read while stacked; the rest are slivers */
.tst-toast > * { transition: opacity 220ms ease; }
.tst:not([data-open]) .tst-toast:not([data-front]) > * { opacity: 0; }
.tst-icon { flex: none; display: grid; place-items: center; }
.tst-toast[data-kind="success"] .tst-icon { color: #1f9d55; }
.tst-toast[data-kind="error"] .tst-icon { color: #e5484d; }
.tst-toast[data-kind="warning"] .tst-icon { color: #e09a12; }
.tst-toast[data-kind="info"] .tst-icon { color: var(--tst-mute); }
.tst-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tst-text b { font-size: 14px; font-weight: 500; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.tst-text span { font-size: 13px; line-height: 17px; color: var(--tst-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0em; }
.tst-act {
flex: none;
height: 28px;
padding: 0 12px;
border: 0;
border-radius: 999px;
background: var(--tst-wash);
color: inherit;
font: inherit;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: scale 160ms cubic-bezier(0.22, 1, 0.36, 1);
letter-spacing: 0em;}
.tst-act:active { scale: 0.96; }
.tst-x {
flex: none;
width: 28px;
height: 28px;
display: grid;
place-items: center;
border: 0;
border-radius: 999px;
background: none;
color: var(--tst-mute);
cursor: pointer;
transition: background-color 160ms ease, color 160ms ease;}
.tst-x:hover { background: var(--tst-wash); color: var(--fill-on, var(--ink)); }
.tst-act:focus-visible, .tst-x:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--signal, #2231dd); }
// bencho source (MIT). npm i @tabler/icons-react motion react · Tailwind CSS v4
// ── blocks/toast-stack/ToastStack.tsx (https://github.com/cabralorenzo/bencho/blob/c65992417427bb09e661674ffa800bef29adef49/blocks/toast-stack/ToastStack.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 { type CSSProperties, useRef, useState } from "react";
import { motion } from "motion/react";
import { IconCircleCheck as CircleCheck, IconCircleX as CircleX, IconInfoCircle as Info, IconAlertTriangle as TriangleAlert, IconX as X } from "@tabler/icons-react";
/* ══ Toast stack ══════════════════════════════════════════
Three toasts, always: the newest in front, the two before it
tucked behind with a sliver of each showing above it, a step
smaller each and a barely-there grey (the reference's tones). Point at the stack and it
fans out into a list; move away and it gathers back up.
── ONE SPRING, THREE PLACES ────────────────────────────
A toast's place is worked out from how far back it is and
whether the stack is open, and Framer springs it there. Opening,
closing, a toast leaving and the next arriving are all the same
move — every toast heading for its new place on the same spring,
a touch under critical so it settles with a hint of give.
── HOVER IS THE WHOLE FRAME ────────────────────────────
The stack opens about its middle, so the front toast moves when
it opens. Hovering the toasts themselves would let the list slide
out from under the pointer and close again; the frame is the
list's own size, so hovering it is hovering the list. Pointer
over/out with a containment test rather than enter/leave, so the
wall's demonstration — which dispatches its own pointer events,
and leaves with no relatedTarget — opens and closes it too (the
tilt card's note has the long version).
── IT NEVER RUNS OUT ───────────────────────────────────
Dismiss one and it slides away; a new one rises in at the front
from the pool, so there are always three. Retry on the failed
payment turns that toast into the payment going through, in
place. */
type Kind = "success" | "info" | "error" | "warning";
type Toast = { id: number; kind: Kind; title: string; body: string; action?: string };
const ICON: Record<Kind, LucideIcon> = {
success: CircleCheck,
info: Info,
error: CircleX,
warning: TriangleAlert,
};
const POOL: Omit<Toast, "id">[] = [
{ kind: "error", title: "Payment declined", body: "Try another card.", action: "Retry" },
{ kind: "info", title: "Kai joined your bench", body: "They can comment and copy." },
{ kind: "success", title: "brand-kit.zip uploaded", body: "Saved to Launch week." },
{ kind: "warning", title: "Storage is 92% full", body: "Exports pause at the limit." },
{ kind: "success", title: "Block saved", body: "Swipe deck is in Favourites." },
];
const W = 300;
const H = 64;
const SHOWN = 3;
/* a touch under critical: it settles with a hint of give, no wobble */
const SPRING = { type: "spring", stiffness: 380, damping: 34, mass: 1 } as const;
export function ToastStack({
peek = 14,
gap = 10,
corner = 20,
}: {
peek?: number;
gap?: number;
corner?: number;
}) {
/* front first; ids count up so a returning toast is a new element */
const next = useRef(SHOWN);
const [stack, setStack] = useState<Toast[]>(() =>
POOL.slice(0, SHOWN).map((t, i) => ({ ...t, id: i })),
);
const [leaving, setLeaving] = useState<number | null>(null);
const [open, setOpen] = useState(false);
const root = useRef<HTMLDivElement | null>(null);
/* the frame is the open list's size; both states sit in its middle */
const listH = SHOWN * H + (SHOWN - 1) * gap;
const stackH = H + (SHOWN - 1) * peek;
const FH = listH;
const place = (k: number) => {
if (open) {
/* the list: front at the bottom, the rest above it */
const top = (FH - listH) / 2;
return { y: top + (SHOWN - 1 - k) * (H + gap), scale: 1 };
}
/* the stack: front at the bottom, each one behind a peek higher
and a step smaller, hanging from its top edge */
const top = (FH - stackH) / 2;
const d = Math.min(k, SHOWN - 1);
return { y: top + (SHOWN - 1 - d) * peek, scale: 1 - d * 0.05 };
};
const dismiss = (id: number) => {
if (leaving !== null) return;
setLeaving(id);
window.setTimeout(() => {
setStack((s) => {
const rest = s.filter((t) => t.id !== id);
const n = next.current++;
const fresh = { ...POOL[n % POOL.length], id: n };
return [fresh, ...rest];
});
setLeaving(null);
}, 220);
};
const retry = (id: number) => {
setStack((s) => s.map((t) => (t.id === id
? { ...t, kind: "success", title: "Payment complete", body: "Your card was charged.", action: undefined }
: t)));
};
return (
<div
ref={root}
className="tst"
role="region"
aria-label="Notifications"
data-open={open || undefined}
style={{ width: W, height: FH, ["--tst-r" as string]: `${corner}px` } as CSSProperties}
onPointerOver={() => setOpen(true)}
onPointerOut={(e) => {
const to = e.relatedTarget as Node | null;
if (!to || !root.current?.contains(to)) setOpen(false);
}}
onFocus={() => setOpen(true)}
onBlur={(e) => { if (!root.current?.contains(e.relatedTarget as Node | null)) setOpen(false); }}
>
{stack.map((t, k) => {
const Icon = ICON[t.kind];
const out = leaving === t.id;
const p = place(k);
const front = k === 0;
return (
<motion.div
key={t.id}
className="tst-toast"
data-kind={t.kind}
data-front={front || undefined}
style={{ height: H, zIndex: SHOWN - k }}
/* a new one rises in from below the front */
initial={{ y: place(0).y + 24, scale: 1, opacity: 0, x: 0 }}
animate={out
? { y: p.y, scale: p.scale, opacity: 0, x: 60 }
: { y: p.y, scale: p.scale, opacity: 1, x: 0 }}
transition={out ? { duration: 0.22, ease: [0.4, 0, 1, 1] } : SPRING}
aria-hidden={!open && !front ? true : undefined}
>
<span className="tst-icon"><Icon size={18} strokeWidth={2} aria-hidden="true" /></span>
<span className="tst-text">
<b>{t.title}</b>
<span>{t.body}</span>
</span>
{t.action && (
<button type="button" className="tst-act" tabIndex={open || front ? 0 : -1} onClick={() => retry(t.id)}>
{t.action}
</button>
)}
<button
type="button"
className="tst-x"
aria-label={`Dismiss ${t.title}`}
tabIndex={open || front ? 0 : -1}
onClick={() => dismiss(t.id)}
>
<X size={16} strokeWidth={2} aria-hidden="true" />
</button>
</motion.div>
);
})}
</div>
);
}컨트롤 · HTML · CSS · JS
코드를 고치고 컨트롤로 다듬어 보세요. 입력하는 대로 미리보기가 바뀝니다.

이 컴포넌트는 번들된 빌드로 실행되므로 여기서는 스크립트를 읽기만 할 수 있습니다. HTML과 CSS는 수정할 수 있고 전체 소스는 코드 탭에 있습니다.
모든 컴포넌트를 바로 편집하고, 컨트롤로 다듬고, 전체 소스를 내려받고, 고급 프롬프트를 복사하세요.
1회 결제 $49임시 가격
테스트 모드: 실제 결제는 이루어지지 않습니다.
무료: 미리보기, 복사 버튼, 레슨 설명.
아이콘 하나, 문장 하나, 분명한 색으로 무슨 일이 있었는지 알립니다.
저장 알림, 오류, 경고, 짧은 확인.
상태별 색, 모서리 둥글기, 등장 모션을 바꿉니다.
Bencho (github.com/cabralorenzo/bencho)(MIT)의 "Toast stack" 컴포넌트를 내 React + Tailwind CSS 앱에 추가해 줘. 소스 파일: https://github.com/cabralorenzo/bencho/blob/c65992417427bb09e661674ffa800bef29adef49/blocks/toast-stack/ToastStack.tsx. 아이콘 하나, 문장 하나, 분명한 색으로 무슨 일이 있었는지 알립니다. 사용처: 저장 알림, 오류, 경고, 짧은 확인. 조정할 설정: 상태별 색, 모서리 둥글기, 등장 모션을 바꿉니다. 라이트와 다크 테마를 지원하고 prefers-reduced-motion을 존중해 줘. MIT 라이선스 고지는 유지해 줘.
조정, 접근성, 연동 단계까지 담은 긴 프롬프트입니다.