1.0.7 • Published 11 months ago

astro-directives v1.0.7

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

astro-directives npm

An astro integration for more client directives.

How to use

Install the package

npm install astro-directives

Update astro.config.mjs

import { defineConfig } from "astro/config";
import directives from "astro-directives";

export default defineConfig({
  // ...
  integrations: [directives()],
  experimental: {
    customClientDirectives: true,
  },
});

Note The experimental.customClientDirectives flag may not be needed in the future.

Use a directive

<Component client:hover />

Directives

AttributeLoad the javascript and hydrate on ...
client:clickelement click event
client:hoverelement mouseover event
client:scrollwindow scroll event
1.0.7

11 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago