Repository navigation
Feature Gestures
Options that change how the deck reacts to a mouse wheel, a trackpad and a finger. swipe, swipe_mouse and swipe_wrap turn swiping on in the first place.
wheel_switch: true lets you change tabs on a desktop by scrolling over the tab bar: scroll down (or right) for the next tab, up (or left) for the previous one.
type: custom:tabdeck-card
wheel_switch: true
tabs: [ ... ]- Only scrolling over the tab bar changes tab. Scrolling over the content scrolls the page as usual.
- One scroll gesture moves one tab. A trackpad fling, which keeps sending scroll events after you lift your fingers, still moves only one tab. Pause briefly before the next scroll.
- Disabled and action tabs are skipped, and a PIN-locked tab asks for its PIN.
- At the first or last tab the page scrolls as usual, unless
swipe_wrapwraps round to the other end. - Ctrl + wheel (browser zoom) is left alone, and nothing happens while you edit the dashboard.
A swipe that starts on a brightness slider or a map moves that control and changes tab. swipe_edge: true makes a swipe count only when it starts near the left or right side of the deck's content, so the middle is left to your cards.
type: custom:tabdeck-card
swipe: true
swipe_edge: true # 40 px strips on each side
# swipe_edge: 64 # or your own width in px (8–400)
tabs: [ ... ]- The strips are measured from the edges of the deck's content, not the screen. A swipe that starts just outside the content (on the card's margin) counts too.
- It applies to touch swipes,
swipe_peekandswipe_mousedrags. Two-finger pinch for the overview still works anywhere. - In the visual editor it's the Edge swipe only box: 0 means anywhere.
With swipe on, dragging a slider sideways can also change tab. swipe_lock: true leaves a swipe that starts on a slider or a map to that control: the slider moves and the tab stays put. Swipes that start anywhere else still change tab.
type: custom:tabdeck-card
swipe: true
swipe_lock: true
tabs: [ ... ]What counts as a slider or a map:
- any element whose tag name contains
slider, such as the tile card's brightness and position bars (ha-control-slider), HA's thermostat dial,ha-slider, Mushroom's sliders andround-slider - anything with
role="slider", and range inputs (<input type="range">) - HA's map card and other Leaflet maps
It covers touch swipes, swipe_peek and swipe_mouse drags. To keep the middle of the deck free for every kind of control, use swipe_edge instead (or both).
Some cards, such as the rows of an entities card, already keep their touches to themselves, so they never changed tab even without swipe_lock.
Concepts
Features
- All features
- Dynamic tabs
- Remote control & events
- PIN-locked tabs
- Reuse: defaults & templates
- Debug panel
- Developer access
- Pictures, animations & fonts
- 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
- One-line tab content
- Panel transitions
- Content layout
- Duplicate tab
- Expand/Collapse all
- Edit mode helpers
- Why is this tab hidden?
- Starter templates
- Convert from another card
- Languages
- YAML autocomplete
- Dock & floating action tabs
- Dots & content arrows
- Grouped tabs
- Overview grid
- Linked decks
- Tab as popup
- Wizard mode
- Search & shortcuts
- Gestures
- Arrange tabs