- Docs
- Components
- Console frame
Top bar
The scope bar of a Qeet console: the product, where you are in it, search, tools and account.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.0.4
- Renders
<header>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Import
// Experimental: from the package's experimental entry, until it's stable.
import { TopBar, TopBarSwitcher, TopBarSearch } from "@qeetrix/react/experimental";02
Props
And every native attribute of the element it renders.
| Prop | Type | Default | What it does |
|---|---|---|---|
product | string | required | The product's name: "Qeet ID". |
logo | ReactNode | — | The mark: <QeetLogo variant="dark" height={20} />. |
href · render | string · ReactElement | — | The identity's link home; a router link. |
launcher | ReactNode | — | A Menu of Qeet products behind a neutral IconButton. |
context | ReactNode | — | The scope path: TopBarSwitchers, a slash before each. |
search | ReactNode | — | A TopBarSearch, centred; hidden below 840px. |
actions | ReactNode | — | Neutral IconButtons, after the AppShell's panel triggers. |
account | ReactNode | — | An Avatar trigger, after a rule. |
TopBarSwitcher: label · mark · status | ReactNode · ReactNode · status | — | The current scope; a small square of initials or a logo; a dot for an environment. |
TopBarSearch: placeholder · shortcut | string · string[] | required · — | The prompt, which names it; the keys shown at its end. Wire the shortcut yourself. |
03
Parts
Each part carries a data-slot, for tests and placement.
| data-slot | Element | What it is |
|---|---|---|
top-bar | <header> | Dark in both schemes, under a 2px Ember line. |
top-bar-identity | <a> | The mark and the name. |
top-bar-switcher | <button> | A scope step. |
top-bar-search-trigger | <button> | The search. |
04
The search shortcut
TopBarSearch shows the keys; the product wires them, and opens its CommandPalette.
const [open, setOpen] = useState(false);
<TopBarSearch placeholder="Search or jump to…" shortcut={["⌘", "K"]} aria-keyshortcuts="Meta+K Control+K" onClick={() => setOpen(true)} />
<CommandPalette open={open} onOpenChange={setOpen} … />