fugufish / hotwired_component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HotwiredComponent

HotwiredComponent adds Hotwired centered generators for Github's ViewComponent utilizing the side car method. Components generated using this gem will by convention also generate an scss file and Stimulus controller. Components are class namespaced by their name, and by default every component has a stimulus controller.

Usage

rails g hotwire_component:component My::Widget

Installation

Add this line to your application's Gemfile:

gem 'hotwired_component'

And then execute:

$ bundle

And run:

$ rails g hotwired_component:install

Forms

HotwiredComponent adds it's own form helper, hw_form_with & hw_form_for. This helper may be used to create standardized forms that are already set up to be used with Hotwire and Stimulus.

License

The gem is available as open source under the terms of the MIT License.

About

License:MIT License


Languages

Language:HTML 50.5%Language:Ruby 47.8%Language:JavaScript 0.9%Language:CSS 0.8%