Button themes
The themeexpressiveenhancedtaglinkStyle
Dark mode has not been reviewed by design. It is a work in progress. Do not use.
Setting up dark mode in your app
There are two ways to apply dark mode. Both rely on CSS custom property inheritance — no SCSS recompile is needed.
Option 1 — per button
Pass [theme]
<button tg2Button [theme]="'tg2-dark'">Button</button>Option 2 — whole page or container
Set data-tg-theme="tg2-dark"<html>tg2Button[theme]
// Toggle dark mode on the whole page
document.documentElement.setAttribute('data-tg-theme', 'tg2-dark');
// Reset to light mode
document.documentElement.removeAttribute('data-tg-theme');
// Or scope to a container element
containerElement.setAttribute('data-tg-theme', 'tg2-dark');