react-font-size-resizer
v1.0.1
Published
This package adds buttons that allow you to resize the font size of the entire html React App
Downloads
118
Maintainers
Readme
react-font-size-resizer
This package adds buttons that allow you to modify the font size of the entire html React App
Install
npm install --save react-font-size-resizer
Usage
import React, { Component } from "react";
import SwitchTextSize from "react-font-size-resizer";
class Example extends Component {
render() {
return <SwitchTextSize />;
}
}
Props
<SwitchTextSize
default={100} // numerical default font size value
step={20} // numerical quantity that increases / decreases
min={60} // numerical min font size value
max={180} // numerical max font size value
suffix={"%"} // string suffix property font-size css
store={localStorage} // object store to save current font size value
storeKey="SwitchTextSize" // string of store key
/>
Live Demo
https://fcabanasm.github.io/react-font-size-resizer
License
MIT © fcabanasm