thomasloven / lovelace-layout-card

🔹 Get more control over the placement of lovelace cards.
MIT License
1.05k stars 125 forks source link

[Feature] Adding support for scrollable content #213

Open rs324 opened 1 year ago

rs324 commented 1 year ago

Hi everyone, I wanted to add the ability to scroll-x the content of the cards same as i have in my car (inspiration), this way i can stack a multiple rooms together and and scroll up and down each room.

Having scrollable content makes me feel like more native flow then clicking on multiple tabs.

How does it work ? on column based layout add the following config:

scrollable: true max_cols: XX // its will calculate width * max cols to determine the size of scroll width: 350px // just example or it will be using the default of 300px

What if i don't want same size cols ? just use the column_widths property.

Full config example : ` width: 350 max_cols: 5 margin: 10px 20px; padding: 10px scrollable: true max_width: 700 column_widths: 350px 700px 350px 350px

`

Inspiration :

photo_2022-09-27_20-56-09

Final result :

photo_2022-09-30_22-38-23

photo_2022-09-30_22-39-21

Thanks.