Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-text-illuminator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-text-illuminator

ReactTextIlluminator is a React component designed to highlight specific text within a larger body of text. It can be useful for indicating search results, highlighting keywords, or emphasizing certain terms.

  • 0.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ReactTextIlluminator

ReactTextIlluminator is a React component designed to highlight specific text within a larger body of text. It can be useful for indicating search results, highlighting keywords, or emphasizing certain terms.

size

Blazing Fast

Installation

You can install the ReactTextIlluminator component

via npm:

npm i react-text-illuminator

or via yarn:

yarn add react-text-illuminator

Features

  • Text Highlighting
  • SEO Friendly
  • Zero dependencies: Self-contained solution, ensuring reliability and ease of deployment.
  • Customization of Highlight Term
  • Customization of Highlight Color
  • Support for Complex Text
  • Escape of Special Characters

Demo

Live:

Codesandbox Demo

ReactTextIlluminator

Props

The ReactTextIlluminator component accepts the following props:

PropTypeDescriptionDefault Value
textContentstringThe text content to be displayed.-
highlightTermstringThe text to be highlighted within the textContent.-
highlightColorstringThe background color used for highlighting.#00d1a0 #ffff00

Usage

To use the ReactTextIlluminator component, simply import it into your React application and include it in your JSX markup.

import React from 'react';
import ReactTextIlluminator from 'react-text-illuminator';

const App = () => {
  return (
    <div>
      <h1>Search Results</h1>
      <ReactTextIlluminator
        textContent="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
        highlightTerm="Lorem"
        highlightColor="yellow"
      />
    </div>
  );
};

export default App;

Documentation

Documentation

License

MIT

🚀 About Me

Hello everyone, I'm fredarcito, a Frontend engineer in constant learning. I only know that I don't know anything, but Google knows.

Feedback

If you have any feedback, please reach out to us at freddy@gogrow.dev

Keywords

FAQs

Package last updated on 08 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc