Menu

Kbd

⌘⇧S
render Components::Kbd.new { "⌘⇧S" }

Installation

Add the component to your project

CLI

Run the following command in your terminal

bundle exec essence add kbd
Manually

Add the following code and libraries into your project

components/kbd.rb
# frozen_string_literal: true

class Components::Kbd < Components::Essence
  def initialize(**attributes)
    super(**attributes)
  end

  def view_template(&) = kbd(**attributes, &)

  private

  def component_classes
    {
      _: {
        _: "inline-flex w-fit font-medium py-0.5 px-1.5 rounded-xs border border-b-2 border-gray-950/5 bg-gray-50/50 text-gray-600 text-xs font-sans"
      }
    }.freeze
  end
end