BlockUI

codedemo

Code snippet displays and step-by-step technical walkthroughs.

Code Demo Split

codedemo
Open

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>

Code Demo Terminal

codedemo
Open

Zero config

Paste it. Run it. Done.

No CLI, no config file, no peer dependency warnings. Just copy one file and start the dev server.

zsh — my-astro-project

cd my-astro-project

cp hero-centered.astro src/components/

✓ Copied in 0ms. No install needed.

bun dev

astro v4.0.0 ready in 312ms

┃ Local http://localhost:4321/

┃ Network http://192.168.1.5:4321/

No npm install No config files No peer deps Works with any Astro project

Code Demo Minimal

codedemo
Open

How it works

Simple by design.

No imports .astro
---
// Nothing to import. Nothing to configure.
---

<section class="...">
  <h1>Your content here.</h1>
</section>
Plain Tailwind .astro
<!-- Every class is standard Tailwind.
     Change anything you want. -->
<h1 class="text-5xl font-extrabold
           tracking-tight text-gray-950">
  Beautiful blocks.
</h1>
Works anywhere .astro
<!-- Renders to plain HTML.
     Use it in React, Vue, or any framework. -->
<section class="relative isolate ...">
  <div class="mx-auto max-w-3xl">
    ...
  </div>
</section>