Thanks for your interest in contributing! This repository is a monorepo containing two sibling projects:
gem/— theruby_uigem published to rubygems.org.docs/— the Rails app that powers https://rubyui.com.
The big advantage of the monorepo: a single PR can touch both the component and the docs example. The docs app consumes the local gem via path: "../gem", so any change in gem/lib/ruby_ui/ is reflected in the running site immediately.
We recommend using the devcontainer for either subproject (each has its own .devcontainer/).
git clone git@github.com:ruby-ui/ruby_ui.git
cd ruby_ui
# For gem-only work:
cd gem
bundle install
bundle exec rake
# For docs work:
cd docs
bundle install
pnpm install
bin/dev- Fork and create a feature branch.
- Make your changes:
- Component or generator changes →
gem/lib/..., with tests ingem/test/.... - Documentation page changes →
docs/app/views/docs/...ordocs/app/components/.... - If a component change affects how it's documented, update both in the same PR.
- Component or generator changes →
- Run the relevant test suites:
cd gem && bundle exec rake(tests + standardrb).cd docs && bin/rails testandbundle exec standardrb.
- Open a Pull Request against
main. Use the PR template and prefix the title with a category in brackets, e.g.[Feature] Add new variant to Button.
We prioritize:
- Improving existing components rather than adding new ones.
- Preserving the shadcn look and feel.
- Enhancing documentation.
- Fixing bugs.
- Ruby: Standard Ruby —
bundle exec standardrb --fixto auto-fix. - JavaScript: kept minimal; Stimulus controllers live alongside the components they belong to.
The gem ships per-component *_docs.rb files (rendering examples) under gem/lib/ruby_ui/<component>/. Consumers of the gem can install these into their own Rails app with:
bin/rails g ruby_ui:install:docsWithin this monorepo, the docs app does not run that generator — it has its own richer view implementations in docs/app/views/docs/ and docs/app/components/docs/. If you change a component's API, update the relevant view in docs/app/views/docs/<component>.rb to keep the documentation site accurate.
Thanks for helping make RubyUI better!