Skip to main content

Component Showcase

This page is both a live demo and a copy-paste reference. Everything here works in any .md or .mdx file, with no imports.

Callouts (admonitions)​

:::note[Optional title]
Useful background information.
:::
note

Note – background information.

tip

Tip – a faster or better way.

info

Info – neutral supporting detail.

caution

Caution – can produce misleading results if overlooked.

danger

Danger – destructive or irreversible actions.

Tabs​

npm install
npm start

Tabs that share a groupId stay in sync across the whole site and remember the reader's choice.

Code blocks​

Every block has a copy button, syntax highlighting, an optional title, line numbers and highlighted lines.

src/example.ts
export function adoptionBenefit(baseline: number, scenario: number): number {
return ((baseline - scenario) / baseline) * 100;
}
config.json
{
"scenario": "EV Adoption",
"pollutant": "PM2.5",
"rateOfAdoption": 50
}
- rateOfAdoption: 0
+ rateOfAdoption: 50

Cards​

<CardGrid columns={2}>
<Card icon="map" title="Map controls" to="/docs/user-manuals/uc1/tour/map-controls">Short description.</Card>
</CardGrid>
Map controls

A clickable card with a Lucide icon.

Static card

Omit to for a non-clickable card.

Available icon names live in src/components/icons.ts.

Expandable sections​

Click to expand

Hidden content can contain Markdown, lists and code.

  • Item one
  • Item two

Steps​

<Steps>
<Step title="First">Do this.</Step>
<Step title="Second">Then this.</Step>
</Steps>
  1. First
    Do this.
  2. Second
    Then this.

Badges and keyboard keys​

Default Success Info Warning Danger

Press Ctrl + F to search.

Screenshot placeholder​

Figure 99: Example figure