vimeshjs / vimesh-ui

Vimesh UI is an ultra lightweight library to build UI components for Alpine.js
MIT License
125 stars 5 forks source link

how to define a ID for each template instance #14

Closed ericxin1982 closed 9 months ago

ericxin1982 commented 9 months ago

image

Hi @xinjie-zhang

I knew that is an example only, but if I would to use, then I need a template instance right, since need to distinguish the element from each other. How to do is elegant?

Thanks Eric Xin

xinjie-zhang commented 9 months ago

You could use alpine.js x-id & $id. https://alpinejs.dev/directives/id

ericxin1982 commented 9 months ago

OK.