Framework Integrations

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.

3 min read Level 1/5 #astro#integrations#react
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

IntegrationWhat it adds
@astrojs/reactReact + JSX support
@astrojs/vueVue SFCs
@astrojs/svelteSvelte components
@astrojs/solid-jsSolid components
@astrojs/mdxMDX content support
@astrojs/sitemapAuto-generated sitemap.xml
@astrojs/tailwindTailwind (or Tailwind 4 via Vite directly)
@astrojs/dbFirst-party SQLite + Drizzle
@astrojs/netlify, @astrojs/vercel, @astrojs/nodeServer adapters

Up Next

A concrete example — a React component as an island.

React in Astro →