Angular theming libary.
- Collection of defualt themes
- Injectable custom themes
- Auto theming based on HTML element
- Toggle and dropdown components
- Theme service and directive
npm install ng-time-from-pipe
Attribute |
Description |
currentTheme |
|
themes |
|
Attribute |
Description |
setTheme |
|
toggleTheme |
|
listen |
|
nextTheme |
|
Attribute |
Description |
NgTheme |
|
Attribute |
Description |
theme |
|
<ng-theme-preview [theme]="theme"></ng-theme-preview>
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: [{
...
}, {
...
}]
}), ... ]
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>