Markdown
API reference for the Markdown component
A terminal markdown renderer.
Markdown parses a string and renders it with styled Ink components. Supports headings, bold, italic, inline code, code blocks, links, images, blockquotes, ordered and unordered lists, tables, horizontal rules, and strikethrough. Tables are rendered using box-drawing characters. Links are clickable in terminals that support OSC 8.
Colors are pulled from the theme — accentColor for inline code and links, borderColor for code block borders and table frames.
import { Markdown } from 'giggles/markdown';
function HelpScreen() {
const helpText = `# Shortcuts
- **q** to quit
- **?** for help
> Press any key to continue.`;
return <Markdown>{helpText}</Markdown>;
}API Reference
Markdown
Prop
Type
Examples
Code blocks
const md = `
\`\`\`ts
const x = 42;
\`\`\`
`;
<Markdown>{md}</Markdown>Tables
const md = `
| Command | Description |
| ------- | ----------- |
| q | Quit |
| ? | Help |
`;
<Markdown>{md}</Markdown>