JSPM

  • Created
  • Published
  • Downloads 8356
  • Score
    100M100P100Q132447F
  • License ISC

Text highlighter for React

Package Exports

  • react-mark.js
  • react-mark.js/Marker
  • react-mark.js/RangesMarker
  • react-mark.js/RegExpMaker
  • react-mark.js/components/Marker/Marker
  • react-mark.js/components/Marker/Marker.js
  • react-mark.js/components/Marker/index
  • react-mark.js/components/RangesMarker/RangesMarker
  • react-mark.js/components/RangesMarker/RangesMarker.js
  • react-mark.js/components/RangesMarker/index
  • react-mark.js/components/RegExpMarker/RegExpMarker
  • react-mark.js/components/RegExpMarker/RegExpMarker.js
  • react-mark.js/components/RegExpMarker/index
  • react-mark.js/components/index
  • react-mark.js/hooks/index
  • react-mark.js/hooks/useMarker/index
  • react-mark.js/hooks/useMarker/useMarker
  • react-mark.js/hooks/useMarker/useMarker.js
  • react-mark.js/index
  • react-mark.js/index.js
  • react-mark.js/types/BaseOptions
  • react-mark.js/types/MarkJS
  • react-mark.js/types/MarkJS.js
  • react-mark.js/types/MarkOptions
  • react-mark.js/types/Marker
  • react-mark.js/types/RangesMarker
  • react-mark.js/types/RegExpMarker
  • react-mark.js/types/UnmarkOptions
  • react-mark.js/types/index
  • react-mark.js/useMarker

Readme

🍬 A React wrapper around the popular [mark.js](https://markjs.io) library.
tree-shaking minimized minimized + gzip dependencies count
Tree Shaking Capability minimized minimized + gzip dependency count

⚡️ Quick Links

⚡️ Installation

The best way to install react-mark.js is via the npm package which you can install with npm (or yarn if you prefer)

📦 NPM

npm install -S mark.js react-mark.js

📦 Yarn

yarn add mark.js react-mark.js

↘️ Importing Components

import { Marker } from "react-marker.js";

🖌 Basic Example

import { Marker } from "react-mark.js";

export default () => (
  <Marker mark="reprehenderit">
    Cillum proident eu eiusmod incididunt pariatur. Ullamco qui deserunt ut
    reprehenderit cupidatat cupidatat nisi non occaecat non commodo. Magna
    incididunt eu laboris laboris labore. Sit duis ullamco qui nostrud aliqua do
    consectetur do incididunt eiusmod nulla consectetur. Sint reprehenderit
    culpa consectetur irure commodo magna. Officia Lorem veniam est cillum.
  </Marker>
);