One Command to Add React, Vue, Svelte, Solid, Preact…
Framework Integrations
`npx astro add <framework>` installs the integration and wires up the config. Mix and match in the same project.
What you'll learn
- Install a framework integration
- Recognize the resulting config changes
- Mix multiple frameworks freely
Astro doesn’t have its own UI framework for islands — it integrates with the major ones. Install whichever you want.
The Command
npx astro add react # or vue, svelte, solid, preact, alpine, lit The CLI installs the framework, adds it to astro.config.mjs, and
configures TypeScript if needed.
After npx astro add react:
// astro.config.mjs
import { defineConfig } from "astro/config";
import react from "@astrojs/react";
export default defineConfig({
integrations: [react()],
}); Now you can drop .tsx / .jsx files in src/components/ and use
them like any other component.
Multiple Frameworks At Once
Yes, in the same project — even on the same page:
import react from "@astrojs/react";
import vue from "@astrojs/vue";
import svelte from "@astrojs/svelte";
export default defineConfig({
integrations: [react(), vue(), svelte()],
}); The cost: each framework’s runtime is its own ~5–10 KB (gzipped). If you only use React for one widget, you pay for one runtime — not the others.
Most projects pick one and stick with it; the multi-framework ability is rare in practice but real when you need it.
Common Integrations
| Integration | What it adds |
|---|---|
@astrojs/react | React + JSX support |
@astrojs/vue | Vue SFCs |
@astrojs/svelte | Svelte components |
@astrojs/solid-js | Solid components |
@astrojs/mdx | MDX content support |
@astrojs/sitemap | Auto-generated sitemap.xml |
@astrojs/tailwind | Tailwind (or Tailwind 4 via Vite directly) |
@astrojs/db | First-party SQLite + Drizzle |
@astrojs/netlify, @astrojs/vercel, @astrojs/node | Server adapters |
Up Next
A concrete example — a React component as an island.
React in Astro →