Import

import-tour.ts
import { NuiTour, type NuiTourStep } from '@needless-ui/angular/tour';

NuiTour

A guided tour.

Selector
nui-tour
NuiTour: Properties
NameTypeDefaultDescription
stepsInputNuiTourStep[][]The steps, in order.
openTwo-waybooleanfalseWhether the tour is on.
stepTwo-waynumber0The step shown, from 0.
labelsInputPartial<NuiTourLabels>Every text it shows, to translate.
finishedOutputvoidEmits when the last step is done.
dismissedOutputnumberEmits the step the tour ended on, when it ends early.
startMethod(from?: number) => voidStarts the tour, from the first step or the one given.
endMethod(finished: boolean) => voidEnds the tour, finished or dismissed.

NuiTourStep

A step of the tour.

NuiTourStep: Properties
NameTypeDefaultDescription
targetPropertystring | Element | (() => Element | null)What it points at. Without one, the card shows in the middle.
titlePropertystringThe card’s title.
contentPropertystring | TemplateRefIts text, or a template.
sideProperty'top' | 'bottom' | 'start' | 'end''bottom'Where the card goes beside the target.
alignProperty'start' | 'center' | 'end''center'How the card lines up with the target.
paddingPropertynumber8Room around the target in the spotlight, in pixels.
interactivePropertybooleanfalseThe target can be used while the card is up.
beforeShowProperty() => void | Promise<void>Runs before the step shows. The tour waits for a promise.