~/talk

Component Driven UI with ViewComponent gem

Talkat RubyConf TH 2023 · 2023-10-06..10-07· [component-design, ruby-on-rails]
slides:none on file

Describes using the ViewComponent gem with Rails and Tailwind to replace tangled partials/helpers, cutting repeated UI logic into reusable classes with slots, render_many and a custom component helper. Shows concrete builds: filter form builder, stats, page header and a configurable table pattern used across 20–30 components. Integrates previews via Lookbook, avoids extra JS, and uses a fallback_fetch + error reporting strategy that raises in dev/tests but returns safe defaults in production.

AI-written summary · about

  1. 0:00Introduction
  2. 3:40ViewComponent basics
  3. 6:07ViewComponents vs partials/helpers
  4. 10:41UI component framework
  5. 11:45ViewComponent examples
  6. 24:51Advanced patterns
  7. 30:56Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.