Skip to content

MrHarrisonBarker/ng-theme

Repository files navigation

ng-theme (Deprecated!!)

npm npm GitHub issues NPM Build Status

Angular theming libary.

  • Collection of defualt themes
  • Injectable custom themes
  • Auto theming based on HTML element
  • Toggle and dropdown components
  • Theme service and directive

Install

npm install ng-time-from-pipe

ng-theme-service

Varibles
Attribute Description
currentTheme
themes
Methods
Attribute Description
setTheme
toggleTheme
listen
nextTheme

ng-theme-directive

inputs
Attribute Description
NgTheme

ng-theme-preview

inputs
Attribute Description
theme
<ng-theme-preview [theme]="theme"></ng-theme-preview>

Usage

import { NgThemeModule, NgThemeDirectiveModule, NgThemeComponentsModule } from 'projects/ng-theme/src/public-api';
@NgModule( { 
  declarations: [ ... ], 
  imports: [ ..., NgThemeModule, NgThemeDirectiveModule, NgThemeComponentsModule, ... ]
});
	imports: [ ..., NgThemeModule.forRoot({
		background: {
        backgroundOn: true,
        backgroundElement: 'body'
      },
      themes: [{
      	...
      }, {
      	...
      }]
	}), ... ]

Theme

export class Theme
{
	public name: string;

	public primary: string;
	public primaryText: string;

	public secondary: string;
	public secondaryText?: string;

	public background: string;

	public linkText: string;

	public buttonText?: string;
	public buttonBorder?: string;
	public buttonBackground?: string;

	public jumbo: string;
  public jumboText: string;
    
 	public hr: string;
	
	public shadow: string;

	public isDark: boolean;
	public accent: string;

}
<ng-theme-dropdown></ng-theme-dropdown>
<ng-theme-toggle></ng-theme-toggle>

About

Angular theming lib. Deprecated!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published