Giter Site home page Giter Site logo

bouwew / select-list-card Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattieha/select-list-card

0.0 0.0 0.0 2.21 MB

Select List Card displays an input_select entity as a list in lovelace

License: MIT License

JavaScript 11.21% TypeScript 88.79%

select-list-card's Introduction

Select list Card

GitHub Release License hacs_badge

Display the options of an input_select entity as a clickable list card.
In other words: the content of the dropdown menu is displayed as a card.
The input_select.select_option service is called after the user clicks (selects) an option.

Some use cases:

  • Select with too many options to show in dropdown
  • Options with long titles
  • Have all options directly shown
  • You dont't want the extra click to open the dropdown menu

List animation

Using the card

Visual Editor

Select List Card supports Lovelace's Visual Editor. Click the + button to add a card and search for select list.

Visual Editor

Options

Name Type Default Description
type string required custom:select-list-card
entity string required An entity_id within the input_select domain.
title string `` Card header title
icon string `` Card header icon
show_toggle boolean false Card header toggle
truncate boolean true Truncate option text to fit 1 line
scroll_to_selected boolean true Scroll the list to the position of the selected option
max_options number 5 Number of options before a scrollbar appears, 0 = no scrollbar

Manual yaml mode

type: 'custom:select-list-card'
entity: input_select.tracks
title: Tracks
icon: 'mdi:playlist-music'
max_options: 6
scroll_to_selected: true
show_toggle: true
truncate: true

Installation

HACS

This card is available in HACS (Home Assistant Community Store).

Just search for Select list Card in Frontend tab.

Manual

  1. Download select-list-card.js file from the latest-release.
  2. Put select-list-card.js file into your config/www folder.
  3. Add reference to select-list-card.js in Lovelace. There's two way to do that:
    1. Using UI: ConfigurationLovelace DashboardsResources → Click Plus button → Set Url as /local/select-list-card.js → Set Resource type as JavaScript Module.
    2. Using YAML: Add following code to lovelace section.
      resources:
        - url: /local/select-list-card.js
          type: module
  4. Add custom:select-list-card to Lovelace UI as any other card (using either editor or YAML configuration).

Supported languages

This card supports translations. Please, help to add more translations and improve existing ones. Here's a list of supported languages:

Support

Hey dude! Help me out for a couple of 🍻 or a ☕!

beer

select-list-card's People

Contributors

mattieha avatar guille-mas-coll avatar ktibow avatar nagyrobi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.