Styling contract
Wrapper state hooks
Wrapper shell
Layout tokens
Use custom properties on the tng-button host to control width and content alignment without deep selectors or global overrides.
Owner guidance
Override the wrapper by targeting the internal button under tng-button. For fully custom hosts or anchor-button patterns, move to the headless Button page and use tngPress directly.
button.contract.css
css
.docs-search-trigger-button {
--tng-button-min-width: 10rem;
--tng-button-width: 100%;
--tng-button-justify: space-between;
}
.docs-search-trigger-button > .tng-button[data-size="sm"] {
--tng-button-padding-inline-sm: 0.875rem;
}
tng-button > .tng-button[data-tone="danger"][data-appearance="solid"] {
background: var(--tng-semantic-accent-danger);
color: var(--tng-color-white);
}
tng-button > .tng-button[data-disabled] {
opacity: 0.55;
cursor: not-allowed;
}