Getting Started
Text component v2. This is still in progress and only available as a web component. Part of the Bolt “Components” CSS framework that powers the Bolt Design System.
Install via NPM
npm install @bolt/components-text
Usage
This is text.
Schema
Name | Type | Value(s) | Description | Default |
---|---|---|---|---|
attributes | object
| |
A Drupal-style attributes object with extra attributes to append to this component. |
N/A |
text* | string
| |
Text content of the headline. |
N/A |
tag | string
|
|
HTML semantic tags. |
p
|
display | string
|
|
Inline text or a block of text. |
block
|
color | string
|
|
Text color in context of theme colors. |
theme-body
|
align | string
|
|
Text alignment. |
inherit
|
opacity | number
|
|
Opacity level. |
100
|
quoted | boolean
|
|
Quoted text. |
false
|
line-height | string
|
|
Line height in context of the typographic design. |
regular
|
letter-spacing | string
|
|
Letter spacing in context of the typographic design. |
regular
|
text-transform | string
|
|
Transform controls the type case. Please note that capitalize would capitalize the first letter of each word, it is not the same as title case. |
regular
|
font-family | string
|
|
Font family in context of the typographic design. |
body
|
font-size | string
|
|
Font size in context of the typographic design. |
medium
|
font-weight | string
|
|
Font weight in context of the typographic design. |
regular
|
font-style | string
|
|
Emphasized text. |
regular
|
headline | boolean
|
|
A preset for headlines in context of the typographic design. |
false
|
subheadline | boolean
|
|
A preset for subheadlines in context of the typographic design. |
false
|
eyebrow | boolean
|
|
A preset for eyebrow in context of the typographic design. |
false
|
url | string
| |
If provided, turns headline into a link to given url. |
N/A |
util | array
| |
Each item in the array will build a utility class. No need to include |
N/A |