This project is a React application designed to showcase a text highlighting feature. Users can interact with the text content, selecting portions of text to highlight, and even remove the highlights with a click. The implementation includes touch support for mobile devices, allowing users to highlight text seamlessly across various platforms.
The base project was created using create-react-app{:target="_blank"}.
Give a ⭐️ if this project helped you!
- Text highlighting using spans.
- Seamless removal of highlights.
- Mobile-friendly touch support.
- Clean and organized React component structure.
Feel free to explore the code and integrate this text highlighting functionality into your own React projects!
The React Text Highlighter App utilizes the following technologies and packages:
- React.js: A JavaScript library for building user interfaces.
- Tailwind CSS: A utility-first CSS framework used for styling.
- Node.js: A JavaScript runtime used for building server-side applications.
- npm (Node Package Manager): Used for managing project dependencies.
- Node.js and npm: Ensure that Node.js and npm are installed on your machine. You can download them from Node.js website.
-
Clone the Repository:
git clone https://github.com/bueno/react-text-marking-app.git
-
Navigate to the Project Directory:
cd react-text-marking-app
-
Install Dependencies:
npm install
In the project directory, you can use the scripts below:
-
Running the project
npm start
It runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.The page will reload when you make changes.
You may also see any lint errors in the console. -
Launching the test runner
npm test
Launches the test runner in the interactive watch mode.
See in the create-react-app the section about running tests for more information. -
Building the app for production
npm run build
Builds the app for production to the
build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.The build is minified and the filenames include the hashes.
Your app is ready to be deployed!See in the create-react-app the section about deployment for more information.
-
Removing the single build dependency from your project
npm run eject
Note: this is a one-way operation. Once you
eject
, you can't go back!If you aren't satisfied with the build tool and configuration choices, you can
eject
at any time. This command will remove the single build dependency from your project.Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except
eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.You don't have to ever use
eject
. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.