[data-reveal]{opacity:1!important;transform:none!important}
Navigation cards
Components

Navigation cards

A grid of cards linking to other pages, each with an icon, a description and the target's live state.

NavCardGrid draws a grid of navigation cards: an icon well, the title with an arrow that slides in on hover, a description, and optionally the target's live state in mono, a small uppercase tag and mono readout lines. An optional title and description head the grid. Use it for hub pages: a settings overview, a module's landing page.

Navigation cardsNavCardGrid
Connecting to the DMS preview…
ConnectingDMS 0.9.53 options set

Usage

src/pages/settings-overview.ts
import { NavCardGrid } from "@antelopejs/interface-dms/base/nav-card-grid";

static workspace = NavCardGrid({
  title: "$app.settings.workspace",
  fetchUrl: "/api/settings/workspace-cards", // one route computes every card's state
});

Options

Options of the Navigation cards block
OptionTypeDefaultDescription
titleContentstring–Heading above the cards.
descriptionContentstring–
empty.title*Contentstring–
empty.descriptionContentstring–
columnsLayoutnumber3How many columns on a wide screen.

A card (NavCardItem) carries title, icon and to, plus optional description, iconTone, state, stateTone, tag and readout. Its texts take a composed text: a live state such as "1,284 files" is sent as raw values.

Recipes

One card per page of a category

In code, pass a category instead of items: the grid holds a card per page of that category the viewer can open, in menu order. Each card carries the badge its navigation entry shows. A viewer who can open none of the pages gets no grid, unless empty says what to show instead.

src/pages/settings-overview.ts
static modules = NavCardGrid({ category: shopCategory, columns: 3 });

Pitfalls

  • The cards are items of one block, not blocks of their own: one list, configured in one place, fed by one route. A single card is a one-item grid.
  • A title takes up to two lines before its ellipsis.

Next steps

Navigation

Categories and the menu the cards mirror.

Stat group

Figures that link to where they are managed.