Back to the knowledge base

Stimulus controllers for Rails app

Stimulus is a modest framework built at Basecamp. It works with the HTML you already have, this means you don’t have to create separate template (files) with Javascript. Instead you use the HTML rendered by your server. The HTML you already know and love. Easy and straightforward. So it’s the perfect choice to add some UI enhancements to your new Ruby on Rails product. Stimulus works with “controllers” that are simply called within your HTML.

Sjabloon adds in a variety of Stimulus controllers to help you kick start your next big project. Some of these are:

Stimulus modal controller

This controller gives you the ability to show a modal on a background overlay.

Stimulus form validation controller

The form validation is an easy to use controller that use HTML5 attributes to help you validate your form fields.

Stimulus accordion controller

The accordion is a common UI element where you can store question - answer type of content. You click the question to reveal the answer. You are of course not limited to questions and answers: use your imagination to use it to however you see fit.

Stimulus dropdown controller

The famous dropdown can be easily added by using this controller. The contents of the dropdown are completely up to you.

Stimulus tabs controller

Used on the default homepage design. The tabs controller can be used as basic tabs-layout or you can use it as seen on the default homepage design.

These are just some of the controller that are packaged into Sjabloon. The library is constantly expanding and I happily take requests if something is missing. Check out some of these in the UI components library.

A Rails SaaS starter kit to focus on your core product

Get started

25+ developers, companies and freelancers bought Sjabloon in the last 4 weeks