DevactionUI.Tag (devaction_ui v0.1.0)

Copy Markdown View Source

The small mono label of the canvas: EM RISCO, AGUARDANDO, EM DIA, APRENDIZADO, PLANEJADO.

Geist Mono, uppercase, 0.06em tracking, 6px radius, 1px border. The five variants take their border, background and text from the --tag-* tokens, so they flip with the theme. The variant says what the tag means, not what color it is: :risk, :warn, :ok, :info, :neutral.

size: :sm is the 11px tag of lists and cards; surface: :plain puts it on a white background, for tags that sit inside a tinted card (a finding, a callout), where a tinted tag would vanish.

case: :normal keeps the text as written, for a value that is code (:risk, phx-click) and would be wrong in capitals.

Summary

Functions

tag(assigns)

Attributes

  • variant (:atom) - Defaults to :neutral. Must be one of :risk, :warn, :ok, :info, or :neutral.
  • size (:atom) - Defaults to :md. Must be one of :md, or :sm.
  • surface (:atom) - :plain for a tag inside a tinted card. Defaults to :tinted. Must be one of :tinted, or :plain.
  • case (:atom) - :normal for a value that is code and must keep its letters. Defaults to :upper. Must be one of :upper, or :normal.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)