2.24.1Icon component in Bolt
A symbolic image. Part of the Bolt “Components” CSS framework that powers the Bolt Design System.
npm install @bolt/components-icon
Tips for custom icons:
-colored.svg.For example: bolt-logo.svg would get colors stripped while bolt-logo-colored.svg would not!
{% include "@bolt-components-icon/icon.twig" with {
name: "add-open",
background: "circle",
size: "medium",
} only %}
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case.
| Prop Name | Description | Type | Default Value | Option(s) |
|---|---|---|---|---|
| attributes | A Drupal-style attributes object with extra attributes to append to this component. |
object
| — |
|
| name | Icon name |
, string |
— |
|
| background | Customizes the background that's displayed behind the SVG icon itself. Choosing any option other than |
string
|
none
|
|
| size | Icon size. |
string
| — |
|
| color | Icon color palette. Picking an option other than |
string
|
auto
|
|