1.0.7 • Published 2 years ago

ngx-font-size v1.0.7

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

ngx-font-size npm version StackBlitz

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.

OptionDescription
iconColorThe color of the toggle icons.
selectedColorThe color of the selected icon.
lgSizeA string that represents the large font size in px/rem/...
mdSizeA string that represents the medium font size in px/rem/...
smSizeA string that represents the small font size in px/rem/...

Install

$ npm install ngx-font-size --save

Usage

From your Angular AppModule:

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:

<!-- You can now use NgxFontSize component in app.component.html -->
<h1>
  {{title}}
</h1>
<ngx-font-size
    [iconColor]=iconColor
    [selectedColor]="'#247AFD'"
    [lgSize]="'1.15rem'"
    [mdSize]="'1.05rem'"
    [smSize]="'15px'"
></ngx-font-size>

StackBlitz Demo

License

MIT © Wadie

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago