Table of Contents |
---|
Overview
The Icon component renders an SVG image inline with text content.
Selector
The selector for this component is <hawksearch-icon>
.
...
Attribute | Type | Default Value | Required |
---|---|---|---|
name | Yes | ||
size | String or number | 1em | No |
The size
attribute determines the height and width of the icon.
Icon Names
Anchor | ||||
---|---|---|---|---|
|
The IconType
enum lists the icons available to use with this component:
Excerpt | |||||
---|---|---|---|---|---|
| |||||
|
CSS Variables
The following CSS classes are available that allow you to bypass the Shadow DOM and customize the appearance of this component without overriding the Handlebars template:
Variable | Default Value |
---|---|
--icon-font-size |
|
--icon-color |
|
Data Model
The following data model is exposed to the Handlebars template:
Code Block |
---|
{ svg: string, url: string, height: string, width: string } |
Default Template
Code Block | ||
---|---|---|
| ||
{{html svg}} <svg height='"{{height}}'" width='"{{width}}'" focusable='"false'" aria-hidden='"true'" class='"icon'"> <use href='"{{url}}'"></use> </svg> |