Pixi’VN

Markdown

Overview of using Markdown and its integrations in Pixi’VN, with examples for React, Vue, Svelte, and Angular.

Pixi’VN is not tied to any markup, and gives the developer the ability to choose the markup they prefer. However, it is recommended to use Markdown.

Templates

In all templates, the Markdown component is already defined.

ink

You can use this method with the ink syntax. See more here.

Here are some examples of implementations of Markdown in the JavaScript ecosystem:

// I use the @tanstack/markdown library to convert the Markdown to HTML
// read more about it here: https://www.npmjs.com/package/@tanstack/markdown
// Tables, strikethrough and task lists (GFM) are supported out of the box,
// `allowHtml` enables raw HTML (e.g. <span style="color:blue">...</span>).
import { Markdown } from "@tanstack/markdown/react";

export default function MarkdownComponent({ text }: { text: string }) {
    return <Markdown allowHtml>{text}</Markdown>;
}

Markdown Typewriter

Markdown Typewriter is a library that combines Markdown and Typewriter. This library was created by me for my need to add a Typewriter effect to the Markdown component in my React templates.

It renders Markdown with @tanstack/markdown and accepts its props. With allowHtml, raw HTML is typed out too, keeping its attributes: <span style="color:blue">...</span> is blue while it appears.

npm install markdown-typewriter motion @tanstack/markdown
React
import { MarkdownTypewriter } from "markdown-typewriter/react";

export default function MarkdownComponent({ text }: { text: string }) {
    return <MarkdownTypewriter allowHtml>{text}</MarkdownTypewriter>;
}

On this page