x-partial directive #2181
olivmonnier
started this conversation in
3. Feature Ideas
Replies: 1 comment
-
You can potentially write your own custom directive for your projects: https://alpinejs.dev/advanced/extending#simple-example |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I was wondering about integrate easily an alpine component who is used repeatedly in my html view like a partial in backend framework ? For illustrated, here is an example :
Maybe a new alpine directive with the name
x-partial
initialized when the page is loaded like x-init and accept a selector could be a solution ? But the next question is how we can pass some data to the partial ?This is could be great, especially when you have some blocs elements with very long tailwind classes.
Beta Was this translation helpful? Give feedback.
All reactions