Components

Lito comes with a set of built-in components to make your documentation richer. These are available globally in all .mdx files — no imports needed.


Card

A simple card component for links or highlights.

<Card title="Getting Started" icon="🚀" href="/getting-started/installation">
Learn how to install and configure Lito.
</Card>
🚀

Getting Started

Learn how to install and configure Lito.

PropTypeDescription
titlestringThe card title.
iconstringIcon or emoji (optional). Supports Iconify names (e.g. lucide:rocket).
hrefstringURL to link to (optional). Makes the card clickable.
targetstringLink target (e.g. _blank). External links (http...) automatically open in a new tab.

CardGroup

A layout component to display Cards in a responsive grid.

<CardGroup>
<Card title="Installation" icon="📦" href="/getting-started/installation">
Get up and running quickly.
</Card>
<Card title="Configuration" icon="⚙️" href="/reference/configuration">
Customize your docs site.
</Card>
</CardGroup>

Tabs

Organize content into switchable tabs.

<Tabs>
<Tab title="npm">
npm install lito
</Tab>
<Tab title="yarn">
yarn add lito
</Tab>
<Tab title="pnpm">
pnpm add lito
</Tab>
</Tabs>
Terminal window
npm install @litodocs/cli
Terminal window
yarn add @litodocs/cli
Terminal window
pnpm add @litodocs/cli

Accordion

Collapsible content sections for FAQs or optional details.

<Accordion title="What is Lito?" icon="❓">
Lito is an open-source documentation generator built on Astro.
</Accordion>
<Accordion title="Is Lito free?" defaultOpen>
Yes! Lito is completely free and open-source.
</Accordion>
What is Lito?

Lito is an open-source documentation generator built on Astro.

Is Lito free?

Yes! Lito is completely free and open-source.

PropTypeDefaultDescription
titlestring-The accordion header text.
iconstring-Optional icon/emoji.
defaultOpenbooleanfalseWhether the accordion starts expanded.

Steps

Display numbered step-by-step instructions.

<Steps>
<Step title="Install Lito">
Run `npx @litodocs/cli dev -i ./my-docs` to create a new project.
</Step>
<Step title="Configure">
Edit the `docs-config.json` file to customize your site.
</Step>
<Step title="Deploy">
Push to GitHub and deploy with Vercel or Netlify.
</Step>
</Steps>

Install Lito

Run npx @litodocs/cli dev -i ./my-docs to create a new project.

Configure

Edit the docs-config.json file to customize your site.

Deploy

Push to GitHub and deploy with Vercel or Netlify.

ComponentPropTypeDescription
Steps--Container for Step items.
SteptitlestringOptional step title.

Callout

Enhanced alerts/admonitions with different types.

<Callout type="note" title="Note">
This is a note callout with helpful information.
</Callout>
<Callout type="tip">
Pro tip: Use callouts to highlight important info!
</Callout>
<Callout type="warning" title="Warning">
Be careful with this operation.
</Callout>
Note

This is a note callout with helpful information.

Tip

Pro tip: Use callouts to highlight important info!

Warning

Be careful with this operation.

Danger

This is a danger callout for critical warnings.

PropTypeOptionsDescription
typestringnote, tip, info, warning, danger, checkThe callout type.
titlestring-Override the default title.
iconstring-Override the default icon.

CodeGroup

Tabbed code blocks for showing code in multiple languages. Use the title attribute on code blocks to set tab names.

<CodeGroup>
```bash title="npm"
npm install @litodocs/cli
```
```bash title="yarn"
yarn add lito
```
</CodeGroup>

Badge

Inline status badges for labeling content.

<Badge>Default</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="danger">Deprecated</Badge>
<Badge variant="info">Beta</Badge>
Default Success Warning Deprecated Beta
PropTypeOptionsDescription
variantstringdefault, success, warning, danger, infoBadge color variant.

Tooltip

Hover tooltips for additional context.

The <Tooltip content="Application Programming Interface">API</Tooltip> is well documented.

The API Application Programming Interface is well documented.

PropTypeDescription
contentstringThe tooltip text shown on hover.

Frame

A styled container for images or videos with optional captions.

<Frame caption="Architecture diagram">
<img src="/architecture.png" alt="Architecture" />
</Frame>
PropTypeDescription
captionstringCaption text displayed below the content.

Columns

Create multi-column layouts.

<Columns cols={2}>
<Column>
**Left Column**
Content for the left side.
</Column>
<Column>
**Right Column**
Content for the right side.
</Column>
</Columns>

Left Column

Content for the left side.

Right Column

Content for the right side.

ComponentPropTypeOptionsDescription
Columnscolsnumber2, 3, 4Number of columns (default: 2).
Column---Individual column container.

GitHub-Style Alerts

Lito also supports GitHub-style blockquote alerts:

