Skip to main content
Neural Nativev0.1.0-beta.1Documentation

Import

component.ts
import { NeuTimelineComponent } from '@neural-ui/native/timeline';

Examples

Import ExampleComponent into its parent and place <app-example /> inside your application’s root neu-theme. The preview supplies the device frame and safe areas; use the root setup from Installation in your app.

Release milestones

Complete the device review and reopen it to compare milestone states.

View and copy the complete example
release-milestones.component.ts
import { Component, signal, computed } from '@angular/core';
import { NeuButtonComponent } from '@neural-ui/native/button';
import { NeuTimelineComponent } from '@neural-ui/native/timeline';
import { View, Text, ScrollView } from '@ng-native/components';
import type { NeuOption } from '@neural-ui/native';

@Component({
  selector: 'app-example',
  imports: [NeuButtonComponent, NeuTimelineComponent, View, Text, ScrollView],
  template: `
    <scroll-view class="product-scroll" keyboardShouldPersistTaps="handled" [showsVerticalScrollIndicator]="true"><view class="product-stack"><view class="product-section"><text class="product-title" accessibilityRole="header">From idea to release</text><text class="product-caption">Every milestone tells part of the story</text></view><view class="product-section">
    <view class="usage-section">
    <neu-timeline label="Current release status" [items]="currentMilestones()" completedLabel="Completed" pendingLabel="Pending" />
    <neu-button [label]="reviewed() ? 'Reopen device review' : 'Complete device review'" size="sm" variant="outline" (pressed)="reviewed.set(!reviewed())" />
    </view>
    </view></view></scroll-view>
  `,
  styles: `
.actions { gap: 12px; align-items: flex-start; } text { color: var(--neu-text, #172033); font-size: 16px; }

:host { flex: 1; flex-shrink: 1; min-height: 0; }
.product-scroll { flex: 1; flex-shrink: 1; height: 0px; min-height: 0; }
.product-stack { gap: 24px; padding-bottom: 20px; }
.product-section { gap: 12px; }
.product-row { flex-direction: row; align-items: center; gap: 12px; }
.product-copy { flex: 1; min-width: 0; gap: 4px; }
.product-title { color: var(--neu-text, #172033); font-size: 24px; line-height: 30px; font-weight: 600; }
.product-heading { color: var(--neu-text, #172033); font-size: 17px; line-height: 23px; font-weight: 600; }
.product-caption { color: var(--neu-muted, #596477); font-size: 14px; line-height: 20px; }
.product-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.product-surface { gap: 16px; padding: 16px; border-radius: 16px; background-color: var(--neu-surface, #ffffff); border-width: 1px; border-color: var(--neu-border, #a5afbf); }

.usage-scroll { flex: 1; }
.usage-stack { gap: 20px; padding-bottom: 20px; }
.usage-section { gap: 12px; }
.usage-heading { color: var(--neu-text, #172033); font-size: 16px; font-weight: 600; }
.usage-caption { color: var(--neu-muted, #64748b); font-size: 14px; }
.usage-row { flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: center; }
.usage-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }


  `,
})
export class ExampleComponent {
  readonly milestones: readonly (NeuOption & { readonly date?: string; readonly done?: boolean })[] = [
    { id: 'design', label: 'Design approved', date: 'Monday', done: true, description: 'Onboarding is ready for implementation.' },
    { id: 'test', label: 'Device review', date: 'Wednesday', done: false, description: 'Check the release candidate.' },
    { id: 'release', label: 'Release', date: 'Friday', done: false },
  ];
  readonly reviewed = signal(false);
  readonly currentMilestones = computed(() => this.milestones.map(item => item.id === 'test' ? { ...item, done: this.reviewed() } : item));
}
Interactive playground

Change the settings and try the result.

Device captures shown in English.

Timeline · android · native capture
AndroidNative screenshot
Timeline · ios · native capture
iOSNative screenshot

API reference

Inputs

NameTypeDefaultBindingDescription
labelstring'Timeline'InputHuman-readable name for the control, action or group.
completedLabelstring'Completed'InputLocalized state appended to a milestone’s accessible name when done is true. It does not change the visible title; an empty string omits the state announcement.
pendingLabelstring'Pending'InputLocalized state appended to a milestone’s accessible name when done is false. Milestones without done omit this state; an empty string also omits the announcement.
itemsreadonly (NeuOption & { readonly date?: string; readonly done?: boolean; })[][]InputOrdered milestones with stable IDs, labels and optional date, description and done. Set done explicitly to announce completed or pending status; omit it for a milestone without a completion state.

Models

This component declares no two-way models.

Outputs

This component declares no public outputs.

Types and data interfaces

Use the imports in your application. The definitions below are provided for reference.

NeuOption

NeuOption.ts
import type { NeuOption } from '@neural-ui/native';

// Public definition for reference only. Import this type; do not redeclare it.
export interface NeuOption {
    readonly id: string;
    readonly label: string;
    readonly description?: string;
    readonly disabled?: boolean;
}
FieldTypeRequirementMeaning
idstringRequiredStable, unique identifier used for tracking and selection.
labelstringRequiredHuman-readable item name.
descriptionstringOptionalOptional supporting text; rendering depends on the control.
disabledbooleanOptionalPrevents activating or selecting this item.

Inline shape of items

This property extends a shared type inline; it is not a separately named export. The following application-side alias shows the complete accepted shape.

example-data.ts
import type { NeuOption } from '@neural-ui/native';

type ExampleItems = readonly (NeuOption & { readonly date?: string; readonly done?: boolean; })[];