Skip to main content
Astro supports multiple UI frameworks, allowing you to use your favorite component library or mix and match frameworks in the same project.

Available Framework Integrations

React

Use React components with server-side rendering and client-side hydration

Vue

Add Vue 3 components to your Astro project

Svelte

Integrate Svelte components with support for Svelte 3, 4, and 5

Solid

Use SolidJS components with fine-grained reactivity

Preact

Add lightweight Preact components as a React alternative

Alpine.js

Add Alpine.js for lightweight JavaScript behavior

React

The React integration enables server-side rendering and client-side hydration for React components.

Installation

Or manually:

Configuration

astro.config.mjs

Options

Usage Example

Create a React component:
src/components/Counter.tsx
Use it in an Astro page:
src/pages/index.astro

Vue

The Vue integration adds support for Vue 3 components with server-side rendering.

Installation

Or manually:

Configuration

astro.config.mjs

Options

Usage Example

src/components/Greeting.vue

Svelte

The Svelte integration supports Svelte 3, 4, and 5 with server-side rendering.

Installation

Configuration

astro.config.mjs

Options

Usage Example

src/components/Todo.svelte

Solid

The Solid integration enables SolidJS components with fine-grained reactivity.

Installation

Configuration

astro.config.mjs

Usage Example

src/components/Signal.tsx

Preact

Preact is a lightweight alternative to React with the same modern API.

Installation

Configuration

astro.config.mjs

Options

Alpine.js

Alpine.js allows you to add interactive behavior with minimal JavaScript.

Installation

Configuration

astro.config.mjs

Usage Example

src/components/Dropdown.astro

Using Multiple Frameworks

Astro supports using multiple frameworks in the same project:
astro.config.mjs

Avoiding JSX Conflicts

When using multiple JSX frameworks (React, Preact, Solid), use the include option:
astro.config.mjs
Organize your components by framework:

Client Directives

All framework components support Astro’s client directives for controlling hydration:
  • client:load - Hydrate immediately on page load
  • client:idle - Hydrate when the browser is idle
  • client:visible - Hydrate when the component enters the viewport
  • client:media - Hydrate when a media query matches
  • client:only - Skip server rendering, only render on the client

Next Steps

Official Integrations

Explore MDX, Sitemap, Partytown, and more

SSR Adapters

Deploy with server-side rendering