Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

tabbed-card

> 前端框架
Open source

a custom card for home assistant that utilizes tabs to segregate individual cards.

190 stars0 likes1 views
WebsiteGitHub

About

a custom card for home assistant that utilizes tabs to segregate individual cards.

Tabbed Card

A custom card for home assistant that utilizes tabs to segregate individual cards.

Installation

Use HACS or follow this guide

Card Schema

yaml
type: custom:tabbed-card
options?:
  defaultTabIndex?: number
styles?:
attributes?:
  label?: string
  icon?: string
  isFadingIndicator?: boolean
  minWidth?: boolean
  isMinWidthIndicator?: boolean
  stacked?: boolean
tabs:
  - card:
      type:
    styles?:
    attributes?:
      label?: string
      icon?: string
      isFadingIndicator?: boolean
      minWidth?: boolean
      isMinWidthIndicator?: boolean
      stacked?: boolean

Example

…

Configuration

You can apply global and per tab configuration to your card. Global configuration(top level properties) are expressed on all tabs in your card. You can also set local configuration, per tab styles and attributes that take precedence over any corresponding global configuration.

Options

Property Default Description
defaultTabIndex 0 tab to display on first render
yaml
type: custom:tabbed-card
options:
  defaultTabIndex: 1 # in a 0 based index, the second tab would be the active tab on render
tabs: ...

Styling

This card tries to closely match home assistants default tab styles. You can override and apply additional styling to the card via provided material web components custom properties.

Default Custom Properties:

Name Default Description
--mdc-theme-primary --primary-text-color Color of the activated tab's text, indicator, and ripple.
--mdc-tab-text-label-color-default rgba(225, 225, 225, 0.8) Color of an unactivated tab label. If you want transpareny on the unactivated tabs, you need to use an rgba value incorporating the 4th alpha channel.
--mdc-typography-button-font-size 14px Font size of the tab label.
yaml
type: custom:tabbed-card
styles: # global styles applied to all tabs
  --mdc-theme-primary: yellow
  --mdc-tab-text-label-color-default: orange
tabs: ...

See the full list of exposed custom properties: ``

Attributes

Name Default Description
label "" Text label to display in tab.
icon "" Home Assistant mdi:icon name.
isFadingIndicator false Indicator fades in and out instead of sliding.
minWidth false Shrinks tab as narrow as possible without causing text to wrap.
isMinWidthIndicator false Shrinks indicator to be the size of the content.
stacked false Stacks icon on top of label text.

Global attributes:

yaml
type: custom:tabbed-card
styles:
  ...
attributes:
  icon: mdi:fire # global attribute applied to all tabs
tabs:
  - attributes:
      label: Button
    card:
      type: button
      entity: light.bed_light
      tap_action:
        action: toggle
      show_name: true
      show_icon: true
      show_state: true
  ...

Local attributes:

…

Appreciation

Thanks for the support and services provided Home Assistant, HACS and lit Aslo, thanks to the swipe-card for inspiration and all of the other open source cards/projects as references.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptcardhacshacs-customhome-assistant

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架