Drag and drop cards for Lovelace?

I don’t really know why I’m asking this, as if it were possible (or easy I guess) I’m sure it would have been done already, but it would be incredibly useful to have the ability to create cards and then just drag and drop them around in the configuration you want (and drag the corners to increase the size etc etc).

Personally I find configuring lovelace really tedious and confusing and I almost always either get some indentation wrong somewhere or get lost with how to separate cards out in the layout I actually want.

Is this possible at all?

3 Likes

I saw some discussion around options for drag-and-drop configuration on the frontend developers’ Discord channel awhile back, but there’s nothing available like this in the current state or on the near-term roadmap.

1 Like

Then you get in the GUI editor there is an icon in the lower right to add a card to the current view No indentation needed.

.

Sure, that’s not a problem, but often it’s not just a case of adding new cards and having them land wherever they land. I, like most people I assume, want them organised neatly in a specific format. I want some cards next to each other with specific widths, and ideally the same heights. I want some in columns. I want some to be maybe two cards horizontally with a gap in the middle and then one larger one underneath that covers the width of everything above it.

This isn’t all that easy to do as it’s really picky in the UI and the code editor. I know it’s possible, but it takes a lot of messing around to get right.

Yep fair enough. I mean I’m not surprised, I’m sure it’s a horrible pain the arse to code as you’d need to be generating dynamic yaml in the background on the fly, but I’m sure it’s probably a long term best case scenario. I mean who wouldn’t want the ability to just grab cards and put them exactly where you want them without having to get into the code :slight_smile:

I would also like this drag and drop + resize functionallity. I find the coding for the positioning of the cards hard. I hope this functionallity will be added in a update in the future.

2 Likes

Positioning is easy if you are not using yaml mode. For custom cards you can put the yaml in the raw editor. The UI editor shows up & down arrows on each card to adjust their placement.

There are libraries that would help with this. A example for Vue can be found here: https://jbaysolutions.github.io/vue-grid-layout/examples/02-events.html.

There are many others libraries also for plain javascript, but I don’t have enough experience with the Lovelace setup. If you create this as a full dashboard custom card, it could be added to the HACS store and could contain other cards.

I’d like to see this feature added !!

Home Assistant DRAG & DROP?? - Lovelace - YouTube For reference.

Your wish is my command master. (knod,knod,blink)

I really would love to also have the ability to design my dashboards via drag and drop in the docker instance.

The dashboards and platforms can be really powerful, just shockingly bad to design and create, like back to the 80s of hard coding websites.

Not being a hardcore programmer, I do understand the complexities behind it all, but I think it would enable the wider adoption of the platform.

1 Like