Code Demo Split
How it works
Three steps to ship.
01
Copy the block
Browse the gallery, find a block you like, and click Copy to grab the source.
html
<!-- hero-centered.astro is ready to use -->
<section class="relative isolate flex
h-svh items-center px-6">
<div class="mx-auto max-w-3xl text-center">
<h1 class="text-6xl font-extrabold">
Beautiful blocks,
<span class="text-violet-600">
ready to ship.
</span>
</h1>
</div>
</section> 02
Drop it in your project
Paste the file into your Astro project. No installs, no imports, no configuration.
bash
src/
└── pages/
└── index.astro ← your page
src/
└── components/
└── HeroCentered.astro ← paste here 03
Customise with Tailwind
Every class is plain Tailwind. Change colors, spacing, or layout in seconds.
html
<!-- swap violet for your brand color -->
<h1 class="text-6xl font-extrabold">
Beautiful blocks,
<span class="text-indigo-600">
ready to ship.
</span>
</h1> <section class="bg-white px-6 py-24 lg:px-8">
<div class="mx-auto max-w-5xl">
<div class="mb-16 max-w-xl">
<p
class="mb-3 text-xs font-semibold uppercase tracking-widest text-violet-600"
>
How it works
</p>
<h2
class="text-4xl font-extrabold tracking-tight text-gray-950 sm:text-5xl"
>
Three steps to ship.
</h2>
</div>
<div class="space-y-6">
<div
class="grid grid-cols-1 gap-6 overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-8 sm:grid-cols-2 sm:items-center"
>
<div>
<p class="mb-2 font-mono text-xs text-gray-300">01</p>
<h3 class="mb-2 text-lg font-bold tracking-tight text-gray-950">
Copy the block
</h3>
<p class="text-sm leading-6 text-gray-500">
Browse the gallery, find a block you like, and click Copy to grab
the source.
</p>
</div>
<div
class="overflow-hidden rounded-xl bg-gray-950 font-mono text-xs leading-6"
>
<div
class="flex items-center gap-1.5 border-b border-white/10 px-4 py-3"
>
<span class="h-2 w-2 rounded-full bg-red-500/50"></span>
<span class="h-2 w-2 rounded-full bg-amber-400/50"></span>
<span class="h-2 w-2 rounded-full bg-emerald-400/50"></span>
<span class="ml-2 text-[11px] text-gray-600">html</span>
</div>
<pre class="overflow-x-auto px-5 py-4 text-gray-300">
<!-- hero-centered.astro is ready to use -->
<section class="relative isolate flex
h-svh items-center px-6">
<div class="mx-auto max-w-3xl text-center">
<h1 class="text-6xl font-extrabold">
Beautiful blocks,
<span class="text-violet-600">
ready to ship.
</span>
</h1>
</div>
</section></pre
>
</div>
</div>
<div
class="grid grid-cols-1 gap-6 overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-8 sm:grid-cols-2 sm:items-center"
>
<div>
<p class="mb-2 font-mono text-xs text-gray-300">02</p>
<h3 class="mb-2 text-lg font-bold tracking-tight text-gray-950">
Drop it in your project
</h3>
<p class="text-sm leading-6 text-gray-500">
Paste the file into your Astro project. No installs, no imports, no
configuration.
</p>
</div>
<div
class="overflow-hidden rounded-xl bg-gray-950 font-mono text-xs leading-6"
>
<div
class="flex items-center gap-1.5 border-b border-white/10 px-4 py-3"
>
<span class="h-2 w-2 rounded-full bg-red-500/50"></span>
<span class="h-2 w-2 rounded-full bg-amber-400/50"></span>
<span class="h-2 w-2 rounded-full bg-emerald-400/50"></span>
<span class="ml-2 text-[11px] text-gray-600">bash</span>
</div>
<pre class="overflow-x-auto px-5 py-4 text-gray-300">
src/
└── pages/
└── index.astro ← your page
src/
└── components/
└── HeroCentered.astro ← paste here</pre
>
</div>
</div>
<div
class="grid grid-cols-1 gap-6 overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-8 sm:grid-cols-2 sm:items-center"
>
<div>
<p class="mb-2 font-mono text-xs text-gray-300">03</p>
<h3 class="mb-2 text-lg font-bold tracking-tight text-gray-950">
Customise with Tailwind
</h3>
<p class="text-sm leading-6 text-gray-500">
Every class is plain Tailwind. Change colors, spacing, or layout in
seconds.
</p>
</div>
<div
class="overflow-hidden rounded-xl bg-gray-950 font-mono text-xs leading-6"
>
<div
class="flex items-center gap-1.5 border-b border-white/10 px-4 py-3"
>
<span class="h-2 w-2 rounded-full bg-red-500/50"></span>
<span class="h-2 w-2 rounded-full bg-amber-400/50"></span>
<span class="h-2 w-2 rounded-full bg-emerald-400/50"></span>
<span class="ml-2 text-[11px] text-gray-600">html</span>
</div>
<pre class="overflow-x-auto px-5 py-4 text-gray-300">
<!-- swap violet for your brand color -->
<h1 class="text-6xl font-extrabold">
Beautiful blocks,
<span class="text-indigo-600">
ready to ship.
</span>
</h1></pre
>
</div>
</div>
</div>
</div>
</section>