Card with rounded corner and custom border color

Is it possible to make your lovelace card having:

  1. Rounded corners
  2. Custom border color and thickness of border
  3. Transparent background

?

Yes to all three.

  1. Add this to your theme:
  ha-card-border-radius: 10px
  1. Use card mod to style the border. e.g.
entities:
  - switch.siren_upstrs
show_header_toggle: true
style: |
  ha-card {
    border: solid 2px var(--primary-color);
  }
title: Siren
type: entities
  1. Theme again. The last number is the transparency:
paper-card-background-color: "rgba(255, 255, 255, 0.4)"
2 Likes

Nice, thanx! :+1:

But its not possible to have rounded corner and border on media_player ?

That’s correct. So use the mini media player card instead:

1 Like

I will try that, thanx!

Ok, rounded borders works with mini media player but with artwork its not pretty.
Artwork is still square image and layer is on top of border, meaning artwork is showing on the outside of the rounded border corners. Any solution for this?

I actually think I have seen somebody doing this before so I think its doable… :slight_smile:

One more thing, is it possible to resize the mini media player (or media_player) somehow? Like width and height…

You would be better asking those questions here:

I don’t use the artwork setting or resize it.

Screenshot_2019-10-18%20Home%20Assistant

Hi, where to find templates on hassio?
Thx

This should absolutely work even with artwork, unless you got a very old version of the card, try updating the card.

Sure, try with card-mod, let me know if you need help with the CSS.

1 Like

Thank you, I will try your suggestions! :+1:

Good Evening

I ma trying to get Curved Card edge . But i have no more idea about how to install Card Mode .
Can you please explain the step…

I believe you will be solved my issue

This is the easiest way:

Thanks for your information …

And i have done curved edge with below code in themes.yaml

ha-card-border-radius: '25px'

I have installed success fully HACS .
and installed card mode

i want outline my cards but unsure how or what to put for code and where to put it

which theme are you using? I really like it.
image

My own, Day and Night - #29 by tom_l

Thank you.