diff --git a/website/config/docs-config.ts b/website/config/docs-config.ts index 2cdff28..dbefae3 100644 --- a/website/config/docs-config.ts +++ b/website/config/docs-config.ts @@ -29,6 +29,11 @@ export const docsConfig: DocsConfig = { href: '/variants', items: [], }, + { + title: 'Keyboard Interactions', + href: '/keyboard-interactions', + items: [], + }, ], }, { diff --git a/website/content/docs/keyboard-interactions.mdx b/website/content/docs/keyboard-interactions.mdx new file mode 100644 index 0000000..294d442 --- /dev/null +++ b/website/content/docs/keyboard-interactions.mdx @@ -0,0 +1,67 @@ +--- +title: Keyboard Interactions +description: Learn how to integrate keyboard shortcuts and commands with the Emblor tag input component. +--- + + + + + Key + Description + + + + + +
+ Delete +
+
+ + When a tag is active, remove it and set the next tag on the right as active. + +
+ + +
+ Backspace +
+
+ + When a tag is active, remove it and set the previous tag on the left as active. + +
+ + +
+ ArrowRight +
+
+ Move the active state to the next tag. +
+ + +
+ ArrowLeft +
+
+ Move the active state to the previous tag. +
+ + +
+ Home +
+
+ Set the first tag as active. +
+ + +
+ End +
+
+ Set the last tag as active. +
+
+