IconShowcase icon
Split-layout met animerende icoonring links en kop + sub + checklijst rechts. Krachtig propositioneel blok.
src/components/icon/IconShowcase.astro
---
/**
* IconShowcase
* Split-layout: animerende icoonring links, kop + sub + checklijst rechts.
* Krachtig propositioneel blok voor landing pages.
*
* Props:
* - icon?: string groot icoon in de ring, default '→'
* - headline: string
* - sub?: string
* - checks: string[] checklijst items
* - accentColor?: string default '#6366f1'
* - theme?: 'light' | 'dark' default 'light'
*/
interface Props {
icon?: string;
headline: string;
sub?: string;
checks: string[];
accentColor?: string;
theme?: 'light' | 'dark';
}
const { icon = '→', headline, sub, checks, accentColor = '#6366f1', theme = 'light' } = Astro.props;
---
<section class:list={['bl-section', 'ishow', `ishow--${theme}`]}>
<div class="bl-inner ishow-inner" style={`--color-accent: ${accentColor}`}>
<div class="ishow-wrap">
<div class="ishow-icon-area" aria-hidden="true">
<div class="ishow-ring">
<span class="ishow-icon">{icon}</span>
</div>
</div>
<div class="ishow-content">
<h2 class="ishow-headline">{headline}</h2>
{sub && <p class="ishow-sub">{sub}</p>}
<ul class="ishow-list">
{checks.map(check => (
<li class="ishow-list-item">
<span class="ishow-check" aria-hidden="true">✓</span>
{check}
</li>
))}
</ul>
</div>
</div>
</div>
</section>
<style>
.ishow--light { background: var(--color-bg, #fff); }
.ishow--dark { background: #0a0a0a; }
.ishow-wrap {
display: flex;
align-items: center;
gap: 3rem;
}
@media (max-width: 640px) {
.ishow-wrap { flex-direction: column; text-align: center; }
}
.ishow-icon-area { flex-shrink: 0; }
.ishow-ring {
width: 120px;
height: 120px;
border-radius: 50%;
border: 3px solid var(--color-accent);
display: flex;
align-items: center;
justify-content: center;
background: color-mix(in srgb, var(--color-accent) 8%, #f8f8ff);
animation: ishow-spin-ring 8s linear infinite;
}
.ishow--dark .ishow-ring {
background: color-mix(in srgb, var(--color-accent) 10%, #111);
}
.ishow-icon {
font-size: 3rem;
display: block;
animation: ishow-spin-ring 8s linear infinite reverse;
}
@keyframes ishow-spin-ring {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.ishow-content { flex: 1; }
.ishow-headline {
margin: 0 0 .75rem;
font-size: clamp(1.5rem, 2.5vw, 1.875rem);
font-weight: 800;
color: var(--color-primary, #0a0a0a);
letter-spacing: -.02em;
line-height: 1.15;
}
.ishow--dark .ishow-headline { color: #e8e8e8; }
.ishow-sub {
margin: 0 0 1.25rem;
font-size: 1rem;
line-height: 1.65;
color: #4b5563;
}
.ishow--dark .ishow-sub { color: #aaa; }
.ishow-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: .5rem;
}
.ishow-list-item {
display: flex;
align-items: center;
gap: .625rem;
font-size: .9375rem;
font-weight: 500;
color: #1f2937;
}
.ishow--dark .ishow-list-item { color: #e8e8e8; }
.ishow-check {
color: var(--color-accent);
font-weight: 800;
font-size: 1rem;
flex-shrink: 0;
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
icon | string | '→' | Groot icoon in de animerende ring |
headline * | string | - | Sectiekop |
sub | string | - | Subtekst |
checks * | string[] | - | Checklijst-items |
accentColor | string | '#6366f1' | Kleur van de ring en checkmarks |
theme | 'light' | 'dark' | 'light' | Achtergrondmodus |
* = verplicht