Menu

Components

AccordionAvatarBadgeButtonLinkRowSkeletonTabs
Essence

Tabs

Renders a tabs element


General

Features

Testimonials

render Tabs.new do |tabs|
  tabs.menu do
    tabs.tab(key: :general) { "General" }
    tabs.tab(key: :features) { "Features" }
    tabs.tab(key: :testimonials) { "Testimonials" }
  end
  tabs.panel(key: :general) { p { "General" } }
  tabs.panel(key: :features) { p { "Features" } }
  tabs.panel(key: :testimonials) { p { "Testimonials" } }
end

Usage

Add the component to your project

bundle exec essence add tabs