Skip to content

cameronhunter/ink-markdown

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ink-markdown Actions Status

Render markdown text using Ink

Screenshot of ink-markdown

Install

$ npm install ink-markdown
$ yarn add ink-markdown

Usage

import React from 'react';
import { render } from 'ink';
import Markdown from 'ink-markdown';
import dedent from 'dedent';

const text = dedent`
  # Hello

  This is **markdown** printed in the \`terminal\`
`;

render(<Markdown>{text}</Markdown>);

API

<Markdown>

Props are passed as options to marked-terminal.

License

MIT © Cameron Hunter