icon() helper. Prefer the component when rendering UI, including server-rendered UI.
Render an icon
Choose an icon with its collection and name, separated by a colon.collection:name form. For example, devicon:react selects the react icon from the devicon collection.
Examples
These examples use icons from different collections.React
Vue
Sparkles
Use a helper
Useicon() when you need the icon URL or SVG markup outside a component.
Set the display size
Icon components forward native attributes. Set dimensions with your framework’s normal attributes or CSS utilities. The underlying SVG has no fixed width or height. Colored icons retain their source colors, while monochrome icons can inherit the surrounding text color when rendered inline.Browse the catalog
Collections group related icons under a prefix. Icon names are lowercase and usually kebab-case. Aliases resolve to their source icon automatically. Use the collection endpoints in the OpenAPI reference when you need to browse the catalog programmatically.Direct HTTP access
If no integration is available, use the OpenAPI reference for direct image URLs, catalog responses, caching, and errors.