A simple poll application in Alpine.js
I recently created a tiny poll application Just a poll in the spirit of Janeček voting method (more about it here) and I wanted to share my experience from using Alpine.js and Tailwind CSS together.
I have already written about my first impressions from using Tailwind CSS. This project confirmed what I expressed already: Tailwind CSS is definitely a good choice for small web sites with custom design like landing pages or small apps like this one. It is great for rapid design prototyping where we want to have a custom design, but at the same time the design is not created by a graphic designer beforehand.
- It is smaller than Vue.js
- I didn’t need features like the Vue router, since I wasn’t creating a Single Page Application
- Alpine.js has basically the same syntax and mechanics like Vue.js, so I didn’t have to learn much to use it
- At the same time, Alpine.js still has basically everything anyone might want, e.g. data binding, transitions
Now that the project is done I can say that Alpine.js delivered and using it was a joy.
Since I don’t have any build step/minification on the site, you can have a look at the code on every page for the implementation details (just open the page source in the browser):
- justapoll.contentwok.com – home page, creating a new poll
- justapoll.contentwok.com/polls/981739d0852c43a9ab2e – a sample poll, voting
- justapoll.contentwok.com/polls/981739d0852c43a9ab2e/results – a sample poll results page
If you want to give me a comment on the application itself, you can do so on the IH discussion.
Last updated on 16.10.2020.