# fontizer

> Tiny React component to you manage your website's fonts display

Latest version **1.0.17** (published 2020-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install fontizer
pnpm add fontizer
yarn add fontizer
bun add fontizer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.17 |
| Published | 2020-12-16 |
| First published | 2020-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 25 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | LukyVj |
| Maintainers | lukyvj |

## Links

- npm: https://www.npmjs.com/package/fontizer
- Repository: https://github.com/LukyVj/Fontizer
- Homepage: https://fontizer.vercel.app
- Issues: https://github.com/LukyVj/Fontizer/issues
- npm.io page: https://npm.io/package/fontizer

## Dependencies (1)

- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.1.2

## Recent versions

- 1.0.17 (latest) — 2020-12-16
- 1.0.16 — 2020-12-09
- 1.0.15 — 2020-12-09
- 1.0.14 — 2020-12-09
- 1.0.13 — 2020-12-09
- 1.0.12 — 2020-12-09
- 1.0.11 — 2020-12-08
- 1.0.10 — 2020-12-08
- 1.0.9 — 2020-12-08
- 1.0.8 — 2020-12-08
- 1.0.7 — 2020-12-08
- 1.0.6 — 2020-12-08
- 1.0.5 — 2020-12-08
- 1.0.4 — 2020-12-08
- 1.0.3 — 2020-12-08
- … 3 more at https://npm.io/package/fontizer/versions

## README

# Fontizer

## Small react helper to let users handle your fonts display

### Demo

![](https://github.com/LukyVj/fontizer-site/blob/main/public/fontizer-demo.gif?raw=true)

### How to use it

Install the package

`yarn add fontizer`

Prepare your CSS file, by adding these base values to your CSS :root element

```css
--base-font-size: 16px;
--base-font-weight: 300;
```

Then load Fontizer on your page, it can take 3 props:

- The `position` one that will position it ( in the corners ).
- A `callback` function that returns the new values in an array `[16, 300]`
- A `variables` props, which take an object with `{size: '--new-variable-name', weight: '--new-variable-name'}`

_Note that if you decide to go with custom variable names, you MUST provide both size & weight variables_

```javascript
import { Fontizer } from "fontizer";

<Fontizer
  position="bl"
  callback={(value) => console.log(`values changed ${value}`)}
  variables={{ size: "--foo-bar-size", weight: "--foo-bar-weight" }}
/>;
```

### Props

| prop      | type     | value                            | default                               | description                                                               |
| --------- | -------- | -------------------------------- | ------------------------------------- | ------------------------------------------------------------------------- |
| position  | string   | 'bl' \| 'br' \| 'tl' \| 'tr'     | bl                                    | corner coordinates to position your Fontizer button/panel                 |
| callback  | Function | any javascript function          | null                                  | Pass a function using the callback returned value, happen on each updates |
| variables | object   | {size: '--foo', weight: '--bar'} | --base-font-size & --base-font-weight | If needed, you can override the default variables name.                   |

### A sprinkle of CSS?

override the styles

```css
.fontizer-wrapper {
}
.fontizer-button {
}
.fontizer-icon {
}
.fontizer-panel {
}
```

---
_Source: https://npm.io/package/fontizer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
