An open API service indexing awesome lists of open source software.

https://github.com/wadie/ngx-font-size

An Angular component for web accessibility that allows the visitor to toggle between font sizes on the app.
https://github.com/wadie/ngx-font-size

angular angular-components font-size npm-package

Last synced: about 1 year ago
JSON representation

An Angular component for web accessibility that allows the visitor to toggle between font sizes on the app.

Awesome Lists containing this project

README

          

# ngx-font-size [![npm version](http://img.shields.io/npm/v/ngx-font-size.svg)](https://npmjs.org/package/ngx-font-size) [![StackBlitz](https://img.shields.io/badge/stackblitz-online-orange.svg)](https://stackblitz.com/edit/ngx-font-size)

> An Angular component for web accessibility that allows the visitor to toggle between font sizes on the app.

## Available options

`mdSize` is set to be the default font size.

Option | Description
:---:|---
iconColor | The color of the toggle icons.
selectedColor | The color of the selected icon.
lgSize | A string that represents the *large* font size in px/rem/...
mdSize | A string that represents the *medium* font size in px/rem/...
smSize | A string that represents the *small* font size in px/rem/...

## Install

```bash
$ npm install ngx-font-size --save
```

## Usage

From your Angular `AppModule`:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import the library
import { NgxFontSizeModule } from 'ngx-font-size';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxFontSizeModule // <-- Add this line
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```

Once the library is imported, you can use its component in your Angular application:

```xml


{{title}}

```

[StackBlitz Demo](https://stackblitz.com/edit/ngx-font-size)

## License

MIT © [Wadie](https://github.com/wadie)