PetalComponents.Badge (petal_components v3.2.0)

Copy Markdown View Source

Summary

Functions

badge(assigns)

Attributes

  • size (:string) - Defaults to "md". Must be one of "xs", "sm", "md", "lg", or "xl".
  • variant (:string) - Defaults to "light". Must be one of "light", "dark", "soft", or "outline".
  • color (:string) - Defaults to "primary". Must be one of "primary", "secondary", "info", "success", "warning", "danger", or "gray".
  • role (:string) - Defaults to "note". Must be one of "note", or "status".
  • with_icon (:boolean) - adds some icon base classes. Defaults to false.
  • class (:any) - CSS class for parent div. Defaults to nil.
  • label (:string) - label your badge. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block