You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To initialize this component for all supported browsers, you must add scripts to the head of the document that point to their location on the CDN.
Initialization HTML
<!-- OPTIONAL: preloaded dependency for a performance boost --><linkrel="preload" crossoriginhref="https://unpkg.com/@live-components/img-icon@1.1.0/partials/iconConfigs.mjs" crossoriginas="script"/><!-- REQUIRED: main module for modern Evergreen browsers (Safari, Edge, Chrome, Mobile Safari, and Firefox) --><scriptcrossorigintype="module" src="https://unpkg.com/@live-components/img-icon@1.0.0/img-icon.mjs"></script><!-- OPTIONAL: fallback module if basic styling and function support for older browsers is needed (IE11) --><scriptcrossoriginnomoduletype="text/javascript" src="https://unpkg.com/@live-components/img-icon@1.0.0/img-icon.js"></script>
CSS Custom Properties (variables)
The base color property is for the background color and color is the foreground.
Variable Name
Default Value
--img-icon--base-color
#e0e0e0
--img-icon--color
#fff
Attributes
Attribute Name
Default Value
Expected Value(s)
fill
0
expected values are 0 - 100 representing the percentage of foreground color shown
shape
star
expected values are listed in the 'Icon Shapes' section
Slots
name
summary
type
SEO Requirement
ii:fallback
basic fallback image in case of errors and/or component failure
static
❌
Custom Event Hooks
name
detail data
summary
ph:userchange
{ userIsLoggedIn: boolean, userName: string }
triggers when user name is updated
Fallback Dependencies
These are the dependencies for the optional nomodule script.