View Source Iconify.Icon (Bonfire v0.9.10-classic-beta.169)
A Surface
component for rendering icons using various methods.
Specifying what icon to use
iconify
oricon
: Any icon from Iconify (https://icones.js.org)solid
: Shorthand for Heroicons solid iconsoutline
: Shorthand for Heroicons outline icons
Extra Properties
svg
: Optionally pass SVG markup directlymode
: Sets what rendering mode to use (seeIconify
docs)class
: Any CSS classes to apply to the icon
Examples
iex> alias Iconify.Icon
iex> ~F"<#Icon iconify="heroicons-solid:user" class="w-6 h-6" />"
# Returns rendered icon HTML
iex> ~F"<#Icon solid="user" class="w-6 h-6" />"
iex> ~F"<#Icon svg="<svg>...</svg>" class="w-6 h-6" />"
Properties
- iconify :string, required: false, static: true
- icon :string, required: false, static: true
- solid :string, required: false, static: true
- outline :string, required: false, static: true
- svg :string, default: nil, required: false, static: true
- mode :atom, required: false, static: true
- class :css_class, default: nil