NEURALNG
COMPONENTBETA

Button

A standalone action primitive with native semantics, Signal inputs, typed output, loading feedback and complete visual ownership.

Native keyboard behaviorSSR safeHeadless ready

GET STARTED

Import

Import from the granular entry point so unused components stay out of the application bundle.

app.ts TypeScript
import { NeuralButton, NeuralButtonGroup } from '@neural-ng/core/button';

@Component({
  imports: [NeuralButton, NeuralButtonGroup],
  // ...
})

FOUNDATION

Basic action

Use a literal or bound label for everyday actions; projected content remains available for rich composition. The modern clicked output emits the native MouseEvent.

Waiting for interaction

Semantic severities

Intent is explicit and shared with the rest of NeuralNg's semantic palette.

Visual variants

Outlined and text change the treatment, raised composes with either treatment, and rounded switches to the shared pill radius. If both text and outlined are present, text takes precedence deterministically.

Icons and sizing

The icon input removes repetitive inner markup. Logical start/end placement follows RTL, and icon-only actions still need an accessible name. With no label or projected content, the styled control automatically keeps equal width and height at every size.

Button group

NeuralButtonGroup provides native group semantics, merges adjacent borders and radii, follows RTL through logical CSS, and supports horizontal or vertical composition.

Disabled and loading

Loading replaces the visible label, exposes aria-busy and prevents duplicate activation.

Waiting for interaction

Badge composition

Use logical inline positions for counts or corner positions for notification-style indicators.

Native form semantics

The default type is safely button. Opt into native submit or reset behavior explicitly.

project-form.html HTML
<form (ngSubmit)="createProject()">
  <neural-button type="reset" severity="secondary">Reset</neural-button>
  <neural-button type="submit" severity="primary">Create project</neural-button>
</form>

Unstyled + Tailwind

Remove NeuralNg's visual layer while keeping the real button, disabled/loading behavior and structural hook. buttonClass targets the native element.

AI-FIRST CONTRACT

Readable by humans. Deterministic for agents.

The package ships focused README and llms.txt context beside the entry point, including imports, modern Signal APIs, accessibility rules and failure modes.