Skip to content

SusTutorialModal

SusTutorialModal

Tutorial modal — SusModal + SusDialogueBox with Next/Skip steps; optional soft handoff to SusSpotlightTour when attached, works standalone without a tour.

Package

SusKit · Molecules (commercial)

Open in Playground

SusKit · Molecules

Props

NameTypeDefault
ModelProp<bool>falsev-model
CurrentIndexProp<int>-1
NextLabelProp<string>"Next"
FinishLabelProp<string>"Done"
SkipLabelProp<string>"Skip"
RevealProp<string>"Instant"
WidthProp<float>480f
PersistentProp<bool>truev-model

Slots

No slots.

Events

NameFieldPayload
OpenedOnOpened
ClosedOnClosed

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-modal__title
  • sus-tutorial-modal
  • sus-tutorial-modal__next
  • sus-tutorial-modal__skip
  • sus-tutorial-modal__title
  • sus-tutorial-modal__title--empty

Usage

Builds a modal around SusDialogueBox with Next/Skip. Optional AttachSpotlight hands the current step’s highlight target to SusSpotlightTour when one is attached; without a tour the modal still runs.

csharp
var tutorial = new SusTutorialModal();
tutorial.NextLabel.Value = "Next";
tutorial.SkipLabel.Value = "Skip";
tutorial.Reveal.Value = "PerChar";
tutorial.AddStep("Guide", "Welcome aboard.", title: "Intro");
tutorial.AddStep("Guide", "Open the inventory with I.", title: "Inventory");
// tutorial.AttachSpotlight(myTour); // soft — omit if no tour
tutorial.Completed = () => { /* finished */ };
tutorial.Skipped = () => { /* aborted */ };
tutorial.Start();
// tutorial.Next(); tutorial.Skip(); tutorial.Close();
Prop / APIRole
Model / CurrentIndexOpen state and step index
NextLabel / SkipLabelButton copy
Reveal / Width / PersistentDialogue reveal + modal chrome
AddStep / ClearStepsBuild the step list
AttachSpotlight(tour)Soft handoff to spotlight tour
Start / Next / Skip / CloseRun controls
StepChanged / Completed / SkippedHost events

Notes

  • Storybook story Tutorial Modal (tutorial-modal).
  • Hub shot kit-tutorial-modal.png — showcase, captured live from Play mode.