-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
400e6dd
commit 5b86df1
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Lovelace Text Row | ||
Add a simple (styled) text to a row of the [lovelace entities cards](https://www.home-assistant.io/lovelace/entities/), this can be used to add subheaders or explanatory text. | ||
|
||
## Installation | ||
1. Copy the [latest release](https://github.com/PronkMedia/lovelace-text-row/releases/latest) of `text-row.js` into your `config/www` directory. | ||
2. Add a reference to `text-row.js` inside your configuration: | ||
```yaml | ||
resources: | ||
- url: /local/text-row.js?v=0.0.1 | ||
type: module | ||
``` | ||
## Usage | ||
### Options | ||
| Name | Type | Default | Description | | ||
|------|:----:|:-------:|-------------| | ||
| text ***(required)*** | string | | The text that will be be showed. | ||
| style | map | color: var(--primary-text-color), margin-left: 8px; | Style the showed text using CSS. | ||
### Example | ||
Add `text-row` to an entities card: | ||
```yaml | ||
type: entities | ||
entities: | ||
- light.spots | ||
- type: divider | ||
- type: custom:text-row | ||
text: This is an unstyled example text | ||
- type: custom:text-row | ||
text: This is a red styled example text without left margin | ||
style: | ||
color: red | ||
margin-left: 0 | ||
- type: custom:text-row | ||
text: This is bigger and blue styled example text | ||
style: | ||
color: '#0000ff' | ||
font-size: '20px' | ||
- type: custom:text-row | ||
text: This very long styled example text is using a theme variable as color and an even bigger left margin | ||
style: | ||
color: var(--accent-color) | ||
margin-left: '16px;' | ||
``` | ||
 | ||
|
||
## Credits | ||
[thomasloven](https://github.com/thomasloven) for creating [lovelace-card-tools](https://github.com/thomasloven/lovelace-card-tools). |