Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Release notes
Changelog
Elyra

Tabs

Views of one thing, one at a time: a customer's details, invoices and notes.

Examples
<script>
  import { Callout, Empty, Tabs } from "@elyra/ui";

  let tab = $state("invoices");
  const TABS = [
    { id: "details", label: "Details" },
    { id: "invoices", label: "Invoices" },
    { id: "notes", label: "Notes" },
    { id: "audit", label: "Audit", can: "customers.delete" },
    { id: "files", label: "Files", disabled: true },
  ];
</script>

<Tabs bind:value={tab} tabs={TABS} label="Customer">
  {#snippet panel(id)}
    {#if id === "invoices"}
      <Callout variant="danger" title="2 invoices overdue">INV-2041 and INV-2047, 1 860 € in all.</Callout>
    {:else if id === "notes"}
      <Empty title="No notes yet" />
    {:else}
      <p>Ada Lovelace, Analytical Engines Ltd, London.</p>
    {/if}
  {/snippet}
</Tabs>

tabs are { id, label, can, disabled }. bind:value is the shown tab's id, and panel(id) is the snippet that draws it. A tab with can is hidden from a user without the ability; here, the user can't see "Audit". A disabled tab is shown and skipped. When value isn't a tab the user can see, the first one that isn't disabled is shown.

Keyboard

Key
Tab Onto the shown tab, then into the panel.
← → The previous or the next tab, round from the end, and shows it.
Home End The first tab, the last tab.

Accessibility

  • A role="tablist", named by label. Each tab is a role="tab" with aria-selected and aria-controls.
  • Only the shown tab is in the Tab order. The arrow keys move between the tabs.
  • The panel is a role="tabpanel", labelled by its tab, and it takes focus.

API

Tabs

Prop Type Default Description
tabs Array<{ id, label, can?, disabled? }> []
value (bindable) string — The shown tab's id.
label string — The tab list's name.
class string ""
panel Snippet<[id]> — Draws the shown tab.