Clarity.IconComponents (Clarity v0.5.1)

Copy Markdown View Source

Provides reusable icon components for the Clarity application.

All icons are prefixed with icon_ and accept a class attribute for custom styling.

Summary

Functions

Renders an aperture icon (camera aperture).

Renders a check icon (checkmark).

Renders a chevron down icon (dropdown arrow).

Renders a clipboard icon (copy to clipboard).

Renders a close icon (X symbol).

Renders a code icon (source code brackets).

Renders an error icon (circle with exclamation mark).

Renders an external link icon (arrow out of box).

Renders an info icon (circle with i).

Renders a menu icon (hamburger menu).

Renders a moon icon (theme toggle).

Renders a refresh icon (circular arrows).

Renders a sliders icon (adjustments/settings).

Renders a spinner icon (loading animation).

Renders a success icon (circle with checkmark).

Renders a sun icon (theme toggle).

Renders a warning icon (triangle with exclamation).

Functions

icon_aperture(assigns)

@spec icon_aperture(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders an aperture icon (camera aperture).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_check(assigns)

@spec icon_check(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a check icon (checkmark).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_chevron_down(assigns)

@spec icon_chevron_down(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a chevron down icon (dropdown arrow).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_clipboard(assigns)

@spec icon_clipboard(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a clipboard icon (copy to clipboard).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_close(assigns)

@spec icon_close(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a close icon (X symbol).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_code(assigns)

Renders a code icon (source code brackets).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_error(assigns)

@spec icon_error(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders an error icon (circle with exclamation mark).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_external_link(assigns)

@spec icon_external_link(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders an external link icon (arrow out of box).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_info(assigns)

Renders an info icon (circle with i).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_menu(assigns)

Renders a menu icon (hamburger menu).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_moon(assigns)

Renders a moon icon (theme toggle).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_refresh(assigns)

@spec icon_refresh(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a refresh icon (circular arrows).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_sliders(assigns)

@spec icon_sliders(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a sliders icon (adjustments/settings).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_spinner(assigns)

@spec icon_spinner(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a spinner icon (loading animation).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_success(assigns)

@spec icon_success(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a success icon (circle with checkmark).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_sun(assigns)

Renders a sun icon (theme toggle).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.

icon_warning(assigns)

@spec icon_warning(assigns :: Phoenix.LiveView.Socket.assigns()) ::
  Phoenix.LiveView.Rendered.t()

Renders a warning icon (triangle with exclamation).

Attributes

  • class (:any) - CSS classes to apply to the icon. Defaults to "".
  • Global attributes are accepted. Additional HTML attributes.