Components
BaseSplitView
The list and detail layout of the apps, with an optional navigation column and aside.
components/ui/BaseSplitView.vue
View in the demo
Modes
Pick a person in each mode. right keeps the detail beside the list, none replaces the list and drawer slides the detail over it.
On phones the detail always replaces the list and detail-open decides which one shows. In right mode, when the remaining column would be narrower than min-pane-width (a laptop with the sidebar open), it switches to none and the detail slot gets stacked so the page can show a back button. Email, chat, tasks, calendar and files are built on it.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
mode | SplitViewMode | "right" | right, none or drawer. |
detail-open | boolean | false | Whether the detail is showing. |
nav-width | string | "256px" | Width of the navigation column (lg and up). |
list-width | string | "360px" | Width of the list. |
fixed | SplitViewFixed | "list" | Which column keeps its width: list or detail. |
detail-width | string | "440px" | Width of the detail when fixed="detail". |
aside-width | string | "280px" | Width of the aside (lg and up). |
drawer-width | number | 640 | Width of the drawer in drawer mode. |
min-pane-width | number | 360 | Narrowest width, in pixels, the flexible column may take in right mode before the view behaves like none. |
aside-overlay | boolean | false | When the aside does not fit beside the list and the detail (or below lg), slide it over the content as a temporary drawer instead of hiding it. Render the aside slot only while it should be open and listen to close-aside. |
nav-open | boolean | — | Bind it with v-model:nav-open to show the nav slot as a temporary drawer below lg; it closes when a list item or link inside is chosen. Leave it unbound when the app has its own mobile selector. |
Slots
Name | Slot props | Description |
|---|---|---|
#nav | — | A navigation column, shown from lg. |
#aside | — | A side column, shown from lg. |
#list | — | The list. |
#detail | { stacked: boolean; } | The selected item. Receives stacked, true while the detail replaces the list because right does not fit. |
Events
Name | Payload | Description |
|---|---|---|
@update:navOpen | [value: boolean | undefined] | — |
@close | — | The drawer asked to close (scrim or Escape). |
@close-aside | — | The aside drawer of aside-overlay asked to close (scrim or Escape). |