Getting StartedInstallation and setup guides 5
LayoutWorkflow and structural layout components 7
OverlayModal and floating layer surfaces 3
FeedbackStatus, empty, progress, and loading placeholder patterns 5
FormInput and selection components 17
UtilityGeneral-purpose interface utilities 7
NavigationMenu surfaces and hierarchical actions 7

Styling contract

Style the wrapper through the stable attributes on the rendered button host rather than relying on page-level utility classes or brittle DOM assumptions.

Wrapper state hooks

AttributeValuesUsage
data-appearancesolid | outline | ghostSelects visual button style.
data-toneprimary | neutral | success | dangerMaps semantic color intent.
data-sizesm | md | lgControls component dimensions.
data-disabled"" when disabledUse for styling disabled affordance.

Wrapper shell

  • :host is inline-flex, so layout spacing is typically applied by the parent container.
  • The internal button uses the .tng-button class plus the reflected data attributes.
  • Projected icon or text content stays owner-authored, so spacing inside the content still belongs to you.

Layout tokens

Use custom properties on the tng-button host to control width and content alignment without deep selectors or global overrides.

TokenDefaultUsage
--tng-button-widthautoSets explicit inline width for the rendered button.
--tng-button-min-widthautoProvides minimum width without affecting host layout helpers.
--tng-button-max-widthnoneConstrains button growth in flexible rows.
--tng-button-justifycenterControls content alignment inside the internal button.
--tng-button-gap0.5remAdjusts spacing between projected icon and label.
--tng-button-padding-inline-sm/md/lg0.75rem / 1rem / 1.25remSize-aware horizontal padding tokens.
--tng-button-padding-block0Optional vertical padding shared across sizes.

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;
}