Migrating from tgButton2 (tg-light)
Replace the tgButton2tg2Button[theme]="'tg-light'"Tg2ButtonComponentTgButton2Component
Selector
<!-- Before -->
<button tgButton2>Button</button>
<!-- After -->
<button tg2Button [theme]="'tg-light'" tg2Style="secondary">Button</button>Variant
The separate inputs ([transparent][tgStyle]tg2Style
<!-- Before -->
<button tgButton2 [transparent]="true">Button</button>
<!-- After -->
<button tg2Button tg2Style="transparent" [theme]="'tg-light'">Button</button>Size
The [compact]size
<!-- Before -->
<button tgButton2 [compact]="true">Button</button>
<!-- After -->
<button tg2Button size="small" [theme]="'tg-light'" tg2Style="secondary">Button</button>Auto size
The [autoCompact]autoSizeautoSize="small"
<!-- Before -->
<button tgButton2 [autoCompact]="true">Button</button>
<!-- After -->
<button tg2Button autoSize="small" [theme]="'tg-light'" tg2Style="secondary">Button</button>Tag
The [tag]tg-light[theme]="'tg-light'"
<!-- Before -->
<button tgButton2 transparent
tag>Button</button>
<!-- After -->
<button tg2Button [theme]="'tg-light'" [tag]="true">Button</button>Link style
The [linkStyle]tg-light[theme]="'tg-light'"
<!-- Before -->
<button tgButton2 [linkStyle]="true">Button</button>
<!-- After -->
<button tg2Button [theme]="'tg-light'" [linkStyle]="true">Button</button>Icon only
Icon-only detection is no longer automatic. Add [iconOnly]="true"
<!-- Before (icon-only detected automatically) -->
<button tgButton2 aria-label="heart">
<tg-icon name="heart"></tg-icon>
</button>
<!-- After -->
<button tg2Button [theme]="'tg-light'" [iconOnly]="true" aria-label="heart" tg2Style="secondary">
<tg-icon-left name="heart"></tg-icon-left>
</button>Spacing
tgButton2[compact]tg2Buttonmargin-bottom
(default):size="large"margin-bottom: $tg-spacing-compact; :size="medium"margin-bottom: $tg-unit; :size="small"margin-bottom: $tg-unit;
<!-- Before (tgButton2 applied its own margin-bottom for stacking) -->
<button tgButton2>Button one</button>
<button tgButton2>Button two</button>
<!-- After (tg2Button applies no margin — add it explicitly) -->
<button tg2Button [theme]="'tg-light'" class="my-button-spacing">Button one</button>
<button tg2Button [theme]="'tg-light'" class="my-button-spacing">Button two</button>
// my-button-spacing.scss
.my-button-spacing {
margin-bottom: $tg-spacing-compact; // large (default) — use $tg-unit for medium/small
}