Skip to content

Commit b7438d1

Browse files
committed
docs(headless/tabs): add keys and vertical
1 parent 1a6ae5a commit b7438d1

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

apps/website/src/routes/docs/headless/(components)/tabs/examples.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const Example01 = component$(() => {
99
return (
1010
<PreviewCodeExample>
1111
<div q:slot="actualComponent" class="tabs-example">
12-
<Tabs behavior="automatic" selectedIndex={2}>
12+
<Tabs behavior="automatic">
1313
<h3 id="tablist-1">Danish Composers</h3>
1414
<TabList>
1515
<Tab>Maria Ahlefeldt</Tab>

apps/website/src/routes/docs/headless/(components)/tabs/index.mdx

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,46 @@ import { APITable } from '../../../../../components/api-table/api-table';
8888
keyDescriptors={[
8989
{
9090
keyTitle: 'Tab',
91-
description: 'Moves focus to next tab.',
91+
description: 'Moves focus to the selected panel.',
9292
},
9393
{
9494
keyTitle: 'Shift + Tab',
95+
description: 'Moves focus to the selected tab.',
96+
},
97+
{
98+
keyTitle: 'ArrowRight',
99+
description: 'Moves focus to the next tab.',
100+
},
101+
{
102+
keyTitle: 'ArrowLeft',
95103
description: 'Moves focus to the previous tab.',
96104
},
105+
{
106+
keyTitle: 'ArrowDown',
107+
description: 'In "vertical mode", moves focus to the next tab.',
108+
},
109+
{
110+
keyTitle: 'ArrowUp',
111+
description: 'In "vertical mode", moves focus to the previous tab.',
112+
},
113+
{
114+
/* {
115+
keyTitle: 'Home',
116+
description: 'Moves focus to the first tab.',
117+
},
118+
{
119+
keyTitle: 'PageUp',
120+
description: 'Moves focus to the first tab.',
121+
},
122+
{
123+
keyTitle: 'End',
124+
description: 'Moves focus to the last tab.',
125+
},
126+
{
127+
keyTitle: 'PageDown',
128+
description: 'Moves focus to the first tab.',
129+
}, */
130+
},
97131
]}
98132
/>
99133

@@ -109,6 +143,12 @@ import { APITable } from '../../../../../components/api-table/api-table';
109143
description:
110144
'Toggle between automatic or manual. The automatic behavior moves between tabs when hover. The manual behavior moves between tabs on click.',
111145
},
146+
{
147+
name: 'vertical',
148+
type: 'boolean',
149+
description:
150+
'If set to true, the behavior of UpArrow and DownArrow will navigate between tabs vertically instead of horizontally.',
151+
},
112152
]}
113153
/>
114154

0 commit comments

Comments
 (0)