Zoeken...  ⌘K GitHub

TextBig text

Zeer grote display tekst met accent.

/text-big
src/components/text/TextBig.astro
---
/**
 * TextBig
 * Zeer grote display-tekst met accent
 */
interface Props {
  text?: string;
  accent?: string;
}
const { text = 'Groei begint met de juiste', accent = 'strategie.' } = Astro.props;
---

<div class="tbig-wrap">
  <p class="tbig-text">
    {text}{' '}
    <span class="tbig-accent">{accent}</span>
  </p>
</div>

<style>
  .tbig-wrap {
    --color-accent: #6366f1;
    --color-primary: #0a0a0a;
    padding: 64px 32px;
    font-family: system-ui, sans-serif;
  }
  .tbig-text {
    margin: 0;
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    max-width: 900px;
  }
  .tbig-accent {
    color: var(--color-accent);
    position: relative;
    display: inline-block;
  }
  .tbig-accent::after {
    content: '';
    position: absolute;
    bottom: 0.05em;
    left: 0;
    right: 0;
    height: 0.06em;
    background: var(--color-accent);
    opacity: 0.3;
    border-radius: 2px;
  }
</style>

Props

Prop Type Default Beschrijving
text string Hoofdtekst
accent string Accent tekst

* = verplicht