Bind an AlpineJS property to a query string parameter
npm install @invoate/alpine-query-string
:construction: :construction_worker: :warning: This is a work in progress. :warning: :construction_worker: :construction:
This is a simple plugin for AlpineJS that binds a property to a specified url query parameter.
You can install this package via NPM:
``shell`
npm install @invoate/alpine-query-string
or by CDN:
`html`
First you must register the plugin with Alpine.
`js
import Alpine from "alpinejs"
import queryString from "@invoate/alpine-query-string"
Alpine.plugin(queryString)
Alpine.start()
`$3
In your views, you can now use the x-query-string directive.
`html`
When the first modifier is not set the parameter name will default to the name of the property
`html``
- Oliver Lumby
- All Contributors
The MIT License (MIT). Please see License File for more information.