PUI.IconProvider behaviour (pui v1.0.0)

Copy Markdown

Behaviour for rendering PUI's semantic icon tokens.

A provider translates PUI-owned icon intent into the host application's icon markup. PUI ships a CSS-class Heroicons provider, while applications can configure providers for Lucide, Tabler, or their own icon component.

Summary

Types

token()

@type token() ::
  :close
  | :chevron_down
  | :chevron_left
  | :chevron_right
  | :chevron_up_down
  | :search
  | :calendar
  | :menu
  | :success
  | :error
  | :warning
  | :info

Callbacks

render(token, map)

@callback render(token(), map()) :: Phoenix.LiveView.Rendered.t()