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.
- Host: GitHub
- URL: https://github.com/wadie/ngx-font-size
- Owner: wadie
- License: mit
- Created: 2020-04-14T04:27:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T12:20:35.000Z (over 3 years ago)
- Last Synced: 2025-03-19T02:05:38.863Z (about 1 year ago)
- Topics: angular, angular-components, font-size, npm-package
- Language: TypeScript
- Homepage: https://npmjs.org/package/ngx-font-size
- Size: 1.82 MB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ngx-font-size [](https://npmjs.org/package/ngx-font-size) [](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)