Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 10, 2024 via pnpm

react-markdown 8.0.7

React component to render markdown
Package summary
Share
0
issues
2
licenses
73
MIT
1
BSD-3-Clause
Package created
9 May 2015
Version published
12 Apr 2023
Maintainers
3
Total deps
74
Direct deps
17
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
73 Packages, Including:
@types/debug@4.1.12
@types/hast@2.3.10
@types/mdast@3.0.15
@types/ms@0.7.34
@types/prop-types@15.7.12
@types/react@18.3.1
@types/unist@2.0.10
bail@2.0.2
character-entities@2.0.2
comma-separated-tokens@2.0.3
csstype@3.1.3
debug@4.3.4
decode-named-character-reference@1.0.2
dequal@2.0.3
extend@3.0.2
hast-util-whitespace@2.0.1
inline-style-parser@0.1.1
is-buffer@2.0.5
is-plain-obj@4.1.0
js-tokens@4.0.0
kleur@4.1.5
loose-envify@1.4.0
mdast-util-definitions@5.1.2
mdast-util-from-markdown@1.3.1
mdast-util-to-hast@12.3.0
mdast-util-to-string@3.2.0
micromark-core-commonmark@1.1.0
micromark-factory-destination@1.1.0
micromark-factory-label@1.1.0
micromark-factory-space@1.1.0
micromark-factory-title@1.1.0
micromark-factory-whitespace@1.1.0
micromark-util-character@1.2.0
micromark-util-chunked@1.1.0
micromark-util-classify-character@1.1.0
micromark-util-combine-extensions@1.1.0
micromark-util-decode-numeric-character-reference@1.1.0
micromark-util-decode-string@1.1.0
micromark-util-encode@1.1.0
micromark-util-html-tag-name@1.2.0
micromark-util-normalize-identifier@1.1.0
micromark-util-resolve-all@1.1.0
micromark-util-sanitize-uri@1.2.0
micromark-util-subtokenize@1.1.0
micromark-util-symbol@1.1.0
micromark-util-types@1.1.0
micromark@3.2.0
mri@1.2.0
ms@2.1.2
object-assign@4.1.1

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
diff@5.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

17
All Dependencies CSV
β“˜ This is a list of react-markdown 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@types/hast2.3.102.38 kBMIT
prod
@types/prop-types15.7.126.55 kBMIT
prod
@types/react18.3.1427.28 kBMIT
prod peer
@types/unist2.0.102.5 kBMIT
prod
comma-separated-tokens2.0.33.73 kBMIT
prod
hast-util-whitespace2.0.13.95 kBMIT
prod
prop-types15.8.122.12 kBMIT
prod
property-information6.5.0102.37 kBMIT
prod
react-is18.3.123.45 kBMIT
prod
react18.3.1310.65 kBMIT
prod peer
remark-parse10.0.25.75 kBMIT
prod
remark-rehype10.1.08.52 kBMIT
prod
space-separated-tokens2.0.23.14 kBMIT
prod
style-to-object0.4.410.42 kBMIT
prod
unified10.1.220 kBMIT
prod
unist-util-visit4.1.26.4 kBMIT
prod
vfile5.3.717.89 kBMIT
prod

Visualizations

Frequently Asked Questions

What does react-markdown do?

React-Markdown is a highly popular npm package designed to render markdown in your React applications. Its primary functionality revolves around accepting markdown strings and converting them into a virtual DOM, thereby allowing you to render the parsed markdown as React elements. Not only is React-Markdown safe by default (preventing dangerouslySetInnerHTML or XSS attacks), but it also supports components and plugins, providing an efficient and secure way to incorporate markdown rendering into your development projects.

How do you use react-markdown?

To use React-Markdown, you first need to install the package into your project using npm. The command for this is npm install react-markdown. Once you've successfully installed React-Markdown, you'll need to add a simple import statement: import Markdown from 'react-markdown'; at the beginning of your file to access its features.

For a basic usage example, suppose you have a markdown string like const markdown = '# Hi, *Pluto*!';. To render this string as markdown, pass it within the React-Markdown component in your render method like so:

import React from 'react';
import ReactDom from 'react-dom';
import Markdown from 'react-markdown';

const markdown = '# Hi, *Pluto*!';

ReactDom.render(<Markdown>{markdown}</Markdown>, document.body);

This will render a headline saying "Hi, Pluto!" in italics as interpreted from the markdown string. For more advanced use cases involving plugins and custom components, refer to the extensive examples provided in the React-Markdown's GitHub repository readme section.

Where are the react-markdown docs?

The extensive documentation for React-Markdown can be found on its GitHub repository. The readme file on this repository includes everything you need to get started, including installation instructions, basic and advanced usage examples, plugin information, and API details. Also, it explains security measures and how to use React-Markdown with JSX.