Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

react-font-size-resizer

1.0.1 • Public • Published

react-font-size-resizer

This package adds buttons that allow you to modify the font size of the entire html React App

NPM JavaScript Style Guide

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

Install

npm i react-font-size-resizer

DownloadsWeekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

29.7 kB

Total Files

7

Last publish

Collaborators

  • avatar