Repository navigation
Feature Conditional Default
tempus2016 edited this page Sep 27, 2026
·
2 revisions
Pick which tab opens first based on the current state — e.g. open the Guest tab when guest mode is on, otherwise the normal home tab.
Per-tab key: default_if — a list of conditions (same format as visibility)
type: custom:tabdeck-card
default_tab: Home # fallback when nothing matches
tabs:
- name: Home
card: { ... }
- name: Guest
default_if:
- condition: state
entity: input_boolean.guest_mode
state: "on"
card: { ... }- On load, the first tab (in order) whose
default_ifconditions all pass becomes the starting tab. - If none match, the normal
default_tabis used. - A remembered selection (
remember) still wins overdefault_if. -
default_ifis evaluated at first paint, so use synchronous conditions:state,numeric_state,screen,time,user, andand/or/notgroups. Template conditions may not have resolved yet on the very first render and aren't reliable here. - Configured in YAML.
In the visual editor, use the tab's Default when condition builder. See The Visual Editor.
Concepts
Features
- All features
- Dynamic tabs
- State-driven icons & names
- Alert pulse
- Auto-rotate & idle return
- Navigation & action tabs
- Scroll-spy
- Collapsible deck
- Responsive layouts
- Style presets
- Tab-change actions
- Tab display mode
- Accent indicator
- Extra bar styles
- Indicator thickness
- Sticky tab bar
- Tab alignment
- Badge display mode
- Per-tab colour
- Tab subtitles
- Disabled tabs
- Multiple cards per tab
- Panel transitions
- Duplicate tab
- Expand/Collapse all