CentercodeDitto
DittoPorygonAPI

Scope Jump

Fast keyboard-driven navigation between Home, Programs, and Projects

Overview

ScopeJump provides a command-style interface for quickly navigating between scopes. Inspired by VS Code, Linear, and Notion, it enables instant navigation with search filtering and full keyboard support.

Key Features

  • Instant search/filter across all scopes (programs and projects)
  • Full keyboard navigation (type to filter, arrows to navigate, Enter to select)
  • Hierarchical display with programs and nested projects
  • Custom icons for programs and projects with sensible defaults

Layout Availability

ScopeJump provides fast keyboard-driven navigation between scopes. It's designed to slot into the top of LeftNav in LayoutShell.

LayoutShell

Slots into LeftNav header area

LayoutFocus

Not available in this layout

LayoutWizard

Not available in this layout

LayoutCard

Not available in this layout

LayoutBlank

Not available in this layout

Examples

Interactive Demo

Click the button to open the scope navigator. Try typing to search, or use arrow keys to navigate.

Current scope: Home

With Many Items

ScopeJump handles large lists gracefully with a scrollable container and instant search filtering.

Scope State Variants

The trigger button displays the current scope with appropriate icon.

Home Scope

Program Scope

Project Scope

Keyboard Navigation

Full keyboard support for efficient navigation.

ShortcutAction
TypeFilter items
↑ ↓Navigate list
EnterSelect item
EscapeClose popover

Props Reference

PropTypeDefaultDescription
currentScopeScopeJumpCurrentScoperequiredCurrent active scope for display on trigger button
programsScopeJumpProgram[]requiredArray of programs with nested projects
homeHrefstring"/"URL for the Home navigation item (default: '/')
classNamestring-Additional CSS classes for the trigger button
onScopeChange(scope) => void-Callback when scope changes (for analytics, etc.)

ScopeJumpCurrentScope Interface

PropTypeDefaultDescription
type"home" | "program" | "project"-The type of scope (home, program, or project)
idstring?-Unique identifier (required for program and project types)
namestring-Display name for the scope
iconIconDefinition?-Optional custom icon for the scope

ScopeJumpProgram Interface

PropTypeDefaultDescription
idstring-Unique identifier for the program
namestring-Display name for the program
hrefstring-Navigation URL for the program
iconIconDefinition?-Optional custom icon for the program
projectsScopeJumpProject[]-Array of projects nested under this program

ScopeJumpProject Interface

PropTypeDefaultDescription
idstring-Unique identifier for the project
namestring-Display name for the project
hrefstring-Navigation URL for the project
iconIconDefinition?-Optional custom icon for the project

Usage

import { ScopeJump } from '@/ui/components';
import type { ScopeJumpCurrentScope, ScopeJumpProgram } from '@/ui/components/scope-jump';

// Define programs with nested projects
const programs: ScopeJumpProgram[] = [
  {
    id: 'alpha',
    name: 'Alpha Program',
    href: '/programs/alpha',
    projects: [
      { id: 'phoenix', name: 'Phoenix', href: '/programs/alpha/projects/phoenix' },
      { id: 'titan', name: 'Titan', href: '/programs/alpha/projects/titan' },
    ],
  },
  {
    id: 'beta',
    name: 'Beta Program',
    href: '/programs/beta',
    icon: faFlask, // Optional custom icon
    projects: [
      { id: 'hydra', name: 'Hydra', href: '/programs/beta/projects/hydra' },
    ],
  },
];

// Track current scope
const [currentScope, setCurrentScope] = useState<ScopeJumpCurrentScope>({
  type: 'home',
  name: 'Home',
});

// Render the component
<ScopeJump
  currentScope={currentScope}
  programs={programs}
  homeHref="/"
  onScopeChange={(scope) => {
    setCurrentScope(scope);
    // Analytics, etc.
  }}
/>