NeuInput wraps a native single-line input. Its public value model belongs to the application or FormField; label, hint, size and optional icon presentation are inputs, not a validation engine.
These values match the current preview. Complete handlers, Core imports and templates are in Source.
configured-state.ts
import { signal } from '@angular/core';
export const text = signal("");
These inputs require a model or function, not a checkbox. Edit the same-named field in the Source component and bind it in the template; data already used by this preview appears in the state above.
Disabled removes the native input from keyboard focus and blocks edits. Readonly keeps it focusable and readable but blocks edits; it is not the same as disabled. These are direct component inputs here, outside FormField.
Bind FormField to the control and define validation in the form schema. This example lets you edit, validate and reset the same field, including disabled and readonly states.
Angular's form schema decides validity; NeuInput only renders supplied invalid/errors state and an explicit errorMessage. It sets aria-invalid and links its visible error or hint through aria-describedby. The demo reveals an error message after interaction; it does not claim the component validates minLength itself.
Use [(value)] for two-way editing, or [value] with (valueChange) when you need an explicit handler. The touch event reports blur; it does not contain the field value.
Core associates the label with the native field, connects hint/error text, and reflects disabled, readonly, required and invalid state. Standard text-editing keys remain native.
Your application supplies a meaningful label, validation rules and understandable errorMessage text. Use distinct inputId values when assigning IDs yourself.
value supports two-way binding. touch reports blur. Inputs configure the field and the form state it displays; the tables below show their types, defaults and binding syntax.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Name
Type
Default
Template binding
Description
autocomplete
string
'off'
[autocomplete]
Native autocomplete hint for the text field.
dirty
boolean
false
[dirty]
Applied dirty state, normally supplied by FormField.
disabled
boolean
false
[disabled]
Disables the native input and removes it from keyboard focus.
endIcon
boolean
false
[endIcon]
Enables the projected trailing icon slot.
errorMessage
string
''
[errorMessage]
Explicit visible error text when error state is present.
errors
readonly ValidationError.WithOptionalFieldTree[]
[]
[errors]
Applied validation errors, normally from the form schema.
floatingLabel
boolean
true
[floatingLabel]
Switches between floating and static label presentation.
hidden
boolean
false
[hidden]
Hides the component host.
hint
string
''
[hint]
Help text linked to the native input when no visible error takes precedence.
Public native input-type choice constrained by NeuInputType.
Models
A model supports [(property)]="signal" or the [property] and (propertyChange) pair. Choose one form, not both.
Name
Type
Default
Template binding
Description
value
string
''
[(value)]
Bidirectional text model owned by the application or FormField.
Outputs
Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.
Name
Payload
Template binding
Description
touch
void
(touch)="onTouch($event)"
Lifecycle notification emitted when the native input blurs.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
Name
Mechanism
Contract
[neu-input-start]
Before the field
Content projection
The example places a prefix and an action button in the field slots.
<ng-content select="[neu-input-start]" />
Context used: โ
[neu-input-end]
After the field
Content projection
The example places a prefix and an action button in the field slots.
<ng-content select="[neu-input-end]" />
Context used: โ
Usage example
Enable the areas with [startIcon]="true" and [endIcon]="true", then place content inside the field using neu-input-start and neu-input-end. These selectors are for projection; startIcon and endIcon are inputs. This example shows decorative units and names the currency in the label. No icon resolver is needed.
Customize content
$USD
Public Types
Open a type to inspect its definition and interface fields.
NeuInputType.d.ts
import type { NeuInputType } from '@neural-ui/core/input';
// Public declaration (reference only)
export type NeuInputType = 'text' | 'email' | 'password' | 'tel' | 'url' | 'search';
The public --neu-input-* tokens below customize background, border and focus treatment. Typography, radius and shared colors come from the global Core theme.
Specific tokens
Token
Purpose
State / variant
Default / source
Fallback
--neu-input-background
Field and floating-label background.
Field surface
var(--neu-surface)Component fallback
--neu-surface
--neu-input-border
Field border outside focus and invalid states.
Unfocused, valid field
var(--neu-border)Component fallback
--neu-border
--neu-input-focus-border
Focused field border; invalid state takes precedence.
Focus without error
var(--neu-primary)Component fallback
--neu-primary
--neu-input-focus-ring
Normal focus ring; invalid focus uses the shared error color.
Focus without error
var(--neu-focus-ring)Component fallback
--neu-focus-ring
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.
Token
Purpose here
Other impact
Default / fallback
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-border-hover
Control borders on hover
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.16)
--neu-error
Invalid field or danger-action color
Shared by other Core consumers; scope the override.
#dc2626
--neu-error-text
Error text and danger outline/ghost Button text in both themes
Shared by other Core consumers; scope the override.
#991b1b
--neu-focus-ring
Normal keyboard-focus ring
Shared by other Core consumers; scope the override.