Slider without border

Can anyone help me with a slider without a card border and space in the app view?

In image 1, this is how I want it. I’ve tried multiple configurations, and in most cases, this is the result. However, occasionally, it appears like image 2. After a refresh (pulling down the screen), it goes back to how it looks in image 1.


^^ image 1 ^^




^^ image 2 ^^

You might need to share more.
Code or set-up or whatever.
You have not provided many clues.

Sorry, you’re absolutely right. :blush:

type: horizontal-stack
cards:
  - type: entities
    entities:
      - type: custom:slider-entity-row
        entity: input_number.moodlight
        full_row: true
        show_state: true
        show_percentage: true
    card_mod:
      show_name: false
      style: |
        ha-card {
          background: none !important;
          margin: 7px 30px 0px 65px  !important;
          box-shadow: none !important;
          border: none !important;
          border-radius: 0px !important;
          height: 15px !important;
        }
        .card-content {
          padding: 0px !important;
          margin: -20px !important;
        }
        hui-slider {
          height: 20px !important;
        }
        .entity {
          height: 20px !important;
        }
type: horizontal-stack
cards:
  - type: entities
    entities:
      - type: custom:slider-entity-row
        entity: input_number.moodlight
        full_row: true
        show_state: true
        show_percentage: true
    card_mod:
      style: |
        ha-card {
          background: transparent;
          box-shadow: none;
          border: none;
          border-radius: 0px;
          margin: 7px 30px 0px 65px;
          height: 15px;
        }
        .card-content {
          padding: 0px;
          margin: -20px;
        }
type: entities
card_mod:
  style: |
    ha-card {
      background: none;
      box-shadow: none;
      border: none;
    }
    .card-content {
      padding: 0 !important;
    }
entities:
  - type: custom:slider-entity-row
    entity: input_number.moodlight
    full_row: true

this seems to work, but if it doesn’t you might have to look at your Theme’s background-color and " card-background"
ha-card-background:

Othervice, check your themes background color, and use same in card

Yes, it works, but sometimes it doesn’t. Then I have to refresh the app because it gets displayed like image 2. (I’ve never seen this happen in the browser on my laptop; it only occurs occasionally in the app.)

Ok, so now we also know "it’s only on your Phone … If you tell me you use Iphone or not have tried to flush you APP Cache, im short here

It works on my phone, however as mentioned i have the same Theme-Background-Color
And ha-card-background: color , in My Theme

Might be so that you dont

Since it’s intermittent and unpredictable, I doubt it has anything to do with the cache, but I’ve cleared it anyway. (sometimes it will not work)




What can I compare with your configuration?

check this …

first you have to tell me, whether you have this “horizontal-stack” inside another Card

and as i assume the grey-color is your theme-background, this is the color-code you need to find, it’s either a color which is set in your Theme, or in/if the outer-card

This color-code you can apply in your theme for all cards, so you always can use “transparent” if a card for some reason is defined with other than transparent in the cards .js

PS: I just copied your code into my dashboard, as you haven’t set any color-codes there, it follows my themes conf.

Note: If it’s just for this card, you might be better of finding the color-code in your theme, and apply it to the card, as custom:Themes can change on updates, if it’s not your own-made theme

As I see it, it’s not an issue with the background color, but that the style occasionally doesn’t load (about 1 in 40 times?).

Other cards don’t have this issue. Here’s an example of a card with a style that always works (same dashboard) (it’s not a card mod?):


card:
  type: horizontal-stack
  cards:
    - type: custom:button-card
      icon: mdi:floor-lamp
      entity: light.room
      name: Room
      show_state: false
      layout: vertical
      size: 10%
      styles:
        card:
          - height: 70px
          - width: 70px
          - background-color: rgb(33,38,40)
          - border: 1px solid rgb(80,80,80)
          - border-radius: 10%
          - font-family: sans-serif
          - padding: 5%
          - margin: "-6px 0px 0px -6px"
          - color: rgb( 170, 183, 184 )
          - font-size: 14px

