Typography typographyheadingshadow

Text Shadow Reveal

Heading with a subtle double shadow that adds depth.

Preview

Text Shadow Reveal

Usage

Copy the full block below to use this component with its imports.

astro
---
import { TextShadowReveal } from 'astro-component-kit';
---

<ShadowRevealText>Content</ShadowRevealText>
--- import { TextShadowReveal } from 'astro-component-kit'; --- <ShadowRevealText>Content</ShadowRevealText>

Manual Installation

If you are not using the npm package, create a new file src/components/lib/TextShadowReveal.astro and paste the following code:

astro
---
---
<h2 class="rev-text"><slot /></h2>
<style>
  .rev-text { font-size: 3.5rem; font-weight: 900; color: #fff; text-shadow: 4px 4px 0px rgba(99,102,241,0.3), 8px 8px 0px rgba(0,0,0,0.5); margin: 0; line-height: 1.1; }
  @media (max-width: 768px) { .rev-text { font-size: 2rem; } }
</style>
--- --- <h2 class="rev-text"><slot /></h2> <style> .rev-text { font-size: 3.5rem; font-weight: 900; color: #fff; text-shadow: 4px 4px 0px rgba(99,102,241,0.3), 8px 8px 0px rgba(0,0,0,0.5); margin: 0; line-height: 1.1; } @media (max-width: 768px) { .rev-text { font-size: 2rem; } } </style>

Quick Info

Category
Typography
Filename
TextShadowReveal.astro
Dependencies
None — pure Astro + CSS
Tags
typographyheadingshadow