https://alpinejs.dev/
Docs Components
[alpine_lon]
Your new, lightweight, JavaScript framework.
Get started -
Content...
Simple.
Lightweight.
Powerful as hell.
Alpine is a rugged, minimal tool for composing behavior directly in
your markup. Think of it like jQuery for the modern web. Plop in a
script tag and get going.
Alpine is a collection of 15 attributes, 6 properties, and 2 methods.
There is no better way to get a feel for what Alpine is and what it
can do, than by seeing it for yourself:
Show More |
x-data
Declare a new Alpine component and its data for a block of HTML
...
x-bind
Dynamically set HTML attributes on an element
...
x-on
Listen for browser events on an element
x-text
Set the text content of an element
Copyright (c)
span>
x-html
Set the inner HTML of an element
...
div>
x-model
Synchronize a piece of data with an input element
Searching for:
x-show
Toggle the visibility of an element
...
x-transition
Transition an element in and out using CSS transitions
...
x-for
Repeat a block of HTML based on a data set
template>
x-if
Conditionally add/remove a block of HTML from the page entirely.
...
x-init
Run code when an element is initialized by Alpine
x-effect
Execute a script each time one of its dependancies change
x-ref
Reference elements directly by their specified keys using the $refs
magic property