Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to align icon along either side of name/label/state #140

Closed
jarrah31 opened this issue May 3, 2019 · 1 comment · Fixed by #146
Closed

Ability to align icon along either side of name/label/state #140

jarrah31 opened this issue May 3, 2019 · 1 comment · Fixed by #146
Labels
FR Feature Request

Comments

@jarrah31
Copy link

jarrah31 commented May 3, 2019

Taking your “TEST LIGHT” example, I attempted to align the icon to the left of the text so that it wasn’t just stuck on top as seen below, (changing all justify-self to end) and using layout: icon_state_name2nd. It didn’t quite have the desired outcome though:

Preferably though, would it be possible to have a new layout option so that the icon can be to the right of the text please? It would be nice to fit the icon in that handy space on the right (or left as above), as seen using my mockup below:

Thanks!

@jarrah31 jarrah31 added the FR Feature Request label May 3, 2019
@RomRider
Copy link
Collaborator

RomRider commented May 6, 2019

With the custom layout options which will be in the next release, you'll be able to do this (and a lot more):
image

- type: "custom:button-card"
  entity: sensor.sensor1
  layout: icon_state_name2nd
  show_state: true
  show_name: true
  show_label: true
  label: label
  styles:
    grid:
      - grid-template-areas: '"n i" "s i" "l i"'
      - grid-template-columns: 1fr 40%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR Feature Request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants