Use mode="single" for a scalar or null; mode="multiple" uses a readonly array. deselectable allows an active option to be cleared. options supports disabled entries and optional application icons. The item Template replaces visual content while Core retains the pressed state and native button.
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.
Use mode="single" for a scalar or null; mode="multiple" uses a readonly array. deselectable allows an active option to be cleared. options supports disabled entries and optional application icons. The item Template replaces visual content while Core retains the pressed state and native button.
Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Activated option, its value and the originating event.
touch
void
(touch)="onTouch($event)"
Notifies the form that the control has been touched; not a value change.
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.
import type { NeuOptionAccessor } from '@neural-ui/core/option-api';
import type { NeuOptionDisabledAccessor } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionDisabledAccessor<T> = NeuOptionAccessor<T, boolean>;
NeuOptionLabelAccessor.d.ts
import type { NeuOptionAccessor } from '@neural-ui/core/option-api';
import type { NeuOptionLabelAccessor } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionLabelAccessor<T> = NeuOptionAccessor<T, string>;
NeuOptionPath.d.ts
import type { NeuOptionPath } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionPath<T> = Extract<keyof T, string> | `${Extract<keyof T, string>}.${string}`;
NeuSelectionMode.d.ts
import type { NeuSelectionMode } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuSelectionMode = 'single' | 'multiple';
NeuSelectionValue.d.ts
import type { NeuSelectionMode } from '@neural-ui/core/option-api';
import type { NeuSelectionValue } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuSelectionValue<V, M extends NeuSelectionMode> = M extends 'multiple' ? readonly V[] : V | null;
NeuToggleOption.d.ts
import type { NeuIconKey } from '@neural-ui/core/foundation';
import type { NeuToggleOption } from '@neural-ui/core/toggle-button-group';
// Public declaration (reference only)
export interface NeuToggleOption<T = unknown> {
disabled?: boolean;
icon?: NeuIconKey;
label: string;
value: T;
}
Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.
Specific tokens
This component uses shared theme tokens rather than dedicated component hooks.
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-primary
Brand color for active controls and emphasis
Shared by other Core consumers; scope the override.
#007aff
--neu-primary-dark
Dark brand shade; outline and ghost Button text in the light theme
Shared by other Core consumers; scope the override.
#005fcc
--neu-primary-fg
Foreground drawn over the primary background
Shared by other Core consumers; scope the override.
#ffffff
--neu-primary-solid
Solid brand action background
Shared by other Core consumers; scope the override.
#006ee6
--neu-primary-solid-fg
Foreground of solid brand actions
Shared by other Core consumers; scope the override.
#ffffff
--neu-primary-solid-hover
Hover background of solid brand actions
Shared by other Core consumers; scope the override.
#005fcc
--neu-radius
Control corner radius
Shared by other Core consumers; scope the override.