Tabs
Panels are built once and toggled with CSS — state is preserved across switches.
Second panel. Click between tabs — the active one reads a single signal.
Third panel content goes here.
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.