Playground

Astro

Add the React integration, load the CSS in a layout and hydrate interactive components with a client directive.

Installation

  1. Add React and the packages

    npx astro add react
    npm install @monoline/react @monoline/css
    
  2. Load the CSS and hydrate with a client directive

    src/layouts/Base.astro
    ---
    import '@monoline/css';
    import {Button} from '@monoline/react';
    ---
    <Button client:load>Save</Button>