"use client"; import "./components/ui/tidal.css"; import { useId, useState } from "react"; import { TidalMenubar, TidalMenubarCheckboxItem, TidalMenubarContent, TidalMenubarItem, TidalMenubarLabel, TidalMenubarLinkItem, TidalMenubarMenu, TidalMenubarRadioGroup, TidalMenubarRadioItem, TidalMenubarSeparator, TidalMenubarTrigger } from "./components/ui/menubar"; import "./components/ui/menubar.css"; const tidalExampleStyles = ".tidal-scope .menubar-demo,\n.tidal-scope .menubar-demo * {\n box-sizing: border-box;\n}\n\n.tidal-scope .menubar-demo {\n container: tidal-menubar-demo / inline-size;\n display: grid;\n width: min(100%, 980px);\n min-width: 0;\n gap: 22px;\n margin-inline: auto;\n padding: clamp(16px, 4vw, 42px);\n color: var(--t-ink);\n}\n\n.tidal-scope .menubar-demo-heading {\n display: grid;\n min-width: 0;\n gap: 8px;\n}\n\n.tidal-scope .menubar-demo-heading :is(h2, p),\n.tidal-scope .menubar-demo-footer :is(p, span) {\n margin: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .menubar-demo-heading h2 {\n font-size: clamp(27px, 5vw, 42px);\n font-weight: 570;\n letter-spacing: -0.05em;\n line-height: 1;\n}\n\n.tidal-scope .menubar-demo-heading p,\n.tidal-scope .menubar-demo-footer {\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.5;\n}\n\n.tidal-scope .menubar-demo-app {\n min-width: 0;\n border: 1px solid var(--t-border);\n border-radius: 18px;\n overflow: hidden;\n background: var(--t-surface);\n}\n\n.tidal-scope .menubar-demo-rail {\n width: 100%;\n min-width: 0;\n padding: 8px;\n overflow-x: auto;\n scrollbar-width: thin;\n}\n\n.tidal-scope .menubar-demo-document {\n display: grid;\n min-width: 0;\n gap: 20px;\n padding: clamp(20px, 5vw, 42px);\n border-top: 1px solid var(--t-border);\n background: var(--t-subtle);\n}\n\n.tidal-scope .menubar-demo-document header {\n display: grid;\n min-width: 0;\n gap: 6px;\n}\n\n.tidal-scope .menubar-demo-document :is(span, h3, strong, p, dl, dt, dd) {\n margin: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .menubar-demo-document header span {\n color: var(--t-muted);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.tidal-scope .menubar-demo-document h3 {\n font-size: clamp(22px, 4vw, 34px);\n font-weight: 580;\n letter-spacing: -0.04em;\n}\n\n.tidal-scope .menubar-demo-lines {\n display: grid;\n min-width: 0;\n gap: 10px;\n}\n\n.tidal-scope .menubar-demo-lines section {\n display: grid;\n min-width: 0;\n gap: 5px;\n padding: 14px;\n border: 1px solid var(--t-border);\n border-radius: 10px;\n background: var(--t-surface);\n}\n\n.tidal-scope\n .menubar-demo-document[data-density=\"compact\"]\n .menubar-demo-lines\n section {\n gap: 2px;\n padding: 9px 12px;\n}\n\n.tidal-scope .menubar-demo-lines strong {\n font-size: 12px;\n}\n\n.tidal-scope .menubar-demo-lines p,\n.tidal-scope .menubar-demo-document dd {\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.5;\n}\n\n.tidal-scope .menubar-demo-document dl {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n}\n\n.tidal-scope .menubar-demo-document dl > div {\n display: grid;\n min-width: 0;\n gap: 3px;\n padding-top: 9px;\n border-top: 1px solid var(--t-border);\n}\n\n.tidal-scope .menubar-demo-document dt {\n font-size: 11px;\n font-weight: 650;\n}\n\n.tidal-scope .menubar-demo-footer {\n display: grid;\n min-width: 0;\n gap: 4px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tidal-scope .menubar-demo-document,\n .tidal-scope .menubar-demo-lines section {\n transition: none;\n }\n}"; type Density = "comfortable" | "compact"; export function MenubarDemo({ theme = "light" }: { theme?: "light" | "dark" }) { const demoId = useId().replace(/:/g, ""); const headingId = `${demoId}-draft-editor`; const documentId = `${demoId}-document-details`; const [openMenu, setOpenMenu] = useState(""); const [sectionCount, setSectionCount] = useState(3); const [showDetails, setShowDetails] = useState(true); const [density, setDensity] = useState("comfortable"); const [status, setStatus] = useState("The local draft is ready."); function resetDraft() { setSectionCount(1); setShowDetails(true); setDensity("comfortable"); setStatus("A new local draft replaced the sample."); } return (

Draft editor

Use the menus to change this local document view.

File Draft New draft setStatus( `This local draft has ${sectionCount} ${ sectionCount === 1 ? "section" : "sections" }.`, ) } > Review section count Jump to document Edit { setSectionCount((count) => count + 1); setStatus("A section was duplicated in the local draft."); }} > Duplicate section { setSectionCount((count) => Math.max(1, count - 1)); setStatus("The latest local section was removed."); }} > Undo duplicate Paste from system View { setShowDetails(checked === true); setStatus( checked === true ? "Document details are visible." : "Document details are hidden.", ); }} > Show details Density { if ( nextDensity === "comfortable" || nextDensity === "compact" ) { setDensity(nextDensity); setStatus(`${nextDensity} density is active.`); } }} > Comfortable Compact
Local draft

Project handoff

{Array.from({ length: sectionCount }, (_, index) => (
Section {index + 1}

Review notes and next steps for the project team.

))}
{showDetails ? (
Sections
{sectionCount}
Density
{density}
) : null}

{status}

Sample changes stay on this page.
); } export default function AgentExample() { return (
); }