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
Configuration
astro.config.mjs
Options
Usage Example
Create a React component:src/components/Counter.tsx
src/pages/index.astro
Vue
The Vue integration adds support for Vue 3 components with server-side rendering.Installation
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 theinclude option:
astro.config.mjs
Client Directives
All framework components support Astro’s client directives for controlling hydration:client:load- Hydrate immediately on page loadclient:idle- Hydrate when the browser is idleclient:visible- Hydrate when the component enters the viewportclient:media- Hydrate when a media query matchesclient: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