Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
This post walks through the process of adding a rating system to a Turbo powered single page application. The application in question was built up in a previous post. If you want to follow along with the post, you can grab the repo at the starting point or just read the pull request.
The best way to style an SVG icon (which is one of the big advantages of the format, in my opinion) is to embed the SVG in the HTML document (render it inline with the rest of the HTML) and from there apply CSS styles as you might expect. There's a gem called inline_svg that we'll make use of to make that easier.
The next step in creating our star bar is the stars! We're going to use icons from the wonderful heroicons which is a suite of beautiful SVG icons from the makers of TailwindCSS.
The next step in creating our star bar is the stars! We're going to use icons from the wonderful heroicons which is a suite of beautiful SVG icons from the makers of TailwindCSS.