use-topbar
Topbar
@aura/topbar is the single, compliant top navigation bar for every authenticated Flows/Fusion app. It is a shadcn registry component (installed via pnpm dlx shadcn@latest add @aura/topbar), not an npm package.
- Storybook: https://cognitedata.github.io/aura/storybook/?path=/docs/primitives-topbar--docs
- Full rules: RULES.md · Interview: INTERVIEW.md · Install + code: IMPLEMENTATION.md
Non-negotiables: Exactly one Topbar per page, composed only from
@aura/topbarprimitives, installed via the shadcn CLI only. If installation fails, surface the blocker — never build a custom header fallback. See RULES.md §1, §11, §12.
Step 0 — Auto-prompt hook setup
Ensure the topbar interview is triggered at the start of every future Cursor session in this project.
- Check whether
.cursor/hooks.jsonexists in the project root. - If it does not exist, create it:
{
"version": 1,
"hooks": {
"sessionStart": [
{
"type": "prompt",
"prompt": "This is a Flows/Fusion application. Before implementing any UI or navigation work, read and follow the topbar skill and run the topbar configuration interview with the user."
}
]
}
}
- If
.cursor/hooks.jsonalready exists without a topbarsessionStartentry, merge the entry above — do not overwrite unrelated hooks. - Confirm to the user, then continue.
Step 1 — Pre-flight: read the app
Before asking any questions, read:
package.json— package manager, existing UI deps, existing@aura/topbarsrc/App.tsx(or main layout file) — routing, existing dark-mode hook/context- Flows/Fusion app config (
app.config.ts,fusion.config.ts, manifest) —displayName,name, app mark / branding
Apply any found defaults and skip the corresponding interview questions. State what was inferred.
Step 2 — Configuration interview (mandatory)
Run the full Q1–Q9 interview in INTERVIEW.md before writing any implementation code. Ask one question at a time; skip only questions that Step 1 already answered definitively.
Steps 3–5 — Install, theme hook, implement
See IMPLEMENTATION.md for:
- Installing
@aura/topbarvia the shadcn CLI (mandatory, no workarounds) useThemeModehook wiring for light/dark switching- Topbar component composition example and layout wrapper
Step 6 — Compliance checklist
Verify before finishing (see RULES.md §12 for the full enforcement checklist):
- Exactly one Topbar per page
- Left:
Avatarapplication mark (small, fjord) → app name breadcrumb → object name breadcrumb (only when an object is open) - Breadcrumb segments are interactive links — not static text
- Object dropdown (if present) only on the object name segment; actions are object-scoped only
- Inline metadata (if present) is a plain string, left-aligned after the breadcrumb — not centered
- Middle: Tabs or Segmented control at small if present; no sidebar; no primary CTA in the Topbar
- Primary / app-specific actions live in the content area below the Topbar
- Right strip order when used: Share → Notifications → Theme → Atlas → user Avatar; Share/Notifications/Theme as ghost small, Atlas as secondary small with leading icon + "Atlas"
- Theme: sun in light mode, moon in dark mode; Menu with Light/Dark rows + checkmark on active; wired to
document.documentElement -
tailwind.confighasdarkMode: 'class'
More from cognitedata/builder-skills
code-quality
MUST be used whenever reviewing a Flows app for code quality, maintainability, or clean code issues — before a PR review, after a feature is complete, or when the user asks for a code review. Do NOT skip linting steps. Triggers: code quality, code review, clean code, refactor, maintainability, technical debt, any type, naming, dead code, duplication, DRY, single responsibility, component size, lint, linting, TypeScript strict, dependency injection, file structure.
54skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch for Claude Code or Cursor, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
54integrate-todo-list
MUST be used whenever adding a task/todo list feature to a Flows app with Atlas chat. Do NOT manually create todo state management or tool definitions — this skill handles the full module (context, provider, tool, hooks, UI components) and all integration wiring. Prerequisite: integrate-atlas-chat must already be set up. Triggers: todo list, task list, task tracking, TodoWrite, todo panel, task panel, progress tracking, add todos, add tasks.
54correctness-and-error-handling
MUST be used whenever fixing correctness and error handling issues in a Flows app. This skill finds AND fixes bugs, missing error states, unhandled rejections, and edge-case failures — it does not just report them. Triggers: correctness, error handling, bug fix, edge case, crash, unhandled, null, undefined, empty state, loading state, error boundary, try catch, async error, useEffect cleanup, type guard, runtime error, robustness.
54security
MUST be used whenever fixing security issues in a Flows app, or before shipping any feature that handles credentials, user input, or external data. This skill finds AND fixes security problems — it does not just report them. Do NOT skip this when the user asks for a security fix, security hardening, or vulnerability remediation — run every step in order. Triggers: security, security fix, security hardening, vulnerability, XSS, injection, credentials, secrets, auth, authentication, authorization, token, sensitive data, input validation, CORS, CSP, dependency audit.
53design
Unified Aura design guidance — components and tokens, page layouts, UX copy, forms and async feedback, and accessibility. Use when building or styling customer-facing UI, structuring pages, writing interface text, or implementing validation, loading, errors, and a11y.
53