Design principles, Angular Material theming, component guidelines, and accessibility standards for the @acontplus/ng-components library.
Built on Angular Material’s theming. All components adapt automatically to light/dark mode via the ThemeSwitcher service.
| Palette | SCSS variable | Use |
|---|---|---|
| Primary | mat.$indigo-palette |
Main actions, key UI elements |
| Accent | mat.$pink-palette A200/A100/A400 |
Secondary actions, highlights |
| Warn | mat.$red-palette |
Errors, destructive actions |
Components and ThemeSwitcher detect dark mode via the .dark-theme CSS class on <html>. Toggle it with:
import { ThemeSwitcher } from '@acontplus/ng-components';
themeSwitcher.toggle(); // toggles and persists to localStorage
themeSwitcher.isDarkMode(); // Signal<boolean>
Follows Angular Material typography system using the Roboto font family.
| Level | Use case |
|---|---|
| Display | Page titles, hero text |
| Headline | Section headings (<h1>, <h2>) |
| Title | Card titles, dialog titles |
| Subheading | Secondary headings (<h3>) |
| Body | Main content |
| Caption | Labels, hints, metadata |
| Button | Button text |
Base unit: 8px (0.5rem)
| Name | px | rem |
|---|---|---|
| xs | 4px | 0.25rem |
| sm | 8px | 0.5rem |
| md | 16px | 1rem |
| lg | 24px | 1.5rem |
| xl | 32px | 2rem |
| 2xl | 48px | 3rem |
| 3xl | 64px | 4rem |
Minimum touch target: 48px
<acp-dynamic-card><acp-dynamic-card
[cardTitle]="'Product Details'"
[cardSubtitle]="'Premium Package'"
[isHeaderVisible]="true"
[areActionsVisible]="true"
[primaryButtonText]="'Buy Now'"
(primaryButtonClicked)="onPurchase()"
>
Card content here
</acp-dynamic-card>
<acp-button><!-- Standard button -->
<acp-button variant="primary" text="Save" icon="save" (handleClick)="onSave()" />
<!-- Report/export button — auto icon, color, tooltip from format -->
<acp-button [reportFormat]="REPORT_FORMAT.PDF" text="Export" (handleClick)="export()" />
variant |
Use |
|---|---|
primary |
Main action on a page or section |
secondary |
Alternative action |
success |
Confirmation, save, approve |
danger |
Delete, reject, destructive |
warning |
Caution actions |
info |
Neutral informational actions |
Button placement: Primary actions on the right in dialogs and forms. Consistent order: Cancel → Confirm.
import { AdvancedDialogService } from '@acontplus/ng-components';
dialogService.openInWrapper({
component: YourDialogContentComponent,
title: 'Dialog Title',
icon: 'info',
data: {/* ... */},
});
<acp-data-grid>columns: DataGridColumn[] = [
{ field: 'id', header: 'ID', type: 'number', sortable: true },
{ field: 'name', header: 'Name', sortable: true },
{ field: 'status', header: 'Status', cellTemplate: statusTemplate },
];
<acp-data-grid
[data]="items"
[columns]="columns"
[rowSelectable]="true"
[showPaginator]="true"
[pageOnFront]="false"
[length]="totalCount"
(page)="onPageChange($event)"
(rowSelectedChange)="onSelect($event)"
/>
pageOnFront="false" for server-side paginationcellTemplate for custom cell renderingpinned: 'left' | 'right'<acp-theme-toggle><acp-theme-toggle lightModeLabel="Switch to light mode" darkModeLabel="Switch to dark mode" />
lightModeLabel and darkModeLabel for screen readersAll library components use the acp- prefix:
@Component({ selector: 'acp-dynamic-card', ... })
@Component({ selector: 'acp-data-grid', ... })
@Component({ selector: 'acp-theme-toggle', ... })
Demo app components use app- prefix.
role attributes on custom widgetsprefers-reduced-motion — disable animations for users who prefer it// Animation example following the guidelines
animations: [
trigger('fadeIn', [
transition(':enter', [style({ opacity: 0 }), animate('300ms ease-in', style({ opacity: 1 }))]),
]),
];
xs, sm, md, lg, xl)// Import all ng-components styles
@use '@acontplus/ng-components/styles';
// For Tabulator Material theme
@import 'tabulator-tables/dist/css/tabulator_materialize.min.css';
// For notifications
@import 'ngx-toastr/toastr';
@import 'sweetalert2/themes/material-ui.css';