WorkspaceSwitcherContent
The menu the trigger opens (role="menu", named "Workspaces").
import { WorkspaceSwitcherContent } from '@/components/ui/goop/workspace-switcher';
Options
- search?: boolean — A search field over the rows that narrows the workspaces as you type (by name and detail); the menu opens with the focus in it.
- searchPlaceholder?: string = 'Find a workspace…' — The search field's grey words while it is empty (default "Find a workspace…").
- searchLabel?: string = 'Find a workspace' — The search field's name for a screen reader (default "Find a workspace").
- empty?: ReactNode = 'No workspace matches' — The line shown while no workspace matches the search (default "No workspace matches").
- defaultSearch?: string = '' — The words the search field holds as the menu opens (empty when left out).
- Also takes: container?: HTMLElement | null
WorkspaceSwitcherTrigger
The button that opens the switcher, the theme's MenuButton shape="rounded".
import { WorkspaceSwitcherTrigger } from '@/components/ui/goop/workspace-switcher';
Options
- fill?: string — The workspace's own colour, any CSS colour, winning over a
hue; its initials stay light. - hue?: 'blue' | 'green' | 'orange' | 'pink' | 'red' | 'yellow' | 'neutral' — One of the six hue words (or
neutral, the grey) instead of a fill, readable in light and dark; left out (and no fill), Meadow's pink. - initials?: string — One or two letters in the tile; left out, the name's first letters (one on the small tiles).
- image?: string — The address of the workspace's picture, drawn over its initials once it has loaded.
- name: string — The current workspace's name, beside its tile: the button's name.
- tileOnly?: boolean = false
- Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean