diff --git a/Alpine.js DOCS.md b/Alpine.js DOCS.md
index e38b372..c4d2130 100644
--- a/Alpine.js DOCS.md
+++ b/Alpine.js DOCS.md
@@ -748,8 +748,11 @@ Because `x-data` is evaluated as a normal JavaScript object, in addition to st
For example, let's extract the "Toggle Content" behavior into a method on `x-data`.
-```
-
Content...
+```html
+
+
+
Content...
+
```
Notice the added `toggle() { this.open = ! this.open }` method on `x-data`. This method can now be called from anywhere inside the component.
@@ -758,11 +761,14 @@ You'll also notice the usage of `this.` to access state on the object itself.
If you prefer, you can leave the calling parenthesis off of the `toggle` method completely. For example:
-```
-
+```html
+
+
+
+
```
-## [Getters](https://alpinejs.dev/directives/data#getters)
+## Getters
JavaScript [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) are handy when the sole purpose of a method is to return data based on other state.
@@ -770,52 +776,1819 @@ Think of them like "computed properties" (although, they are not cached like Vue
Let's refactor our component to use a getter called `isOpen` instead of accessing `open` directly.
-```
-
Content...
+```html
+
+
+
+
Content...
+
```
Notice the "Content" now depends on the `isOpen` getter instead of the `open` property directly.
In this case there is no tangible benefit. But in some cases, getters are helpful for providing a more expressive syntax in your components.
-## [Data-less components](https://alpinejs.dev/directives/data#data-less-components)
+## Data-less components
Occasionally, you want to create an Alpine component, but you don't need any data.
In these cases, you can always pass in an empty object.
-```
+```html
```
However, if you wish, you can also eliminate the attribute value entirely if it looks better to you.
-```
+```html
```
-## [Single-element components](https://alpinejs.dev/directives/data#single-element-components)
+## Single-element components
Sometimes you may only have a single element inside your Alpine component, like the following:
-```
-
+```html
+
+
+
```
In these cases, you can declare `x-data` directly on that single element:
-```
-
+```html
+
```
-## [Re-usable Data](https://alpinejs.dev/directives/data#re-usable-data)
+## Re-usable Data
If you find yourself duplicating the contents of `x-data`, or you find the inline syntax verbose, you can extract the `x-data` object out to a dedicated component using `Alpine.data`.
Here's a quick example:
-```
-
Content...
+```html
+
+
+
Content...
+
+
+
```
-[→ Read more about `Alpine.data(...)`](https://alpinejs.dev/globals/alpine-data)
\ No newline at end of file
+# x-init
+
+The `x-init` directive allows you to hook into the initialization phase of any element in Alpine.
+
+```html
+
+```
+
+In the above example, "I'm being initialized!" will be output in the console before it makes further DOM updates.
+
+Consider another example where `x-init` is used to fetch some JSON and store it in `x-data` before the component is processed.
+
+```html
+
...
+```
+
+## $nextTick
+
+Sometimes, you want to wait until after Alpine has completely finished rendering to execute some code.
+
+This would be something like `useEffect(..., [])` in react, or `mount` in Vue.
+
+By using Alpine's internal `$nextTick` magic, you can make this happen.
+
+```html
+
+```
+
+## Standalone `x-init`
+
+You can add `x-init` to any elements inside or outside an `x-data` HTML block. For example:
+
+```html
+
+
+
+
+```
+
+## Auto-evaluate init() method
+
+If the `x-data` object of a component contains an `init()` method, it will be called automatically. For example:
+
+```html
+
...
+```
+
+This is also the case for components that were registered using the `Alpine.data()` syntax.
+
+```js
+Alpine.data('dropdown', () => ({
+ init() {
+ console.log('I will get evaluated when initializing each "dropdown" component.')
+ },
+}))
+```
+
+If you have both an `x-data` object containing an `init()` method and an `x-init` directive, the `x-data` method will be called before the directive.
+
+```html
+
...
+
+```
+
+# x-show
+
+`x-show` is one of the most useful and powerful directives in Alpine. It provides an expressive way to show and hide DOM elements.
+
+Here's an example of a simple dropdown component using `x-show`.
+
+```html
+
+
+
Dropdown Contents...
+
+```
+
+When the "Toggle Dropdown" button is clicked, the dropdown will show and hide accordingly.
+
+> If the "default" state of an `x-show` on page load is "false", you may want to use `x-cloak` on the page to avoid "page flicker" (The effect that happens when the browser renders your content before Alpine is finished initializing and hiding it.) You can learn more about `x-cloak` in its documentation.
+
+## With transitions
+
+If you want to apply smooth transitions to the `x-show` behavior, you can use it in conjunction with `x-transition`. You can learn more about that directive [here](https://alpinejs.dev/directives/transition), but here's a quick example of the same component as above, just with transitions applied.
+
+```html
+
+
+
Dropdown Contents...
+
+```
+
+## Using the important modifier
+
+Sometimes you need to apply a little more force to actually hide an element. In cases where a CSS selector applies the `display` property with the `!important` flag, it will take precedence over the inline style set by Alpine.
+
+In these cases you may use the `.important` modifier to set the inline style to `display: none !important`.
+
+```html
+
+
+
Dropdown Contents...
+
+```
+
+# x-bind
+
+`x-bind` allows you to set HTML attributes on elements based on the result of JavaScript expressions.
+
+For example, here's a component where we will use `x-bind` to set the placeholder value of an input.
+
+```html
+
+
+
+```
+
+## Shorthand syntax
+
+If `x-bind:` is too verbose for your liking, you can use the shorthand: `:`. For example, here is the same input element as above, but refactored to use the shorthand syntax.
+
+```html
+
+```
+
+## Binding classes
+
+`x-bind` is most often useful for setting specific classes on an element based on your Alpine state.
+
+Here's a simple example of a simple dropdown toggle, but instead of using `x-show`, we'll use a "hidden" class to toggle an element.
+
+```html
+
+
+
Dropdown Contents...
+
+```
+
+Now, when `open` is `false`, the "hidden" class will be added to the dropdown.
+
+### Shorthand conditionals
+
+In cases like these, if you prefer a less verbose syntax you can use JavaScript's short-circuit evaluation instead of standard conditionals:
+
+```html
+
+
+
+```
+
+The inverse is also available to you. Suppose instead of `open`, we use a variable with the opposite value: `closed`.
+
+```html
+
+
+
+```
+
+### Class object syntax
+
+Alpine offers an additional syntax for toggling classes if you prefer. By passing a JavaScript object where the classes are the keys and booleans are the values, Alpine will know which classes to apply and which to remove. For example:
+
+```html
+
+```
+
+This technique offers a unique advantage to other methods. When using object-syntax, Alpine will NOT preserve original classes applied to an element's `class` attribute.
+
+For example, if you wanted to apply the "hidden" class to an element before Alpine loads, AND use Alpine to toggle its existence you can only achieve that behavior using object-syntax:
+
+```html
+
+```
+
+In case that confused you, let's dig deeper into how Alpine handles `x-bind:class` differently than other attributes.
+
+### Special behavior
+
+`x-bind:class` behaves differently than other attributes under the hood.
+
+Consider the following case.
+
+```html
+
+```
+
+If "class" were any other attribute, the `:class` binding would overwrite any existing class attribute, causing `opacity-50` to be overwritten by either `hidden` or `''`.
+
+However, Alpine treats `class` bindings differently. It's smart enough to preserve existing classes on an element.
+
+For example, if `hide` is true, the above example will result in the following DOM element:
+
+```html
+
+```
+
+If `hide` is false, the DOM element will look like:
+
+```html
+
+```
+
+This behavior should be invisible and intuitive to most users, but it is worth mentioning explicitly for the inquiring developer or any special cases that might crop up.
+
+## Binding styles
+
+Similar to the special syntax for binding classes with JavaScript objects, Alpine also offers an object-based syntax for binding `style` attributes.
+
+Just like the class objects, this syntax is entirely optional. Only use it if it affords you some advantage.
+
+```html
+
+
+
+```
+
+Conditional inline styling is possible using expressions just like with x-bind:class. Short circuit operators can be used here as well by using a styles object as the second operand.
+
+```html
+
+
+
+```
+
+One advantage of this approach is being able to mix it in with existing styles on an element:
+
+```html
+
+
+
+```
+
+And like most expressions in Alpine, you can always use the result of a JavaScript expression as the reference:
+
+```html
+
+
+
+
+
+
+
+```
+
+## Binding Alpine Directives Directly
+
+`x-bind` allows you to bind an object of different directives and attributes to an element.
+
+The object keys can be anything you would normally write as an attribute name in Alpine. This includes Alpine directives and modifiers, but also plain HTML attributes. The object values are either plain strings, or in the case of dynamic Alpine directives, callbacks to be evaluated by Alpine.
+
+```html
+
+
+ Dropdown Contents
+
+
+
+```
+
+There are a couple of caveats to this usage of `x-bind`:
+
+> When the directive being "bound" or "applied" is `x-for`, you should return a normal expression string from the callback. For example: `['x-for']() { return 'item in items' }`
+
+
+# x-on
+
+`x-on` allows you to easily run code on dispatched DOM events.
+
+Here's an example of simple button that shows an alert when clicked.
+
+```html
+
+```
+
+> `x-on` can only listen for events with lower case names, as HTML attributes are case-insensitive. Writing `x-on:CLICK` will listen for an event named `click`. If you need to listen for a custom event with a camelCase name, you can use the [`.camel` helper](https://alpinejs.dev/directives/on#camel) to work around this limitation. Alternatively, you can use [`x-bind`](https://alpinejs.dev/directives/bind#bind-directives) to attach an `x-on` directive to an element in javascript code (where case will be preserved).
+
+## Shorthand syntax
+
+If `x-on:` is too verbose for your tastes, you can use the shorthand syntax: `@`.
+
+Here's the same component as above, but using the shorthand syntax instead:
+
+```html
+
+```
+
+## The event object
+
+If you wish to access the native JavaScript event object from your expression, you can use Alpine's magic `$event` property.
+
+```html
+
+```
+
+In addition, Alpine also passes the event object to any methods referenced without trailing parenthesis. For example:
+
+```html
+
+
+```
+
+## Keyboard events
+
+Alpine makes it easy to listen for `keydown` and `keyup` events on specific keys.
+
+Here's an example of listening for the `Enter` key inside an input element.
+
+```html
+
+```
+
+You can also chain these key modifiers to achieve more complex listeners.
+
+Here's a listener that runs when the `Shift` key is held and `Enter` is pressed, but not when `Enter` is pressed alone.
+
+```html
+
+```
+
+You can directly use any valid key names exposed via [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) as modifiers by converting them to kebab-case.
+
+```html
+
+```
+
+For easy reference, here is a list of common keys you may want to listen for.
+
+| Modifier | Keyboard Key |
+| ------------------------------ | ---------------------------------- |
+| `.shift` | Shift |
+| `.enter` | Enter |
+| `.space` | Space |
+| `.ctrl` | Ctrl |
+| `.cmd` | Cmd |
+| `.meta` | Cmd on Mac, Windows key on Windows |
+| `.alt` | Alt |
+| `.up` `.down` `.left` `.right` | Up/Down/Left/Right arrows |
+| `.escape` | Escape |
+| `.tab` | Tab |
+| `.caps-lock` | Caps Lock |
+| `.equal` | Equal, `=` |
+| `.period` | Period, `.` |
+| `.comma` | Comma, `,` |
+| `.slash` | Forward Slash, `/` |
+
+## Mouse events
+
+Like the above Keyboard Events, Alpine allows the use of some key modifiers for handling `click` events.
+
+|Modifier|Event Key|
+|---|---|
+|`.shift`|shiftKey|
+|`.ctrl`|ctrlKey|
+|`.cmd`|metaKey|
+|`.meta`|metaKey|
+|`.alt`|altKey|
+
+These work on `click`, `auxclick`, `context` and `dblclick` events, and even `mouseover`, `mousemove`, `mouseenter`, `mouseleave`, `mouseout`, `mouseup` and `mousedown`.
+
+Here's an example of a button that changes behaviour when the `Shift` key is held down.
+
+```html
+
+```
+
+> Note: Normal click events with some modifiers (like `ctrl`) will automatically become `contextmenu` events in most browsers. Similarly, `right-click` events will trigger a `contextmenu` event, but will also trigger an `auxclick` event if the `contextmenu` event is prevented.
+
+## Custom events
+
+Alpine event listeners are a wrapper for native DOM event listeners. Therefore, they can listen for ANY DOM event, including custom events.
+
+Here's an example of a component that dispatches a custom DOM event and listens for it as well.
+
+```html
+
+
+
+```
+
+When the button is clicked, the `@foo` listener will be called.
+
+Because the `.dispatchEvent` API is verbose, Alpine offers a `$dispatch` helper to simplify things.
+
+Here's the same component re-written with the `$dispatch` magic property.
+
+```html
+
+
+
+```
+
+## Modifiers
+
+Alpine offers a number of directive modifiers to customize the behavior of your event listeners.
+
+### .prevent
+
+`.prevent` is the equivalent of calling `.preventDefault()` inside a listener on the browser event object.
+
+```html
+
+```
+
+In the above example, with the `.prevent`, clicking the button will NOT submit the form to the `/foo` endpoint. Instead, Alpine's listener will handle it and "prevent" the event from being handled any further.
+
+### .stop
+
+Similar to `.prevent`, `.stop` is the equivalent of calling `.stopPropagation()` inside a listener on the browser event object.
+
+```html
+
+
+
+```
+
+In the above example, clicking the button WON'T log the message. This is because we are stopping the propagation of the event immediately and not allowing it to "bubble" up to the `
` with the `@click` listener on it.
+
+### .outside
+
+`.outside` is a convenience helper for listening for a click outside of the element it is attached to. Here's a simple dropdown component example to demonstrate:
+
+```html
+
+
+
Contents...
+
+```
+
+In the above example, after showing the dropdown contents by clicking the "Toggle" button, you can close the dropdown by clicking anywhere on the page outside the content.
+
+This is because `.outside` is listening for clicks that DON'T originate from the element it's registered on.
+
+> It's worth noting that the `.outside` expression will only be evaluated when the element it's registered on is visible on the page. Otherwise, there would be nasty race conditions where clicking the "Toggle" button would also fire the `@click.outside` handler when it is not visible.
+
+### .window
+
+When the `.window` modifier is present, Alpine will register the event listener on the root `window` object on the page instead of the element itself.
+
+```html
+
...
+```
+
+The above snippet will listen for the "escape" key to be pressed ANYWHERE on the page.
+
+Adding `.window` to listeners is extremely useful for these sorts of cases where a small part of your markup is concerned with events that take place on the entire page.
+
+### .document
+
+`.document` works similarly to `.window` only it registers listeners on the `document` global, instead of the `window` global.
+
+### .once
+
+By adding `.once` to a listener, you are ensuring that the handler is only called ONCE.
+
+```html
+
+```
+
+### .debounce
+
+Sometimes it is useful to "debounce" an event handler so that it only is called after a certain period of inactivity (250 milliseconds by default).
+
+For example if you have a search field that fires network requests as the user types into it, adding a debounce will prevent the network requests from firing on every single keystroke.
+
+```html
+
+```
+
+Now, instead of calling `fetchResults` after every keystroke, `fetchResults` will only be called after 250 milliseconds of no keystrokes.
+
+If you wish to lengthen or shorten the debounce time, you can do so by trailing a duration after the `.debounce` modifier like so:
+
+```html
+
+```
+
+Now, `fetchResults` will only be called after 500 milliseconds of inactivity.
+
+### .throttle
+
+`.throttle` is similar to `.debounce` except it will release a handler call every 250 milliseconds instead of deferring it indefinitely.
+
+This is useful for cases where there may be repeated and prolonged event firing and using `.debounce` won't work because you want to still handle the event every so often.
+
+For example:
+
+```html
+
...
+```
+
+The above example is a great use case of throttling. Without `.throttle`, the `handleScroll` method would be fired hundreds of times as the user scrolls down a page. This can really slow down a site. By adding `.throttle`, we are ensuring that `handleScroll` only gets called every 250 milliseconds.
+
+> Fun Fact: This exact strategy is used on this very documentation site to update the currently highlighted section in the right sidebar.
+
+Just like with `.debounce`, you can add a custom duration to your throttled event:
+
+```html
+
...
+```
+
+Now, `handleScroll` will only be called every 750 milliseconds.
+
+### .self
+
+By adding `.self` to an event listener, you are ensuring that the event originated on the element it is declared on, and not from a child element.
+
+```html
+
+```
+
+In the above example, we have an `` tag inside the `