SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

tabKeys

Delegated arrow-key activation for a Tabs list.

tsx
import { tabKeys } from "@sdxc/ui/mixins";

Usage

Adds delegated arrow-key activation to a Tabs list, adapting the shared @remix-run/ui/tabs context instead of tracking tab order itself. Capturing and stopping handled keys pre-empts a same-key tab() binding per tab.

Signature

typescript
tabKeys(options?: TabKeysOptions): MixinDescriptor<HTMLElement>

Parameters

ParameterTypeDefaultRequiredDescription
optionsTabKeysOptions—No

Examples

tsx
<tabs.Context defaultActiveTab="overview">
  <div role="tablist" mix={tabKeys()}>
    <button mix={tabs.tab({ name: "overview" })}>Overview</button>
    <button mix={tabs.tab({ name: "activity" })}>Activity</button>
  </div>
</tabs.Context>

The events, constants and types its module publishes, each imported from @sdxc/ui/mixins too.

Interface

TabKeysOptions

Options accepted by tabKeys. Reserved for future configuration; the mixin needs no per-call arguments today.

@sdxc/ui

Can’t find it? Contact us