Skip to main content

Hype Train Widget

Shows the widgets nested inside it only while a Twitch Hype Train is running. They fade in when a train starts and fade out after it ends (plus a short linger). It also carries the train's live values for the widgets inside to display.

Add it from Add Widget → Primitives → Hype Train and nest your widgets inside (Text, Image, Progress Bar, …).

Settings​

SettingDescription
Linger after endSeconds to keep showing after the train ends (default 6).
Fade durationFade in/out time, in milliseconds.
InvertShow the nested widgets only while there is no Hype Train.
BackdropBackground colour behind the nested widgets.

Displaying the live values​

  1. Add a Text widget inside the Hype Train widget.
  2. Switch its text to a dynamic value (the </> toggle).
  3. Insert a value from the Show / Hide widget values group in the variable picker, or type it in.

For example, a Text widget with `Level {{subtreeContext.hypeTrain.level}}` shows Level 3 during a level-3 train.

Available values​

VariableDescription
`{{subtreeContext.hypeTrain.level}}`The current Hype Train level (1, 2, 3, …).
`{{subtreeContext.hypeTrain.total}}`Total contribution points in the train so far.
`{{subtreeContext.hypeTrain.goal}}`Points needed to finish the current level.
`{{subtreeContext.hypeTrain.progress}}`Progress through the current level, 0 to 1 (e.g. 0.6 = 60%).
`{{subtreeContext.hypeTrain.phase}}`begin, progress, or end.
`{{subtreeContext.hypeTrain.active}}`true while a train is showing.
`{{subtreeContext.hypeTrain.trainType}}`The kind of train: regular, golden_kappa, or treasure.
`{{subtreeContext.hypeTrain.expiresAt}}`When the current level times out (ISO timestamp). Feed it to `$(countdown …)` for a live "time remaining".
`{{subtreeContext.hypeTrain.startedAt}}`When the train began (ISO timestamp).
`{{subtreeContext.hypeTrain.endedAt}}`When the train ended (ISO timestamp). End/linger only.
`{{subtreeContext.hypeTrain.cooldownEndsAt}}`When the next train can start (ISO timestamp). End/linger only.
`{{subtreeContext.hypeTrain.isSharedTrain}}`true when the train is shared across multiple channels.
`{{subtreeContext.hypeTrain.allTimeHighLevel}}`The channel's all-time record level.
`{{subtreeContext.hypeTrain.allTimeHighTotal}}`The channel's all-time record points.
`{{subtreeContext.hypeTrain.topBitsUser}}`The top bits contributor's display name (blank until someone cheers).
`{{subtreeContext.hypeTrain.topBitsTotal}}`How many bits that contributor has put in.
`{{subtreeContext.hypeTrain.topSubsUser}}`The top subs contributor's display name (blank until someone subs).
`{{subtreeContext.hypeTrain.topSubsTotal}}`That contributor's sub points.
note

goal and progress aren't sent on the final end phase, so they may be blank during end/linger. expiresAt only exists while the train is running, and endedAt/cooldownEndsAt only during end/linger.

tip

Feed `{{subtreeContext.hypeTrain.progress}}` straight into a Progress Bar widget's value for a live level meter. It's already a 0 to 1 fraction.

tip

For a ticking "time left on this level" timer, set a Text widget's content to `$(countdown {{subtreeContext.hypeTrain.expiresAt}})`.

See also​