diff --git a/README.md b/README.md index cf161ec..85dd565 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ npm install agentation -D ## Usage +### React Component + ```tsx import { Agentation } from 'agentation'; @@ -25,6 +27,70 @@ function App() { The toolbar appears in the bottom-right corner. Click to activate, then click any element to annotate it. +### Vanilla JS / Script Tag + +For non-React projects, use the bundled script that works on any website. Perfect for adding visual feedback to Shopify themes, WordPress sites, or any HTML page. + +#### CDN / Script Tag + +Add this one line anywhere in your HTML: + +```html + +``` + +The script auto-initializes on page load. No configuration needed. + +#### Shopify Theme + +Load only in the Theme Editor for design-time feedback: + +```liquid +{% if request.design_mode %} + +{% endif %} +``` + +Add this to `layout/theme.liquid` before the closing `
+` tag. + +#### WordPress + +Load only for logged-in editors: + +```php + + + +``` + +Add this to your theme's `footer.php` or use `wp_enqueue_script` in `functions.php`. + +#### Any HTML Page + +Just add the script tag to your HTML: + +```html + + +
+
+ +
+