gem.sh gem.sh
Home Gems Types Docs Community
  • Modules

    • module Erb
    • module Erb::Generators
    • module Haml
    • module Haml::Generators
    • module Locale
    • module Locale::Generators
    • module Preview
    • module Preview::Generators
    • module PreviewHelper
    • module Rails
    • module Rails::Generators
    • module Rspec
    • module Rspec::Generators
    • module Slim
    • module Slim::Generators
    • module Stimulus
    • module Stimulus::Generators
    • module Tailwindcss
    • module Tailwindcss::Generators
    • module TestUnit
    • module TestUnit::Generators
    • module ViewComponent
    • module ViewComponent::AbstractGenerator
    • module ViewComponent::CaptureCompatibility
    • module ViewComponent::CaptureCompatibility::InstanceMethods
    • module ViewComponent::CompileCache
    • module ViewComponent::InlineTemplate
    • module ViewComponent::Instrumentation
    • module ViewComponent::PreviewActions
    • module ViewComponent::RenderComponentHelper
    • module ViewComponent::RenderComponentToStringHelper
    • module ViewComponent::RenderMonkeyPatch
    • module ViewComponent::RenderToStringMonkeyPatch
    • module ViewComponent::RenderingComponentHelper
    • module ViewComponent::RenderingMonkeyPatch
    • module ViewComponent::Slotable
    • module ViewComponent::SystemTestHelpers
    • module ViewComponent::TestHelpers
    • module ViewComponent::Translatable
    • module ViewComponent::UseHelpers
    • module ViewComponent::VERSION
    • module ViewComponent::WithContentHelper
    • module YARD
  • Classes

    • class Erb::Generators::ComponentGenerator
    • class Haml::Generators::ComponentGenerator
    • class Locale::Generators::ComponentGenerator
    • class Preview::Generators::ComponentGenerator
    • class Rails::Generators::ComponentGenerator
    • class Rspec::Generators::ComponentGenerator
    • class Slim::Generators::ComponentGenerator
    • class Stimulus::Generators::ComponentGenerator
    • class Tailwindcss::Generators::ComponentGenerator
    • class TestUnit::Generators::ComponentGenerator
    • class ViewComponent::AlreadyDefinedPolymorphicSlotSetterError
    • class ViewComponent::Base
    • class ViewComponent::BaseError
    • class ViewComponent::Collection
    • class ViewComponent::Compiler
    • class ViewComponent::ComponentError
    • class ViewComponent::Config
    • class ViewComponent::ContentAlreadySetForPolymorphicSlotError
    • class ViewComponent::ContentSlotNameError
    • class ViewComponent::ControllerCalledBeforeRenderError
    • class ViewComponent::DocsBuilderComponent
    • class ViewComponent::DocsBuilderComponent::ErrorKlassDoc
    • class ViewComponent::DocsBuilderComponent::MethodDoc
    • class ViewComponent::DocsBuilderComponent::Section
    • class ViewComponent::DuplicateContentError
    • class ViewComponent::DuplicateSlotContentError
    • class ViewComponent::EmptyOrInvalidInitializerError
    • class ViewComponent::Engine
    • class ViewComponent::HelpersCalledBeforeRenderError
    • class ViewComponent::InvalidCollectionArgumentError
    • class ViewComponent::InvalidSlotDefinitionError
    • class ViewComponent::InvalidSlotNameError
    • class ViewComponent::MissingCollectionArgumentError
    • class ViewComponent::MissingPreviewTemplateError
    • class ViewComponent::MultipleInlineTemplatesError
    • class ViewComponent::MultipleMatchingTemplatesForPreviewError
    • class ViewComponent::NilWithContentError
    • class ViewComponent::NoMatchingTemplatesForPreviewError
    • class ViewComponent::Preview
    • class ViewComponent::RedefinedSlotError
    • class ViewComponent::ReservedParameterError
    • class ViewComponent::ReservedPluralSlotNameError
    • class ViewComponent::ReservedSingularSlotNameError
    • class ViewComponent::Slot
    • class ViewComponent::SlotPredicateNameError
    • class ViewComponent::SystemTestCase
    • class ViewComponent::SystemTestControllerNefariousPathError
    • class ViewComponent::SystemTestControllerOnlyAllowedInTestError
    • class ViewComponent::TemplateError
    • class ViewComponent::TestCase
    • class ViewComponent::Translatable::I18nBackend
    • class ViewComponent::TranslateCalledBeforeRenderError
    • class ViewComponent::UncountableSlotNameError
    • class ViewComponentsController
    • class ViewComponentsSystemTestController
    • class YARD::MattrAccessorHandler
    Overview
    H
    Home
    R
    Reference
    T
    Types
    C
    Changelogs
  • Documentation
    • README
    • Changelog
  • More
    • Versions
    • Source
    • Playground
    • Stats
    • Metadata
    • Wiki
    • Announcements
    Community
    • Articles
    • Tutorials
    • Videos
    • Community
  1. Gems
  2. view_component
  3. 3.13.0

view_component

A framework for building reusable, testable & encapsulated view components in Ruby on Rails.

Types
Docs
Guides
Zeitwerk
Namespace
Optimized

Version

3.13.0

Authors

ViewComponent Team

Dependencies

activesupport, method_source, concurrent-ruby, appraisal, benchmark-ips, better_html, bundler, capybara, cuprite, debug, erb_lint, haml, jbuilder, m, minitest, pry, puma, rake, rspec-rails, rubocop-md, selenium-webdriver, standard, simplecov, simplecov-console, slim, sprockets-rails, warning, yard, yard-activesupport-concern, net-imap, net-pop, net-smtp

Quick Start

bundle add view_component

Getting Started

Learn more about the View_component gem.

Installation

Learn more about how to install and configure the gem

Documentation

Learn more about the details

Guides

Learn more about the gem in the written guides

Reference

Learn more about the classes and modules

Documentation

docs/CHANGELOG.md

Read about "Changelog" in view_component

Read more

Playground

Test, play and inspect the gem for yourself

irb(main):001:0>

            

Playground

Run a Ruby playground with the view_component gem pre-installed

Play

Top-Level Modules

  • Erb
  • Haml
  • Locale
  • Preview
  • PreviewHelper
  • Rails
  • Rspec
  • Slim
  • Stimulus
  • Tailwindcss
  • TestUnit
  • ViewComponent
  • YARD

Top-Level Classes

  • ViewComponentsController
  • ViewComponentsSystemTestController
Home
Gems
Docs
Contribute
Monitoring
Twitter GitHub Mastodon

© 2025 gem.sh - Beautiful documentation for any Ruby gem