Skip to main content
Astro integrations add new functionality and behaviors for your project with only a few lines of code. You can use an official integration, integrations built by the community, or even build a custom integration yourself.

What Integrations Can Do

Integrations can:
  • Unlock React, Vue, Svelte, Solid, and other popular UI frameworks
  • Enable on-demand rendering with an SSR adapter
  • Integrate tools like MDX and Partytown with a few lines of code
  • Add new features to your project, like automatic sitemap generation
  • Write custom code that hooks into the build process, dev server, and more
Browse or search the complete set of hundreds of official and community integrations in the Astro integrations directory.

Installing Integrations

Automatic Setup

Astro includes an astro add command to automate the setup of official integrations. Run the command using your package manager:
npx astro add react
You can add multiple integrations at the same time:
npx astro add react sitemap partytown

Manual Installation

Astro integrations are always added through the integrations property in your astro.config.mjs file. Step 1: Install the integration package
npm install @astrojs/sitemap
Step 2: Import and add to your config file
astro.config.mjs
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';

export default defineConfig({
  integrations: [sitemap()],
});

Configuration Options

Integrations are almost always authored as factory functions that return the actual integration object. This lets you pass arguments and options:
integrations: [
  // Example: Customize your integration with function arguments
  sitemap({ filter: true })
]

Upgrading Integrations

Automatic Upgrading

Upgrade all official integrations at once:
npx @astrojs/upgrade

Manual Upgrading

Upgrade one or more integrations manually:
npm install @astrojs/react@latest @astrojs/partytown@latest

Integration Categories

UI Frameworks

Add support for React, Vue, Svelte, and other UI frameworks

Adapters

Deploy to Netlify, Vercel, and other platforms

Other Integrations

MDX, Sitemap, Partytown, and more tools