Tabs

Panels are built once and toggled with CSS — state is preserved across switches.

Usage

import { Tabs } from "./components/tabs.js";

// panels are built once and toggled with CSS, so their state survives switches.
Tabs({ tabs: [
  { id: "a", label: "Overview", content: () => html`<p>First panel</p>` },
  { id: "b", label: "Activity", content: () => html`<p>Second panel</p>` },
] })
// pass value: signal("b") to control / read the active tab.