contaminate
v1.0.3
Published
A React component to randomize alt text on images using random words.
Downloads
2
Maintainers
Readme
Contaminate
Contaminate is a React component that randomizes the alt text on all images in your application every time the page is reloaded. It uses the Random Word API to fetch random words and assign them as alt text to enhance the accessibility of your application dynamically.
Usage
To use Contaminate in your React application, wrap your main application component with the Contaminate component. This will ensure that all images in your application will have their alt text randomized on each page load.
import logo from './logo.svg';
import './App.css';
import Contaminate from 'contaminate';
function App() {
return (
<Contaminate>
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
</Contaminate>
);
}
export default App;
License
This project is licensed under the MIT License. See the LICENSE file for details.