Skip to main content
Version: 1.0.3

Dashboard Shortcuts Page

The Dashboard Shortcuts Page is built for quick command-style workflows.
It is designed as composable sections so you can independently control layout, header, actions, shortcuts grid, and footer while keeping a consistent visual system.

Workspace Command Center

Compose each section independently and persist shortcut order.

Customizable shortcuts

Drag cards to reorder. Your layout is persisted in local storage.

Composable footer area: add system status, hints, or contextual actions.

Installation

ignix add component dashboard-shortcuts-page

Composable Building Blocks

  • DashboardShortcutsLayout: page shell, background, and max-width container.
  • DashboardShortcutsHeader: section title and supporting text.
  • DashboardShortcutsActionsSection: large top action buttons with icon + key hints.
  • DashboardShortcutsGridSection: draggable shortcuts grid.
  • DashboardShortcutsFooter: lightweight footer/status area.
  • useDashboardShortcutsState: shared state hook for keyboard handling, drag-drop reorder, and localStorage persistence.

Composable Usage

import React from "react";
import {
DashboardShortcutsLayout,
DashboardShortcutsHeader,
DashboardShortcutsActionsSection,
DashboardShortcutsGridSection,
DashboardShortcutsFooter,
useDashboardShortcutsState,
type DashboardAction,
type ShortcutItem,
} from "@ignix-ui/dashboard-shortcuts-page";

const actions: DashboardAction[] = [
{ id: "create", label: "Create", shortcutHint: "C" },
{ id: "upload", label: "Upload", shortcutHint: "U" },
{ id: "download", label: "Download", shortcutHint: "D" },
{ id: "share", label: "Share", shortcutHint: "S" },
];

const shortcuts: ShortcutItem[] = [
{ id: "new-project", label: "New project", shortcutHint: "N" },
{ id: "quick-search", label: "Quick search", shortcutHint: "/" },
{ id: "launch-center", label: "Launch center", shortcutHint: "L" },
{ id: "sync-files", label: "Sync files", shortcutHint: "Y" },
{ id: "export-data", label: "Export data", shortcutHint: "E" },
{ id: "preferences", label: "Preferences", shortcutHint: "P" },
];

export function DashboardShortcutsComposable(): React.JSX.Element {
const { orderedShortcuts, draggingId, handleDragStart, handleDrop, handleDragEnd } =
useDashboardShortcutsState({
shortcuts,
actions,
storageKey: "dashboard-shortcuts.order",
});

return (
<DashboardShortcutsLayout>
<DashboardShortcutsHeader
title="Workspace Command Center"
description="Compose each section independently and persist shortcut order."
/>
<DashboardShortcutsActionsSection actions={actions} />
<DashboardShortcutsGridSection
shortcuts={orderedShortcuts}
draggingId={draggingId}
onDragStart={handleDragStart}
onDrop={handleDrop}
onDragEnd={handleDragEnd}
/>
<DashboardShortcutsFooter text="Composable footer area for status and hints." />
</DashboardShortcutsLayout>
);
}

Props

DashboardShortcutsLayout

PropTypeDescription
childrenReactNodeComposed sections to render.
classNamestring (optional)Additional classes for root wrapper.

DashboardShortcutsHeader

PropTypeDescription
titlestring (optional)Header title text.
descriptionstring (optional)Supporting description text.

DashboardShortcutsActionsSection

PropTypeDescription
actionsDashboardAction[]Large action button list.

DashboardShortcutsGridSection

PropTypeDescription
shortcutsShortcutItem[]Ordered shortcuts to render.
draggingIdstring | nullCurrent dragging item id.
onDragStart(id: string) => voidStart drag handler.
onDrop(targetId: string) => voidDrop handler for reorder.
onDragEnd() => voidDrag end cleanup handler.

DashboardShortcutsFooter

PropTypeDescription
textstring (optional)Footer text content.

useDashboardShortcutsState

InputTypeDescription
shortcutsShortcutItem[]Source shortcut list used for ordering and rendering.
actionsDashboardAction[]Action list used for keyboard shortcut mapping.
storageKeystring (optional)localStorage key for persisted shortcut order.

Returns:

  • orderedShortcuts
  • draggingId
  • handleDragStart
  • handleDrop
  • handleDragEnd

Notes

  • The page is intentionally composable-first: each section can be replaced or reordered.
  • Keyboard handlers ignore input/textarea/contentEditable targets to avoid accidental triggers while typing.
  • The reorder state is persisted with localStorage via useDashboardShortcutsState.