Heroicons (heroiconex v2.1.0)
Defines a convenience macro icon/1
.
Summary
Functions
Use this macro in Phoenix HEEX templates to generate Heroicons.
Functions
Use this macro in Phoenix HEEX templates to generate Heroicons.
The name of the icon can be defined using the name
attribute or (deprecated)
type
attribute.
The style of the icon is defined by the solid
, outline
, or mini
boolean
attribute or a (deprecated) style
attribute.
Attributes
name
- icon name. Valid names are found at this url.solid
- use solid fill 24x24 icon.outline
- use outline fill 24x24 icon (this is the default).mini
- use mini size (20x20) for elements like buttons, form elements.title
- when defined, include the title value in the SVG.class
- add class attribute to the SVG.rest
- other attributes to add to the SVG.
Example
~H"""
<Heroicons.icon name="academic-cap" solid class="h-4 w-4" title="Cap"/>
<Heroicons.icon type="academic_cap" style="solid" class="h-4 w-4" title="Cap"/>
"""