Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
react-highlightable
Advanced tools
Highlight values in your app when they're changed to emphasize them.
Highlight values in your app when they're changed to emphasize them.
If you want to test this locally, then: git clone http://github.com/mitchellvanw/react-highlightable
and open /examples/index.html
npm install react-highlightable --save
var React = require('react');
var Highlightable = require('react-highlightable');
var App = React.createClass({
render: function() {
return (
<div>
<h1>Your App</h1>
<Timer />
</div>
);
}
});
var Timer = React.createClass({
getInitialState: function() {
return {secondsElapsed: 0};
},
tick: function() {
this.setState({secondsElapsed: this.state.secondsElapsed + 1});
},
componentDidMount: function() {
this.interval = setInterval(this.tick, 1000);
},
componentWillUnmount: function() {
clearInterval(this.interval);
},
render: function() {
return <div>Seconds Elapsed: <Highlightable>{this.state.secondsElapsed}</Highlightable></div>;
}
});
React.render(<App />, document.getElementById('mount-node'));
It expects text not an element (<Highlightable>...</Highlightable>
) that will be highlighted.
If true, on mount it'll highlight the value on mount.
default: false
This will determine the background of the highlight.
default: #ae2240
The padding used for the highlighted item.
default: 2
The font color used when the item is highlighted.
default: #f2f2f2
The border radius used when the item is highlighted.
default: 2
The transition used when the item is highlighted.
default: all .3s ease
The delay in milliseconds when the highlighted item returns to a normal state.
Please, create issues and pull requests.
git clone https://github.com/mitchellvanw/react-highlightable
cd react-portal
npm install
npm install react
gulp
http://localhost:8080
)portal.js
(aka don't run npm run build
)gulp eslint
before every commit to preserve the coding style. Do you know there is a nice real-time checking integration for your editor? ;-)This package is maintained by Mitchell van Wijngaarden.
This package is licensed under the MIT license.
FAQs
Highlight values in your app when they're changed to emphasize them.
We found that react-highlightable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.