styles, and card-mod is 2 different things, beside Cards are different, and behave different, and there in Custom:button-card, you have a “fixed” color-code (Dark-Gray) I doubt this is the one you want, but you could try

And so maybe a fixed: color, or your better of Themes-colors would

Perhaps a known issue with

    card_mod:
      style: |

or not?

AI says:

Yes, that’s a well-known intermittent issue in the Home Assistant iOS Companion App — custom styles (especially with styles: on cards like button-card, entities, or slider-entity-row) often fail to load properly, or only apply after a manual refresh. It works fine in browsers (Safari/Chrome on iPhone or desktop), but the app’s WebView has aggressive caching that gets stuck on old frontend versions.

This has been reported multiple times in recent years (including 2025 issues after updates/restarts), and it’s usually tied to how the app handles JS modules, custom card resources, and cache persistence — especially after HA updates, core restarts, or network changes.

Quick Fixes That Usually Work (Try in This Order)

  1. Reset Frontend Cache in the App (most effective and fastest):
  • Open the Home Assistant app on your iPhone.
  • Go to Settings (bottom right in the sidebar).
  • Tap Companion App.
  • Scroll down to Debugging (near the bottom).
  • Tap Reset Frontend Cache.
  • Fully close the app (swipe it out of the app switcher) and reopen it. → This fixes it in most cases immediately.

Maybe I should have started this topic like this?
But with the question: how can I create a slider without the card edges being visible and taking up space? So that the slider fits between two rows of buttons."

Nice, now i finally got the answer to my Question, do you use Iphone
The rest after 1st line i didn’t even bothered to read :wink:

sorry i missed that.

I thought that was clear

No, because it has nothing to do with either Borders or Edges being visible and taking up space

No, not that either, that depends on other things

Here i just copy your code and pasted in a new card, on my dashboard

EDIT: Ahh ok, i took my time to read about Iphone, can’t say im surprised :joy:
I have always thought Iphone and Apple products was for “left-handed” people … Apple Has always tried to go their own way, and have often "crawled back to " the folder , since way back when they “finally” introduced X10 :smile:
Sorry, no offense, work related “decease” :smile:

Themes load before Cards on Dashboards(and is persistent), so setting card-background-color in the Theme might help … ass mention, Apple products has never “inspired” me, sure high-tech, neat designs(sometimes)

Over the past few days, I have tested this further on other iPhones with different iOS versions, as well as with other (and the latest) versions of the Home Assistant app.
It still occasionally happens that the style is not loaded correctly.

The solution (for my) is not to show the slider in a separate card, but to make it part of another card.

type: custom:mod-card
style: |
  ha-card {
    background: ;
    padding: 0px;
    border-radius: 0px;
  }
card:
  type: horizontal-stack
  cards:
    - type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: entities
              show_header_toggle: false
              entities:
                - type: custom:slider-entity-row
                  entity: input_number.lightmood
                  full_row: true
                  hide_state: false
              card_mod:
                style: |
                  ha-card {
                    background: transparent;
                    box-shadow: none;
                    border: none;
                    margin: -10px  20px 0px -130px;
                    height: 0px !important;      
                    overflow: visible;
                  }

        - type: horizontal-stack
          cards:
            - type: custom:button-card
              entity: cover.roller
              icon: mdi:window-shutter

Yeah, Until it breaks again for “some” reason
Now:
You have your Custom-Theme: (Loads First)

  • With Atleast a Theme_BackGround-Color
  • And most likely a Theme_Card-Background-Color
  • And who knows a Theme_slider-background-color
    Then You have Your View:
  • With Cards within a
  • type: custom:mod-card(with cards in)(not sure why you’ve chosen this)

type: custom:mod-card
type: horizontal-stack
type: vertical-stack
type: horizontal-stack
type: entities

  • card_mod: ha-card (applied to your entities-card)

type: custom:slider-entity-ROW

( btw i think the standard-stack_cards, they have “transparent” bg-color as default), meaning Theme-bg color, Should You ever need to “trouble-shoot” Your card-colors again

Look a the bright-side, It’s a loong learning-curve, and you Will Change your mind and get new ideas +10 times before you “settle” with a Design :laughing: