2.16.0
Chip Component in Bolt
Pill like container for displaying meta data text. Part of the Bolt “Components” CSS framework that powers the Bolt Design System.
npm install @bolt/components-chip
{% include "@bolt-components-chip/chip.twig" with {
text: "This is a chip",
url: "#!",
} 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) |
---|---|---|---|---|
|
A Drupal attributes object. Used to apply with extra HTML attributes to the outer <bolt-chip> tag. |
object
| — |
|
|
Text content of the chip. |
string , array , object |
— |
|
|
Controls the size of the chip. |
string
|
small
|
|
|
Optional. Contains a URL that the chip points to. When URL is present, tag changes to |
string
| — |
|
|
Specifies where to display the linked URL. This may also be passed as part of |
string
| — |
|
|
Bolt icon. Accepts the same options as Bolt Icon Component |
object
| — |
|
|
DEPRECATED - tag is automatically determined by URL. |
| — |
|
|
Manually disables the component from rendering to the Shadow DOM in a Twig template. Useful for testing cross browser functionality / rendering behavior. By default this is handled globally based on browser support. |
boolean
| — |
|
|
Manually disables the web component from rendering to the Shadow DOM. Useful for testing cross browser functionality / rendering behavior. By default this is handled globally based on browser support. |
boolean
| — |
|