有关中文版本,请参阅 简体中文
Custom Stack Cards is a custom card library for Home Assistant, providing three types of cards: Vertical, Horizontal, and Grid. It allows stacking multiple cards within a single <ha-card>, supports custom styling, and preserves the native UI editor functionality. Compared to the official stack cards, it removes extra borders and shadows, resulting in a cleaner interface.
- Vertical stack:
custom:vertical-stack-in-card - Horizontal stack:
custom:horizontal-stack-in-card - Grid Stack:
custom:grid-stack-in-card - Supports
styles:custom styling, with CSS property support - Full compatibility with the native UI editor
- Removes default borders and shadows
- Default support for
Sectionsview
- Open the HACS page in Home Assistant
- Click the top-right “Custom Repository” button
- Enter the repository URL:
https://github.com/hzonz/custom-stack-cards- Select Dashboard as the category, then add
- Search for Custom Stack Cards and install
- Download the
custom-stack-cards.jsfile - Place it in the
wwwfolder, for example:
www/custom-stack-cards/custom-stack-cards.js- Reference it in your Lovelace configuration:
resources:
- url: /local/custom-stack-cards/custom-stack-cards.js
type: module| Parameter | Type | Default | Description |
|---|---|---|---|
| type | string | — | custom:vertical-stack-in-card or custom:horizontal-stack-in-card |
| title | string | — | Card title |
| cards | array | — | Array of cards to stack |
| grid_options | object | — | Layout options, supports columns and rows |
| styles | object | — | Custom styles ( |
type: custom:vertical-stack-in-card # 或 custom:horizontal-stack-in-card / custom:grid-stack-in-card
title: My Stack
cards:
- type: sensor
entity: sensor.time
- type: sensor
entity: sensor.datestyles: only applies to the root card; for child cards, please use card_mod.
- Repository:hzonz/custom-stack-cards
- Original project:ofekashery/vertical-stack-in-card —— Thanks to the original author ofekasher for the open-source contribution.

