@astrojs/tailwind
Tailwind + Astro Integrations
Pull content from anywhere and serve it fast with Astro's next-gen island architecture.
Introducing: Astro Islands
Astro Islands represent a leading paradigm shift for frontend web architecture. Astro extracts your UI into smaller, isolated components on the page. Unused JavaScript is replaced with lightweight HTML, guaranteeing faster loads and time-to-interactive (TTI).
Astro renders HTML on the server and strips away any remaining, unused JavaScript.
Need interactive UI? Load individual, non-blocking component islands in parallel.
Components only hydrate when they scroll into view. If you don't see it, Astro won't load it.
Your content, your way.
Astro works with your favorite content sources. Pull content from the filesystem or fetch it remotely from your favorite CMS, database, or API. Astro supports both static output (SSG) and live server output (SSR) that can render your content on-demand.
With top-level await
, Astro makes it easy to fetch content from your CMS.
---
import { storyblokApi } from "../cms";
const { data } = await storyblokApi.get('cdn/links');
const links = Object.values(data.links);
---
<h1>Using your CMS</h1>
<p>
With top-level await, Astro makes it easy
to fetch content from your CMS.
</p>
<ul>
{links.map((link) => (
<li><a href={link.slug}>{link.name}</a></li>
))}
</ul>
Creating a page using Markdown is easy with Astro!
Add a .md
file
to your pages
directory
and Astro will turn it into a page on your site. You can specify an
Astro component in frontmatter to use as a page layout.
---
title: Creating pages with Markdown
layout: ../layouts/Base.astro
---
Creating a page using Markdown is _easy_ with Astro!
Add a `.md` file to your `pages` directory and Astro
will turn it into a page on your site. You can specify
an Astro component in frontmatter to use as a page
layout.
Creating a page using MDX is easy with Astro!
Add a .mdx
file
to your pages
directory
and Astro will turn it into a page on your site. MDX files make
it easy to mix components from any framework with your text content.
---
title: Creating pages with MDX
layout: ../layouts/Base.astro
---
import Hero from '../components/Hero.astro'
import Counter from '../components/Counter.jsx'
<Hero>
Creating a page using MDX is _easy_ with Astro!
</Hero>
Add a `.mdx` file to your `pages` directory and Astro
will turn it into a page on your site. MDX files make
it easy to mix components from any framework with
your text content.
<Counter client:visible />
With native fetch built-in, Astro makes it easy to work with data from any API. Powered by https://owen-wilson-wow-api.herokuapp.com
---
const response = await fetch('https://owen-wilson-wow-api.herokuapp.com/wows/random');
const data = await response.json();
---
<h1>Using an API</h1>
<p>
With native fetch built-in, Astro makes it easy
to work with data from any API.
Powered by https://owen-wilson-wow-api.herokuapp.com.
</p>
<audio controls>
<source src={data.audio} type="audio/mpeg">
</audio>
Use the tools you already love.
Bring your own component framework. Astro offers first-class support for front-end tools like React, Vue, Svelte, and Tailwind CSS. Avoid confusing configuration and get started in seconds: just type astro add
.
Deploy to anywhere, even the edge.
Astro supports both static output (SSG) and live server output (SSR). No matter what you choose to build, Astro's flexible adapter system makes deployment setup and configuration a breeze.
Explore Astro’s ecosystem.
Get more out of Astro with an ecosystem of 100+ integrations & themes to explore. Community packages make it easy to add new features to your project to improve performance, SEO, analytics, accessibility and more.
Tailwind + Astro Integrations
Load and transform images in your Astro site.
Astro + Partytown integration
Our community is pretty great, too.
The best thing about Astro is its community. The Astro Discord is full of 5000+ builders ready to help you troubleshoot, find inspiration, and have fun as you explore with Astro. Our open governance model allows anyone to contribute and get involved with growing and maintaining Astro. All experience levels welcome!
Astro is free, open source software made possible by these wonderful sponsors: