项目作者: PronkMedia

项目描述 :
:pencil: Home-Assistant Lovelace Text Row
高级语言: JavaScript
项目地址: git://github.com/PronkMedia/lovelace-text-row.git
创建时间: 2020-09-23T18:33:46Z
项目社区:https://github.com/PronkMedia/lovelace-text-row

开源协议:MIT License

下载


Lovelace Text Row

Add a simple (styled) text to a row of the lovelace entities cards, this can be used to add subheaders or explanatory text.

Installation

  1. Copy the latest release 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:

  1. type: entities
  2. entities:
  3. - light.spots
  4. - type: divider
  5. - type: custom:text-row
  6. text: This is an unstyled example text
  7. - type: custom:text-row
  8. text: This is a red styled example text without left margin
  9. style:
  10. color: red
  11. margin-left: 0
  12. - type: custom:text-row
  13. text: This is bigger and blue styled example text
  14. style:
  15. color: '#0000ff'
  16. font-size: '20px'
  17. - type: custom:text-row
  18. text: This very long styled example text is using a theme variable as color and an even bigger left margin
  19. style:
  20. color: var(--accent-color)
  21. margin-left: '16px;'

text-row

Credits

thomasloven for creating lovelace-card-tools.