Skip to main content

Custom Components Support for API Developer Portal

The API Developer Portal supports custom components within Markdown files to enhance documentation structure and interactivity.

Why Use Custom Components?

Standard Markdown provides basic text formatting but lacks structure for complex documentation needs. Custom components address these limitations:

  • Improved organization - Group related content using tabs and accordions instead of lengthy, single-page sections
  • Enhanced readability - Use callouts to highlight critical information that developers might otherwise miss
  • Reduced maintenance - Consistent component styling eliminates the need for custom HTML and CSS scattered throughout documentation
  • Better user experience - Interactive elements like collapsible sections help users find relevant information faster
  • Consistent styling - Standardized components ensure uniform presentation across all documentation page

Syntax Requirements

Critical formatting rules:

  • Keep component tags on single lines to prevent rendering failures
  • Don't break component properties across multiple lines
  • Follow the syntax patterns shown in examples exactly
// Correct
<Tab title="Example">
Content
</Tab>

// Incorrect - will cause rendering issues
<Tab
title="Example">
Content
</Tab>

Available Components

Below is a list of custom components supported in the API Developer Portal, along with examples and their usage:

  • Callouts: Highlight important messages with contextual styling options including info, warning, danger, and success states.
  • Card & Card Group: Showcase key information in clean, grid-based layouts for organised content presentation.
  • Tabs: Organise content into switchable sections for improved navigation and space efficiency.
  • Code Block Group: Display code samples across multiple programming languages in organised, tabbed interfaces.
  • Accordion/Accordion Group: Create collapsible sections to organise content hierarchically and improve page readability.
  • Frame: Embed images with captions and enhanced visual demonstrations.
  • Video: Embed videos seamlessly from YouTube and Vimeo platforms.
  • Mermaid: Visualise workflows, system architecture, and complex processes through interactive diagrams.

Callouts

Display contextual alerts and notices.

success

Properties:

  • type (string, optional): info (default), success, warning, danger
  • children (string, required): Alert content

Card & Card Group

Present structured information blocks.

Single card

Single Card

Card Group

Card Group

Properties:

Card:

  • title (string, required): Card header
  • icon (string, optional): Lucide icon name
  • url (string, optional): Makes card clickable
  • children (string, required): Card content (text only)

Card Group:

  • cols (number, required): Grid columns (1-4)
  • children (Card[], required): Card components

Tabs

Organize content into switchable views. Tab component support rich content including text, code blocks, lists, callouts, and other nested components.

Tabs

Properties

  • Tabs: No properties, contains Tab children
  • Tab:
    • title (string, required): Tab label
    • children (string, required): Tab content

Code Block Group

Group related code examples in tabbed interface.

Code Block Group

Properties

  • children (codeblock[], required): Fenced code blocks with language and filename.

Each code block inside must use standard Markdown fenced syntax: language filename. The filename serves as the tab label.

Accordion / AccordionGroup

Create collapsible content sections.

Single accordion

Single Accordion

Grouped Accordions

Multiple Accordion

Properties

  • Accordion
    • title (string, required): Header text
    • children (string, required): Collapsible content
  • Accordion Group
    • children (Accordion[], required): Multiple Accordion components

Frame

Wrap images with optional captions.

Frame

Properties

  • caption (string, optional): Image description
  • children (image, required): Single <img> element

Video

Embed video content from supported platforms (YouTube and Vimeo).

Video

Properties

  • url (string, required): YouTube embed or Vimeo player URL

Mermaid

Render diagrams using Mermaid syntax.

Mermaid Diagram

Properties

  • children (string, required): Mermaid diagram syntax