npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xsolla/xui-markdown

v0.162.0

Published

A React component that renders markdown content with theme-aware typography (web only — built on `react-markdown` and `styled-components`).

Downloads

10,226

Readme

Markdown

A React component that renders markdown content with theme-aware typography (web only — built on react-markdown and styled-components).

Installation

npm install @xsolla/xui-markdown

Imports

import { Markdown } from "@xsolla/xui-markdown";

Quick start

import * as React from "react";
import { Markdown } from "@xsolla/xui-markdown";

export default function QuickStart() {
  return <Markdown>{`# Hello\n\nThis is **bold** text.`}</Markdown>;
}

API Reference

<Markdown> (web only)

| Prop | Type | Default | Description | | ----------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------- | | testID | string | — | Test ID for testing frameworks. On web this renders as data-testid; on React Native it renders as testID. | | children | string | — | Required. Markdown source to render. | | className | string | — | CSS class for the container. |

Inherits ThemeOverrideProps (themeMode, themeProductContext).

The component pulls heading and body fonts from the resolved theme (theme.fonts.heading, theme.fonts.body, falling back to theme.fonts.primary) and uses theme.colors.content.primary, theme.colors.border.brand, and theme.colors.control.link.primary for styling.

Supported syntax

| Element | Syntax | | ---------------- | --------------------------------------- | | Headings (h1–h4) | # text#### text | | Bold | **text** | | Italic | *text* | | Link | [text](https://example.com) | | Image | ![alt](https://example.com/image.png) | | Inline code | `code` | | Code block | ```language | | Blockquote | > quote | | Unordered list | - item | | Ordered list | 1. item |

Examples

Rich content

import * as React from "react";
import { Markdown } from "@xsolla/xui-markdown";

export default function RichContent() {
  const content = `# Product documentation

## Getting started

1. Install the package
2. Configure your API keys
3. Initialise the SDK

> **Note:** keep keys out of source control.

\`\`\`javascript
import { SDK } from '@example/sdk';
const client = new SDK({ apiKey: process.env.API_KEY });
await client.initialize();
\`\`\`

Visit our [documentation](https://docs.example.com).`;

  return <Markdown>{content}</Markdown>;
}

Live preview

import * as React from "react";
import { Markdown } from "@xsolla/xui-markdown";

export default function LivePreview() {
  const [content, setContent] = React.useState("# Hello\n\nStart typing...");
  return (
    <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 16 }}>
      <textarea
        value={content}
        onChange={(e) => setContent(e.target.value)}
        style={{ height: 240, fontFamily: "monospace" }}
      />
      <div style={{ background: "#1a1a1a", padding: 16, borderRadius: 8 }}>
        <Markdown>{content}</Markdown>
      </div>
    </div>
  );
}

Accessibility

  • Headings produce a proper document outline.
  • Links inherit the theme's link colour and underline on hover/focus.
  • Provide alt text via standard markdown image syntax.
  • Code blocks use semantic <pre><code> for screen readers.