-
-
Notifications
You must be signed in to change notification settings - Fork 233
feat: add alpine-ts example (WIP) #2870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 Description
Adds an example project using Zag with Alpine.js.
examples/alpine-tscontains a nitro app compatible with e2e tests.libcontains the adapter logic mostly similar to other frameworks.lib/plugin.tscontains ausePluginhook which connects a Zag machine to Alpine.js as a plugin.scriptscontains the client scripts andserver/routescontains the jsx for SSR.⛳️ Current behavior (updates)
None
🚀 New behavior
The name passed in when defining the plugin is used through out for directives and magic.
Names and Values of directives should be kebab-case.
The expression, when present, is passed as arguments to the
getComponentPropsfunction.Other api methods are available by calling the corresponding magic. Name of magic is camelCase.
When components need to be more specific (such as when nesting), optional modifiers can be used.
x-datamust be defined for components to work.💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Last updated: 2025/11/29
x-fordoes not trigger inside<svg>