Skip to content

TabPanels ​

Swipeable panel pager

Swipeable panels that go with a set of tabs on phones — the content under Tabs, BottomTabs or a segmented control, changed by the tabs or by a sideways swipe.

Basic

News

panel “news” — swipe left / right

Tabs drive the model; the panels also swipe, and loop from the last back to the first.
  • v-model is the current panel's key, shared with the tabs; next() / prev() step in code; loop wraps.
  • Each panel is a group named by its key. The tabs themselves stay the keyboard way in; the swipe is extra.

Usage ​

ts
import { BlessTabPanels } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
panels*T[]—panel keys, in order; pair with BlessTabs values
swipeablebooleantrue
loopboolean—wrap from last to first
thresholdnumber60px to change panel
modelValue*T—

Events

NamePayloadDescription
update:modelValue[value: T]

Slots

NameScopeDescription
default{ panel: T; index: number; }

Released under the MIT License. Character names and artwork belong to their owners.