Download Data as a File with Alpine.js / / No Comments As my readers know, I’ve been updating some of my earlier Vue.js examples to demonstrate how they would work with Alpine.js. Normally I post these "conversions" when I see one of the Vue posts pop up in my stats. Today I noticed this entry was "trending" – Vue Quick Shot – Downloading Data as a File. I thought it would be a great candidate for showing an Alpine version. Let’s take a look. While I won’t repeat everything from the previous post, I’ll quickly cover how it worked. First, it makes use of the download attribute of the anchor tag. This will take a normal link operation and instead ask the browser to download the resource at the... more → Posted in: JavaScript Tagged with: Alpine.js, data, download, file
An Alpine.js Template for Glitch / / No Comments I discovered Glitch a few months ago, and while I haven’t used it a lot since then, the more I do, the more I really dig it. When working on my blog post yesterday, I shared the demo as a Glitch project, you can see it here if you would like. While setting up the project, I fumbled a bit with the right order of script tags, which was entirely my fault, but knowing my memory I wanted to note what worked for me, and share it with others. Let’s start with the code first. Raymond Camden… more → Posted in: JavaScript Tagged with: Alpine.js, Glitch, Template
Using Google Maps with Alpine.js / / No Comments It’s been a little while since I’ve blogged about Alpine.js, and I thought an example of integratingGoogle Maps with it would be a good way to continue my path to becoming comfortable with the framework. I imagined it would be fairly simple, but in building a few demos I ran into some interesting issues that helped me learn a bit more about Alpine. Let’s take a look. Raymond Camden… more → Posted in: JavaScript Tagged with: Alpine.js, Google, maps, using
An example of Algolia Search with Alpine.js / / No Comments As my readers know, I’ve been falling in love with Alpine.js lately and am always on the hunt for more ways to practice using the framework. I thought I’d share an example of how you could use it with Algolia’s JavaScript client. I use that on my search page here with Vue.js, so it wasn’t a terribly difficult thing to rebuild a similar interface in Alpine.js. Here’s how I did it. Raymond Camden… more → Posted in: JavaScript Tagged with: Algolia, Alpine.js, example, search
Image Upload Preview in Alpine.js / / No Comments So as I’ve said a few times now, I’m on kind of a trend here on rebuilding previous demos in either vanilla (i.e. no framework) JavaScript or my new favorite framework, Alpine.js. In that vein, I’ve got an update to a post I first wrote nearly a decade ago, "Adding a file display list to a multi-file upload HTML control". I followed that up with a Vue version here: "Vue Quick Shot – Image Upload Previews". The idea was to enhance a form that asks for image uploads by adding a simple preview of the image. This helps as it lets the user be sure they’ve selected the right file. Raymond Camden… more → Posted in: JavaScript Tagged with: Alpine.js, Image, Preview, upload
Building Table Sorting and Pagination in Alpine.js / / No Comments A few months back, I realized that one of my most popular blog posts (Building Table Sorting and Pagination in Vue.js) would be an excellent opportunity to update for a more plain (or vanilla if you will) JavaScript version. That post (Building Table Sorting and Pagination in JavaScript) was pretty fun to write. As much as I enjoyed using Vue over the past few years, I find myself more and more trying to rely less on external frameworks and sticking to simpler methods of getting things done. That being said… I am also really intrigued by Alpine.js. Raymond Camden… more → Posted in: JavaScript Tagged with: Alpine.js, building, Pagination, Sorting, table