Instrumental Components is a private gem that you can install in your projects, which gives you the ability to install individual components on an as-needed basis. Alternatively, you can use the Starter Kit to get started.
First fire up a fresh Rails app using the following command (or use your own preferences on rails new). The only hard requirement here is to use the latest version of Tailwind CSS.
rails new projectname --css=tailwind
Then cd into your new app's directory.
cd projectname
You should also make sure you have the following installed in your rails project:
rails active_storage:install
rails action_text:install
rails db:migrate
Add the installer gem to your Gemfile.
gem 'instrumental-components'
Then run bundle install.
bundle install
Run the following command to install and register the instrumental-components-library gem into your project.
bundle exec install-instrumental
That will add gem 'instrumental-components-library'
to your Gemfile, inside of the group :development
group.
That's right! You don't actually need to have the instrumental-components-library
in your production environment. It's only used to generate and install code into your project while you're actively developing.
Tip: Done building your app and no need to generate or install new components? It's safe to go ahead and remove the `instrumental-components-library` gem from your Gemfile.
To learn more about building with Instrumental Components and how it works, read up on these:
I created Instrumental Components to make designing and building professional apps with Ruby on Rails easy, fast, and fun. I use it on all of my projects and I hope it helps you build something great.