Share one TabsModel between the tab buttons and their panels. OneApp runs on Linux, Windows, and macOS on Apple silicon.
dotnet add package RecursiveAI.OneApp.Kit dotnet add package RecursiveAI.OneApp dotnet add package RecursiveAI.OneUI
Requires .NET 10 (net10.0); .NET 9 and earlier aren’t supported.
<!-- Section: TabsModel in SettingsPage.cs. --> <Tabs Model="{Section}"> <TabsList Model="{Section}"> <TabsTrigger Model="{Section}" Value="general">General</TabsTrigger> <TabsTrigger Model="{Section}" Value="alerts">Alerts</TabsTrigger> </TabsList> <TabsContent Model="{Section}" Value="general"> Account details </TabsContent> <TabsContent Model="{Section}" Value="alerts"> Notifications </TabsContent> </Tabs>
The example is the full program below: unzip it and dotnet run.
Press Tab, then Right Arrow to show the Alerts panel. In 1.1.1, selection changed but focus stayed on the original tab. Checked on Linux (X11); not checked on Windows or macOS.
Full program
OneApp hosts the window, OneApp.Kit supplies the controls, and OneUI compiles the .html component.
The zip contains the three files below and Demo.csproj. To make the project by hand, create a .NET 10 console app and install the packages above. The example’s project references are:
<PackageReference Include="RecursiveAI.OneApp" Version="1.1.1" /> <PackageReference Include="RecursiveAI.OneApp.Kit" Version="1.1.1" /> <PackageReference Include="RecursiveAI.OneUI" Version="1.1.0" />
OneUI compiles SettingsPage.html into the other half of the partial class in SettingsPage.cs. Save these files beside the project file.
SettingsPage.html:
<Theme> <main style="padding: 24px"> <Tabs Model="{Section}"> <TabsList Model="{Section}"> <TabsTrigger Model="{Section}" Value="general">General</TabsTrigger> <TabsTrigger Model="{Section}" Value="sync" Disabled="true">Sync</TabsTrigger> <TabsTrigger Model="{Section}" Value="alerts">Alerts</TabsTrigger> </TabsList> <TabsContent Model="{Section}" Value="general"> Manage your account details. </TabsContent> <TabsContent Model="{Section}" Value="alerts"> Manage your notification preferences. </TabsContent> </Tabs> </main> </Theme>
SettingsPage.cs:
using OneApp.Kit; public partial class SettingsPage { public TabsModel Section { get; } = new("general"); protected override void OnMounted() => Section.ValueChanged += Report; protected override void OnDisposed() => Section.ValueChanged -= Report; private static void Report(string value) => Console.WriteLine($"Tab: {value}"); }
Program.cs opens the native window:
using OneApp; using var host = AppHost.Create(new AppOptions(new SettingsPage()) { Title = "Settings", Width = 420, Height = 280, }); host.Run();
The full example adds a disabled Sync tab between General and Alerts. Press Tab, then Right Arrow twice: the first press skips Sync and selects Alerts; the second wraps back to General. The terminal prints:
Tab: alerts Tab: general
If selecting a tab leaves the panel blank, check that the trigger and panel use the same Value and all the parts use the same model.

Variations
To stack the triggers and use Up and Down Arrow, change the model initializer in SettingsPage.cs:
using OneApp.Kit; public TabsModel Section { get; } = new("general") { Orientation = Orientation.Vertical, };
Related recipes
The short answer
Keyboard selection works out of the box: create one TabsModel, set its starting value, then pass that instance to Tabs, TabsList, each TabsTrigger, and each TabsContent. Give each enabled trigger a panel with the same Value. The chosen value decides which panel is rendered.
How do I switch between desktop tabs with the keyboard?
Tab enters the tab list at the selected trigger. Left and Right Arrow select the previous or next enabled tab and wrap at the ends. Home and End select the first and last enabled tabs. There’s no separate Enter step: changing selection changes the panel immediately.
Selection and keyboard focus aren’t the same thing. In OneApp Kit 1.1.1, Right Arrow changed the panel, aria-selected, and which trigger had tabindex="0", but focus stayed on the original trigger. Checked on Linux (X11); not checked on Windows or macOS. If your UI requires the focus indicator to follow the selected tab, account for that behavior when you test it.
How do I keep a tab and its panel in sync?
Use the value as an identifier, not as the label. In this example alerts is the identifier and Alerts is what the user reads. TabsContent renders a tabpanel only when its value is selected. Keep anything that must survive a tab switch in the owning page or model rather than relying on inactive panel content to stay mounted. If you need to respond to a selection in C#, subscribe to ValueChanged as the example does. Use a separate model for each independent set of tabs.