Available Framework Integrations
React
The most popular JavaScript library for building user interfaces
Vue
Progressive JavaScript framework for building web interfaces
Svelte
Compile-time framework for building web applications
Solid
Declarative JavaScript library for building user interfaces
React
The@astrojs/react integration enables rendering and client-side hydration for your React components.
Installation
- Automatic
- Manual
Usage Example
src/components/Counter.jsx
src/pages/index.astro
Configuration Options
Multiple JSX Frameworks
When using multiple JSX frameworks, specify which files belong to which framework:astro.config.mjs
Vue
The@astrojs/vue integration enables rendering and client-side hydration for your Vue 3 components.
Installation
- Automatic
- Manual
Usage Example
src/components/Counter.vue
src/pages/index.astro
Configuration Options
App Entrypoint
Extend the Vue app instance to add plugins:astro.config.mjs
src/pages/_app.ts
Vue JSX
Enable Vue JSX support:astro.config.mjs
Svelte
The@astrojs/svelte integration enables rendering and client-side hydration for your Svelte 5 components.
Installation
- Automatic
- Manual
Usage Example
src/components/Counter.svelte
src/pages/index.astro
Client Directives
All framework components support client directives for 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 client
Mixing Frameworks
You can use multiple frameworks in the same project and even on the same page:src/pages/index.astro