DevactionUI.Kbd (devaction_ui v0.2.3)

Copy Markdown View Source

A key cap: ⌘K, ESC, ↵. Mono 11px with a thicker bottom edge, as the canvas draws the keyboard hints.

tone picks where it sits: :default is the cap on a light surface, :inverse is the small 10px cap inside a dark surface (the tooltip), with no border, and :bare is just the mono text, without border or background (the shortcut at the end of a menu row). size: :md is the larger cap of the command palette's Esc. The keys are the caller's text: ⌘ is a Mac key, so write Ctrl where the person is not on a Mac.

Summary

Functions

kbd(assigns)

@spec kbd(map()) :: Phoenix.LiveView.Rendered.t()

Attributes

  • tone (:atom) - Defaults to :default. Must be one of :default, :inverse, or :bare.
  • size (:atom) - :md only changes the :default cap. Defaults to :sm. Must be one of :sm, or :md.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)