Toy Collector Club
Блок программы лояльности для магазинов игрушек: преимущества, анимированная карта штампов, уровни участия и форма вступления с проверкой полей.
Kapow Collector Club
Collect figures. Earn stamps. Unlock exclusives.
Every $10 you spend earns a stamp. Fill the card and the next figure is on us — plus early access to every limited drop.
- Early access to limited editions
- Birthday surprise for the little hero
- Free shipping on pre-orders
Stamp card
- 7
- 8
- 9
- Free figure
- Rookie 0+ pts Stamp card & newsletter
- Hero 500+ pts 48h early access
- Legend 1,500+ pts Exclusive variants
Использование
Скопируйте и вставьте этот код на вашу страницу Astro:
---
import { ToyCollectorClub } from 'astro-component-kit/sections';
---
<ToyCollectorClub filled={6} stamps={10} action="https://your-backend/club" /> ---
import { ToyCollectorClub } from 'astro-component-kit/sections';
---
<ToyCollectorClub filled={6} stamps={10} action="https://your-backend/club" /> Примеры в контексте
Реальный код из набора: как этот элемент используется в шаблонах, секциях и других компонентах.
ToyHomePage.astro <ToyCollectorClub /> <ToyCollectorClub /> Используется в
Ручная установка
Если вы не используете пакет npm, создайте файл и вставьте следующий код: src/components/sections/ToyCollectorClub.astro:
---
/**
* ToyCollectorClub — Loyalty / membership band for toy and collectibles stores: headline, perks,
* a stamp card that fills up as you shop, membership tiers and a join form with inline validation.
*
* @param {string} eyebrow - Small label. Default 'Kapow Collector Club'.
* @param {string} title - Heading. Default 'Collect figures. Earn stamps. Unlock exclusives.'.
* @param {string} text - Supporting copy.
* @param {string[]} perks - Perk bullet list.
* @param {number} stamps - Total stamps on the card. Default 10.
* @param {number} filled - Stamps already filled (demo). Default 6.
* @param {string} reward - Text on the last stamp. Default 'Free figure'.
* @param {Array<{name: string, points: string, perk: string}>} tiers - Membership tiers.
* @param {string} buttonLabel - Join button label. Default 'Join free'.
* @param {string} action - Form action URL. Empty = demo (shows a success message, sends nothing).
* @param {string} privacy - Small print under the form.
* @param {string} variant - Style (comic|soft). Default 'comic'.
* @param {string} size - Density (sm|md|lg). Default 'md'.
* @param {string} headingLevel - Heading element (h2|h3). Default 'h2'.
* @param {string} id - Base id. Default 'collector-club'.
* @param {string} className - Extra class.
*
* Accessibility: the stamp card is a single image with a text label ("6 of 10 stamps"); the email
* field has a visible label, autocomplete and an error message linked with aria-describedby; the
* result is announced in a polite live region.
*/
interface Props {
eyebrow?: string;
title?: string;
text?: string;
perks?: string[];
stamps?: number;
filled?: number;
reward?: string;
tiers?: Array<{ name: string; points: string; perk: string }>;
buttonLabel?: string;
action?: string;
privacy?: string;
variant?: 'comic' | 'soft';
size?: 'sm' | 'md' | 'lg';
headingLevel?: 'h2' | 'h3';
id?: string;
className?: string;
}
const {
eyebrow = 'Kapow Collector Club',
title = 'Collect figures. Earn stamps. Unlock exclusives.',
text = 'Every $10 you spend earns a stamp. Fill the card and the next figure is on us — plus early access to every limited drop.',
perks = ['Early access to limited editions', 'Birthday surprise for the little hero', 'Free shipping on pre-orders'],
stamps = 10,
filled = 6,
reward = 'Free figure',
tiers = [
{ name: 'Rookie', points: '0+', perk: 'Stamp card & newsletter' },
{ name: 'Hero', points: '500+', perk: '48h early access' },
{ name: 'Legend', points: '1,500+', perk: 'Exclusive variants' },
],
buttonLabel = 'Join free',
action = '',
privacy = 'Free forever. Grown-ups only: you must be 18+ to join on behalf of a young collector.',
variant = 'comic',
size = 'md',
headingLevel = 'h2',
id = 'collector-club',
className = '',
} = Astro.props;
const Heading = headingLevel;
const total = Math.max(1, stamps);
const done = Math.min(total, Math.max(0, filled));
---
<section class:list={['tcc', `tcc--${variant}`, `tcc--${size}`, className]} aria-labelledby={`${id}-title`}>
<div class="tcc__panel">
<div class="tcc__copy">
{eyebrow && <p class="tcc__eyebrow">{eyebrow}</p>}
<Heading class="tcc__title" id={`${id}-title`}>{title}</Heading>
{text && <p class="tcc__text">{text}</p>}
{perks.length > 0 && (
<ul class="tcc__perks">
{perks.map((p) => <li>{p}</li>)}
</ul>
)}
<form class="tcc__form" action={action || undefined} method="post" novalidate data-tcc-form data-demo={action ? undefined : ''}>
<label class="tcc__label" for={`${id}-email`}>Email address</label>
<div class="tcc__row">
<input
class="tcc__input"
id={`${id}-email`}
name="email"
type="email"
autocomplete="email"
inputmode="email"
placeholder="you@example.com"
required
aria-describedby={`${id}-error`}
/>
<button class="tcc__btn" type="submit">{buttonLabel}</button>
</div>
<p class="tcc__error" id={`${id}-error`} data-tcc-error hidden>Please enter a valid email address.</p>
<p class="tcc__status" role="status" aria-live="polite" data-tcc-status></p>
{privacy && <p class="tcc__privacy">{privacy}</p>}
</form>
</div>
<div class="tcc__side">
<div class="tcc__card" role="img" aria-label={`Stamp card: ${done} of ${total} stamps collected. Reward: ${reward}.`}>
<p class="tcc__card-title" aria-hidden="true">Stamp card</p>
<ol class="tcc__stamps" aria-hidden="true">
{Array.from({ length: total }, (_, i) => (
<li class:list={['tcc__stamp', { 'is-filled': i < done, 'is-reward': i === total - 1 }]} style={`--s-i: ${i}`}>
{i === total - 1 ? <span>{reward}</span> : i < done ? (
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.4 6.7 19.4l1.2-6L3.4 9.3l6-.7z"/></svg>
) : <span>{i + 1}</span>}
</li>
))}
</ol>
</div>
{tiers.length > 0 && (
<ol class="tcc__tiers" aria-label="Membership tiers">
{tiers.map((t, i) => (
<li style={`--t-i: ${i}`}>
<span class="tcc__tier-name">{t.name}</span>
<span class="tcc__tier-points">{t.points} pts</span>
<span class="tcc__tier-perk">{t.perk}</span>
</li>
))}
</ol>
)}
</div>
</div>
</section>
<script>
document.querySelectorAll<HTMLFormElement>('[data-tcc-form]:not([data-bound])').forEach((form) => {
form.dataset.bound = '';
const input = form.querySelector<HTMLInputElement>('input[type="email"]')!;
const error = form.querySelector<HTMLElement>('[data-tcc-error]')!;
const status = form.querySelector<HTMLElement>('[data-tcc-status]')!;
const valid = () => /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(input.value.trim());
input.addEventListener('input', () => {
if (!error.hidden && valid()) { error.hidden = true; input.removeAttribute('aria-invalid'); }
});
form.addEventListener('submit', (e) => {
if (!valid()) {
e.preventDefault();
error.hidden = false;
input.setAttribute('aria-invalid', 'true');
input.focus();
return;
}
if (form.dataset.demo !== undefined) {
e.preventDefault();
status.textContent = 'Welcome to the club! Check your inbox for your first stamp.';
form.reset();
}
});
});
</script>
<style>
.tcc {
--tcc-edge: var(--toy-edge, var(--c-text-1, #17121f));
--tcc-drop: var(--toy-drop, var(--tcc-edge));
container-type: inline-size;
}
.tcc__panel {
display: grid;
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
gap: clamp(1.5rem, 5vw, 4rem);
align-items: center;
padding: clamp(1.5rem, 5vw, 3.5rem);
border-radius: var(--r-xl, 28px);
background:
radial-gradient(rgb(255 255 255 / 0.12) 1.5px, transparent 2px) 0 0 / 14px 14px,
linear-gradient(135deg, var(--toy-blue, #2546d6), var(--toy-purple, #6b2fd6));
color: #fff;
}
.tcc--comic .tcc__panel { border: 3.5px solid var(--tcc-edge); box-shadow: 10px 10px 0 var(--tcc-drop); }
.tcc--sm .tcc__panel { padding: var(--sp-6, 1.5rem); }
.tcc__eyebrow {
display: inline-block;
margin: 0 0 var(--sp-4, 1rem);
padding: 0.3rem 0.8rem;
border: 2px solid #17121f;
border-radius: 6px;
background: var(--toy-yellow, #ffd23f);
color: #17121f;
font-size: 0.75rem;
font-weight: 800;
letter-spacing: 0.1em;
text-transform: uppercase;
transform: rotate(-2deg);
}
.tcc__title { margin: 0; font-family: var(--font-display, inherit); font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 400; line-height: 1.05; color: #fff; text-wrap: balance; }
.tcc__text { margin: var(--sp-4, 1rem) 0 0; max-width: 46ch; line-height: 1.65; color: rgb(255 255 255 / 0.88); }
.tcc__perks { display: grid; gap: var(--sp-2, 0.5rem); margin: var(--sp-5, 1.25rem) 0 0; padding: 0; list-style: none; }
.tcc__perks li { display: flex; align-items: center; gap: var(--sp-2, 0.5rem); font-weight: 600; }
.tcc__perks li::before { content: '★'; display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--toy-yellow, #ffd23f); color: #17121f; font-size: 0.75rem; }
.tcc__form { margin-top: var(--sp-6, 1.5rem); max-width: 30rem; }
.tcc__label { display: block; margin-bottom: var(--sp-2, 0.5rem); font-size: 0.85rem; font-weight: 700; }
.tcc__row { display: flex; gap: var(--sp-2, 0.5rem); }
.tcc__input {
flex: 1;
min-width: 0;
min-height: 52px;
padding: 0 var(--sp-4, 1rem);
border: 2.5px solid #17121f;
border-radius: 999px;
background: #fff;
color: #17121f;
font: inherit;
font-size: 1rem;
}
.tcc__input::placeholder { color: #6b6575; }
.tcc__input[aria-invalid='true'] { border-color: #ff5c6c; box-shadow: 0 0 0 3px rgb(255 92 108 / 0.35); }
.tcc__btn {
min-height: 52px;
padding: 0 var(--sp-6, 1.5rem);
border: 2.5px solid #17121f;
border-radius: 999px;
background: var(--toy-yellow, #ffd23f);
color: #17121f;
box-shadow: 4px 4px 0 #17121f;
font: inherit;
font-weight: 800;
white-space: nowrap;
cursor: pointer;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tcc__btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #17121f; }
.tcc__btn:active { transform: translate(3px, 3px); box-shadow: none; }
.tcc__input:focus-visible, .tcc__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tcc__error { margin: var(--sp-2, 0.5rem) 0 0; padding: 0.3rem 0.7rem; border-radius: 8px; background: #17121f; color: #ffb3ba; font-size: 0.85rem; font-weight: 700; display: inline-block; }
.tcc__error[hidden] { display: none; }
.tcc__status { margin: var(--sp-2, 0.5rem) 0 0; font-weight: 800; }
.tcc__status:empty { display: none; }
.tcc__privacy { margin: var(--sp-3, 0.75rem) 0 0; font-size: 0.78rem; color: rgb(255 255 255 / 0.78); }
.tcc__side { display: grid; gap: var(--sp-5, 1.25rem); }
.tcc__card {
padding: var(--sp-5, 1.25rem);
border: 3px solid #17121f;
border-radius: var(--r-lg, 20px);
background: #fffaf0;
color: #17121f;
box-shadow: 6px 6px 0 #17121f;
transform: rotate(2deg);
}
.tcc__card-title { margin: 0 0 var(--sp-3, 0.75rem); font-family: var(--font-display, inherit); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tcc__stamps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2, 0.5rem); margin: 0; padding: 0; list-style: none; }
.tcc__stamp {
display: grid;
place-items: center;
aspect-ratio: 1;
border: 2.5px dashed rgb(23 18 31 / 0.35);
border-radius: 50%;
color: rgb(23 18 31 / 0.45);
font-family: var(--font-display, inherit);
font-size: 0.9rem;
}
.tcc__stamp.is-filled {
border: 2.5px solid #17121f;
background: #d62839;
color: #fff;
transform: rotate(calc((var(--s-i) * 23deg) - 30deg));
animation: tcc-stamp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
animation-delay: calc(var(--s-i) * 0.08s);
}
.tcc__stamp svg { width: 58%; height: 58%; }
.tcc__stamp.is-reward { border: 2.5px solid #17121f; border-radius: 12px; background: var(--toy-yellow, #ffd23f); color: #17121f; font-size: 0.6rem; line-height: 1.05; text-align: center; padding: 2px; text-transform: uppercase; }
.tcc__tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3, 0.75rem); margin: 0; padding: 0; list-style: none; }
.tcc__tiers li {
display: grid;
gap: 2px;
padding: var(--sp-3, 0.75rem);
border: 2px solid rgb(255 255 255 / 0.35);
border-radius: var(--r-md, 12px);
background: rgb(0 0 0 / 0.18);
}
.tcc__tier-name { font-family: var(--font-display, inherit); font-size: 1.05rem; }
.tcc__tier-points { font-size: 0.75rem; font-weight: 800; color: var(--toy-yellow, #ffd23f); }
.tcc__tier-perk { font-size: 0.8rem; color: rgb(255 255 255 / 0.85); }
@keyframes tcc-stamp { from { transform: scale(1.6) rotate(0deg); opacity: 0; } }
@container (max-width: 820px) {
.tcc__panel { grid-template-columns: 1fr; }
.tcc__card { transform: none; }
}
@container (max-width: 460px) {
.tcc__row { flex-direction: column; }
.tcc__tiers { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.tcc__stamp.is-filled { animation: none; }
.tcc__btn { transition: none; }
}
</style> ---
/**
* ToyCollectorClub — Loyalty / membership band for toy and collectibles stores: headline, perks,
* a stamp card that fills up as you shop, membership tiers and a join form with inline validation.
*
* @param {string} eyebrow - Small label. Default 'Kapow Collector Club'.
* @param {string} title - Heading. Default 'Collect figures. Earn stamps. Unlock exclusives.'.
* @param {string} text - Supporting copy.
* @param {string[]} perks - Perk bullet list.
* @param {number} stamps - Total stamps on the card. Default 10.
* @param {number} filled - Stamps already filled (demo). Default 6.
* @param {string} reward - Text on the last stamp. Default 'Free figure'.
* @param {Array<{name: string, points: string, perk: string}>} tiers - Membership tiers.
* @param {string} buttonLabel - Join button label. Default 'Join free'.
* @param {string} action - Form action URL. Empty = demo (shows a success message, sends nothing).
* @param {string} privacy - Small print under the form.
* @param {string} variant - Style (comic|soft). Default 'comic'.
* @param {string} size - Density (sm|md|lg). Default 'md'.
* @param {string} headingLevel - Heading element (h2|h3). Default 'h2'.
* @param {string} id - Base id. Default 'collector-club'.
* @param {string} className - Extra class.
*
* Accessibility: the stamp card is a single image with a text label ("6 of 10 stamps"); the email
* field has a visible label, autocomplete and an error message linked with aria-describedby; the
* result is announced in a polite live region.
*/
interface Props {
eyebrow?: string;
title?: string;
text?: string;
perks?: string[];
stamps?: number;
filled?: number;
reward?: string;
tiers?: Array<{ name: string; points: string; perk: string }>;
buttonLabel?: string;
action?: string;
privacy?: string;
variant?: 'comic' | 'soft';
size?: 'sm' | 'md' | 'lg';
headingLevel?: 'h2' | 'h3';
id?: string;
className?: string;
}
const {
eyebrow = 'Kapow Collector Club',
title = 'Collect figures. Earn stamps. Unlock exclusives.',
text = 'Every $10 you spend earns a stamp. Fill the card and the next figure is on us — plus early access to every limited drop.',
perks = ['Early access to limited editions', 'Birthday surprise for the little hero', 'Free shipping on pre-orders'],
stamps = 10,
filled = 6,
reward = 'Free figure',
tiers = [
{ name: 'Rookie', points: '0+', perk: 'Stamp card & newsletter' },
{ name: 'Hero', points: '500+', perk: '48h early access' },
{ name: 'Legend', points: '1,500+', perk: 'Exclusive variants' },
],
buttonLabel = 'Join free',
action = '',
privacy = 'Free forever. Grown-ups only: you must be 18+ to join on behalf of a young collector.',
variant = 'comic',
size = 'md',
headingLevel = 'h2',
id = 'collector-club',
className = '',
} = Astro.props;
const Heading = headingLevel;
const total = Math.max(1, stamps);
const done = Math.min(total, Math.max(0, filled));
---
<section class:list={['tcc', `tcc--${variant}`, `tcc--${size}`, className]} aria-labelledby={`${id}-title`}>
<div class="tcc__panel">
<div class="tcc__copy">
{eyebrow && <p class="tcc__eyebrow">{eyebrow}</p>}
<Heading class="tcc__title" id={`${id}-title`}>{title}</Heading>
{text && <p class="tcc__text">{text}</p>}
{perks.length > 0 && (
<ul class="tcc__perks">
{perks.map((p) => <li>{p}</li>)}
</ul>
)}
<form class="tcc__form" action={action || undefined} method="post" novalidate data-tcc-form data-demo={action ? undefined : ''}>
<label class="tcc__label" for={`${id}-email`}>Email address</label>
<div class="tcc__row">
<input
class="tcc__input"
id={`${id}-email`}
name="email"
type="email"
autocomplete="email"
inputmode="email"
placeholder="you@example.com"
required
aria-describedby={`${id}-error`}
/>
<button class="tcc__btn" type="submit">{buttonLabel}</button>
</div>
<p class="tcc__error" id={`${id}-error`} data-tcc-error hidden>Please enter a valid email address.</p>
<p class="tcc__status" role="status" aria-live="polite" data-tcc-status></p>
{privacy && <p class="tcc__privacy">{privacy}</p>}
</form>
</div>
<div class="tcc__side">
<div class="tcc__card" role="img" aria-label={`Stamp card: ${done} of ${total} stamps collected. Reward: ${reward}.`}>
<p class="tcc__card-title" aria-hidden="true">Stamp card</p>
<ol class="tcc__stamps" aria-hidden="true">
{Array.from({ length: total }, (_, i) => (
<li class:list={['tcc__stamp', { 'is-filled': i < done, 'is-reward': i === total - 1 }]} style={`--s-i: ${i}`}>
{i === total - 1 ? <span>{reward}</span> : i < done ? (
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.4 6.7 19.4l1.2-6L3.4 9.3l6-.7z"/></svg>
) : <span>{i + 1}</span>}
</li>
))}
</ol>
</div>
{tiers.length > 0 && (
<ol class="tcc__tiers" aria-label="Membership tiers">
{tiers.map((t, i) => (
<li style={`--t-i: ${i}`}>
<span class="tcc__tier-name">{t.name}</span>
<span class="tcc__tier-points">{t.points} pts</span>
<span class="tcc__tier-perk">{t.perk}</span>
</li>
))}
</ol>
)}
</div>
</div>
</section>
<script>
document.querySelectorAll<HTMLFormElement>('[data-tcc-form]:not([data-bound])').forEach((form) => {
form.dataset.bound = '';
const input = form.querySelector<HTMLInputElement>('input[type="email"]')!;
const error = form.querySelector<HTMLElement>('[data-tcc-error]')!;
const status = form.querySelector<HTMLElement>('[data-tcc-status]')!;
const valid = () => /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(input.value.trim());
input.addEventListener('input', () => {
if (!error.hidden && valid()) { error.hidden = true; input.removeAttribute('aria-invalid'); }
});
form.addEventListener('submit', (e) => {
if (!valid()) {
e.preventDefault();
error.hidden = false;
input.setAttribute('aria-invalid', 'true');
input.focus();
return;
}
if (form.dataset.demo !== undefined) {
e.preventDefault();
status.textContent = 'Welcome to the club! Check your inbox for your first stamp.';
form.reset();
}
});
});
</script>
<style>
.tcc {
--tcc-edge: var(--toy-edge, var(--c-text-1, #17121f));
--tcc-drop: var(--toy-drop, var(--tcc-edge));
container-type: inline-size;
}
.tcc__panel {
display: grid;
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
gap: clamp(1.5rem, 5vw, 4rem);
align-items: center;
padding: clamp(1.5rem, 5vw, 3.5rem);
border-radius: var(--r-xl, 28px);
background:
radial-gradient(rgb(255 255 255 / 0.12) 1.5px, transparent 2px) 0 0 / 14px 14px,
linear-gradient(135deg, var(--toy-blue, #2546d6), var(--toy-purple, #6b2fd6));
color: #fff;
}
.tcc--comic .tcc__panel { border: 3.5px solid var(--tcc-edge); box-shadow: 10px 10px 0 var(--tcc-drop); }
.tcc--sm .tcc__panel { padding: var(--sp-6, 1.5rem); }
.tcc__eyebrow {
display: inline-block;
margin: 0 0 var(--sp-4, 1rem);
padding: 0.3rem 0.8rem;
border: 2px solid #17121f;
border-radius: 6px;
background: var(--toy-yellow, #ffd23f);
color: #17121f;
font-size: 0.75rem;
font-weight: 800;
letter-spacing: 0.1em;
text-transform: uppercase;
transform: rotate(-2deg);
}
.tcc__title { margin: 0; font-family: var(--font-display, inherit); font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 400; line-height: 1.05; color: #fff; text-wrap: balance; }
.tcc__text { margin: var(--sp-4, 1rem) 0 0; max-width: 46ch; line-height: 1.65; color: rgb(255 255 255 / 0.88); }
.tcc__perks { display: grid; gap: var(--sp-2, 0.5rem); margin: var(--sp-5, 1.25rem) 0 0; padding: 0; list-style: none; }
.tcc__perks li { display: flex; align-items: center; gap: var(--sp-2, 0.5rem); font-weight: 600; }
.tcc__perks li::before { content: '★'; display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--toy-yellow, #ffd23f); color: #17121f; font-size: 0.75rem; }
.tcc__form { margin-top: var(--sp-6, 1.5rem); max-width: 30rem; }
.tcc__label { display: block; margin-bottom: var(--sp-2, 0.5rem); font-size: 0.85rem; font-weight: 700; }
.tcc__row { display: flex; gap: var(--sp-2, 0.5rem); }
.tcc__input {
flex: 1;
min-width: 0;
min-height: 52px;
padding: 0 var(--sp-4, 1rem);
border: 2.5px solid #17121f;
border-radius: 999px;
background: #fff;
color: #17121f;
font: inherit;
font-size: 1rem;
}
.tcc__input::placeholder { color: #6b6575; }
.tcc__input[aria-invalid='true'] { border-color: #ff5c6c; box-shadow: 0 0 0 3px rgb(255 92 108 / 0.35); }
.tcc__btn {
min-height: 52px;
padding: 0 var(--sp-6, 1.5rem);
border: 2.5px solid #17121f;
border-radius: 999px;
background: var(--toy-yellow, #ffd23f);
color: #17121f;
box-shadow: 4px 4px 0 #17121f;
font: inherit;
font-weight: 800;
white-space: nowrap;
cursor: pointer;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tcc__btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #17121f; }
.tcc__btn:active { transform: translate(3px, 3px); box-shadow: none; }
.tcc__input:focus-visible, .tcc__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tcc__error { margin: var(--sp-2, 0.5rem) 0 0; padding: 0.3rem 0.7rem; border-radius: 8px; background: #17121f; color: #ffb3ba; font-size: 0.85rem; font-weight: 700; display: inline-block; }
.tcc__error[hidden] { display: none; }
.tcc__status { margin: var(--sp-2, 0.5rem) 0 0; font-weight: 800; }
.tcc__status:empty { display: none; }
.tcc__privacy { margin: var(--sp-3, 0.75rem) 0 0; font-size: 0.78rem; color: rgb(255 255 255 / 0.78); }
.tcc__side { display: grid; gap: var(--sp-5, 1.25rem); }
.tcc__card {
padding: var(--sp-5, 1.25rem);
border: 3px solid #17121f;
border-radius: var(--r-lg, 20px);
background: #fffaf0;
color: #17121f;
box-shadow: 6px 6px 0 #17121f;
transform: rotate(2deg);
}
.tcc__card-title { margin: 0 0 var(--sp-3, 0.75rem); font-family: var(--font-display, inherit); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tcc__stamps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2, 0.5rem); margin: 0; padding: 0; list-style: none; }
.tcc__stamp {
display: grid;
place-items: center;
aspect-ratio: 1;
border: 2.5px dashed rgb(23 18 31 / 0.35);
border-radius: 50%;
color: rgb(23 18 31 / 0.45);
font-family: var(--font-display, inherit);
font-size: 0.9rem;
}
.tcc__stamp.is-filled {
border: 2.5px solid #17121f;
background: #d62839;
color: #fff;
transform: rotate(calc((var(--s-i) * 23deg) - 30deg));
animation: tcc-stamp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
animation-delay: calc(var(--s-i) * 0.08s);
}
.tcc__stamp svg { width: 58%; height: 58%; }
.tcc__stamp.is-reward { border: 2.5px solid #17121f; border-radius: 12px; background: var(--toy-yellow, #ffd23f); color: #17121f; font-size: 0.6rem; line-height: 1.05; text-align: center; padding: 2px; text-transform: uppercase; }
.tcc__tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3, 0.75rem); margin: 0; padding: 0; list-style: none; }
.tcc__tiers li {
display: grid;
gap: 2px;
padding: var(--sp-3, 0.75rem);
border: 2px solid rgb(255 255 255 / 0.35);
border-radius: var(--r-md, 12px);
background: rgb(0 0 0 / 0.18);
}
.tcc__tier-name { font-family: var(--font-display, inherit); font-size: 1.05rem; }
.tcc__tier-points { font-size: 0.75rem; font-weight: 800; color: var(--toy-yellow, #ffd23f); }
.tcc__tier-perk { font-size: 0.8rem; color: rgb(255 255 255 / 0.85); }
@keyframes tcc-stamp { from { transform: scale(1.6) rotate(0deg); opacity: 0; } }
@container (max-width: 820px) {
.tcc__panel { grid-template-columns: 1fr; }
.tcc__card { transform: none; }
}
@container (max-width: 460px) {
.tcc__row { flex-direction: column; }
.tcc__tiers { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.tcc__stamp.is-filled { animation: none; }
.tcc__btn { transition: none; }
}
</style>
Эта секция разработана как ключевой блок для следующего шаблона. Вы можете открыть полный многостраничный интерактивный сайт или изучить все связанные компоненты.
Магазин игрушек · Фигурки
Магазин игрушек в стиле комикса для фигурок и коллекционных вещей: фильтры по персонажам, страницы персонажей и подбор подарка по возрасту.
Ещё секции для изучения
Откройте для себя другие готовые блоки для лендингов и страниц из нашей библиотеки.
Toy Hero
Hero магазина в стиле комикса: взрывной ярлык, огромный заголовок с выделенным словом, кнопки и цифры рядом со сценой с растром, избранной фигуркой, ценником-звездой и летающими аватарами.
Toy Character Rail
Лента «покупки по персонажу» с круглыми комикс-аватарами. Ведёт на страницы персонажей или в режиме фильтра включает фасет персонажа в FilterSidebar, показывая только его фигурки — мультивыбор и синхронизация с URL.
Toy Character Grid
Каталог персонажей в виде коллекционных карточек (аватар, прозвище, вселенная, отметка герой / злодей, шкалы силы, число фигурок) с мгновенными фильтрами по стороне и вселенной и живым счётчиком.
Toy Character Hero
Шапка профиля персонажа: комикс-панель с рисунком, отметкой герой / злодей и репликой в облачке, а также вселенная, имя, прозвище, биография, шкалы силы, факты и кнопки.