> [!NOTE]
> This is a note.
> [!TIP]
> This is a helpful tip.
> [!IMPORTANT]
> Critical information here.
> [!WARNING]
> Be careful!
> [!CAUTION]
> Potential danger ahead.

Icon

Display icons from multiple icon sets powered by Iconify. Available globally in all MDX files.

Basic Usage

<Icon name="lucide:rocket" />
<Icon name="heroicons:home" size={24} />
<Icon name="mdi:github" class="text-primary-500" />

lucide:rocket

heroicons:home

mdi:github

fa6-brands:twitter

Available Icon Sets

Icon SetPrefixDescription
Lucidelucide:Clean, consistent stroke icons (recommended)
Heroiconsheroicons:Beautiful hand-crafted icons by Tailwind
Material Design Iconsmdi:Google’s Material Design icon set
Font Awesome Solidfa6-solid:Font Awesome 6 solid icons
Font Awesome Brandsfa6-brands:Font Awesome 6 brand icons

Props

PropTypeDefaultDescription
namestring-Icon name in set:icon-name format.
sizenumber | string24Icon width and height in pixels.
classstring-Additional CSS classes.
aria-hiddenbooleantrueHide from screen readers.

Sidebar groups automatically get icons based on their label. You can also specify custom icons in your navigation config:

Group LabelDefault Icon
Getting Startedlucide:rocket
Introductionlucide:book-open
Guideslucide:compass
Conceptslucide:lightbulb
Referencelucide:file-code
APIlucide:code
Componentslucide:puzzle
Exampleslucide:folder-open
Tutorialslucide:graduation-cap
Configurationlucide:settings
Deploymentlucide:cloud-upload
Troubleshootinglucide:bug
FAQlucide:help-circle
Changeloglucide:history
Resourceslucide:library

Finding Icons

Browse all available icons at icon-sets.iconify.design. Search for any icon, then use it with the format set-name:icon-name.


LinkCard

A compact card designed for single-link references. Shows an optional icon, title, description, and a directional arrow.

<LinkCard title="Getting Started" href="/getting-started/installation" description="Learn how to install and set up Lito" />
<LinkCard title="GitHub Repository" href="https://github.com/Lito-docs/cli" icon="fa6-brands:github" description="View the source code" />
PropTypeDescription
titlestringCard title (required).
hrefstringLink URL (required).
descriptionstringOptional description text.
iconstringIconify icon name or emoji (optional).

FileTree

Display file and folder structures with syntax highlighting and interactive expand/collapse.

<FileTree highlight="src,package.json">
- src/
- components/
- Header.astro
- Footer.astro
- pages/
- index.astro
- package.json
- astro.config.mjs
</FileTree>
  • src/
    • components/
      • Header.astro
      • Footer.astro
    • pages/
      • index.astro
  • package.json
  • astro.config.mjs

Syntax rules:

  • Each line starts with -
  • Folders end with / — they become expandable
  • Use 2-space indentation for nesting
  • Highlighted items appear in bold with your primary color
PropTypeDescription
highlightstringComma-separated file/folder names to highlight.

Image

An enhanced image component with lazy loading, captions, and responsive sizing.

<Image
src="/screenshot.png"
alt="Dashboard screenshot"
caption="The admin dashboard"
width={800}
/>
PropTypeDescription
srcstringImage source URL (required).
altstringAlt text for accessibility (required).
captionstringCaption displayed below the image.
widthnumberImage width in pixels.
heightnumberImage height in pixels.
classstringAdditional CSS classes.

YouTube

Embed YouTube videos directly in your documentation. Powered by astro-embed.

<YouTube id="dQw4w9WgXcQ" />
PropTypeDescription
idstringYouTube video ID (required).

Changelog Components

Document release history with structured changelog entries.

<Changelog>
<ChangelogEntry version="2.1.0" date="2026-02-20">
<ChangelogItem type="added">FileTree component for displaying file structures</ChangelogItem>
<ChangelogItem type="added">Image component with lazy loading</ChangelogItem>
<ChangelogItem type="fixed">Card external link detection</ChangelogItem>
<ChangelogItem type="deprecated">Legacy Alert syntax</ChangelogItem>
</ChangelogEntry>
</Changelog>
ComponentPropTypeDescription
Changelog--Container for changelog entries.
ChangelogEntryversionstringVersion number.
ChangelogEntrydatestringRelease date.
ChangelogItemtypestringChange type: added, fixed, changed, deprecated, removed.

API Documentation Components

For documenting APIs, see the dedicated API Reference page which covers:

  • APIEndpoint - Display API endpoints with method badges
  • APIPlayground - Interactive API testing
  • ParamTable / Param - Parameter documentation
  • ResponseField - Response field documentation
  • RequestExample / ResponseExample - Code examples for requests and responses