Unify Logo Footer.svg
Unify Applications
Logo
Stories

Stories

Logo

6 mins READ

Overview

The Stories block renders a sequence of content items — images, videos, or fully custom blocks — each displayed for a configurable duration before automatically advancing to the next. A segmented progress bar at the top shows the user's position in the sequence and remaining time for the current story item. Users can tap left/right navigation arrows or swipe (on mobile) to jump to the previous or next item.

The format is familiar from social media stories and works well any time you want to present a short, sequential narrative that guides users through a set of information without requiring them to explicitly click through each step.

Story Item Types

TypeDescriptionRequired Fields
imageDisplays a static image, filling the story container. Caption and CTA button optional.src (URL or binding)
videoPlays a video clip. Duration defaults to the video's natural length unless duration is set shorter.src (video URL or data source)
customRenders a nested block layout you design (any combination of text, images, charts, icons). Use for rich content that goes beyond a static image.slot content inside the item

Items Array

Each object in the items array defines one story slide:

FieldTypeRequiredDescription
idstringRequired (required)Unique identifier for this story item. Used in event payloads and for controlled navigation.
typeenum: image | video | customRequired (required)The content type of this story slide.
srcstring (URL, bindable)Optional (optional)URL of the image or video content. Required for image and video types.
durationnumber (ms)Optional (optional)How long this slide is shown before auto-advancing. Defaults to the block-level defaultDuration. For video type, defaults to the video's natural duration if not set.
captionstringOptional (optional)Text caption overlaid at the bottom of the story item. Supports Markdown for bold and links.
ctaLabelstringOptional (optional)Label of the call-to-action button shown at the bottom of the story item. Only appears when ctaAction is also set.
ctaActionaction chainOptional (optional)Action chain triggered when the CTA button is clicked. Use to navigate, open a modal, or trigger an API call.

Block-Level Properties

PropertyTypeDefaultDescription
itemsarray (bindable)Sample itemsThe story slide definitions. Bind to a static array or a data source result.
defaultDurationnumber (ms)5000Default display duration for each story item when the item doesn't specify its own duration.
autoAdvancebooleantrueAutomatically advance to the next item when the current duration expires. Set to false for fully manual navigation.
loopbooleanfalseWhen the last item completes, restart from the first item instead of stopping. Useful for kiosk-style promotional displays.
showProgressbooleantrueShow the segmented progress bar at the top of the story viewer. Each segment represents one item; the active segment fills as time elapses.
showNavArrowsbooleantrueShow left and right navigation chevron buttons on the sides of the story viewer for non-swipe navigation.
swipeEnabledbooleantrueEnable horizontal swipe gestures to navigate between items on touch devices.
pauseOnHoverbooleantruePause the auto-advance timer while the mouse cursor is hovering over the story. Allows users to read captions without the story advancing.
onCompleteaction chainFires when the last story item finishes (either by timer or user navigation past it). Use to navigate to the next page, dismiss a modal, or mark onboarding as complete.
onItemChangeaction chainFires each time the visible story item changes. Payload: { index: number, item: object, direction: "forward" | "back" }.

Setting Up an Onboarding Stories Flow

  1. Drop the block and configure items: Drag Stories onto a full-width container (or a modal's body). Open the Items editor and add 3–5 items. For each: set type = custom, design the slot content with a feature illustration, headline, and body text.

  2. Set timing: Set Default Duration = 8000 ms (8 seconds) for text-heavy slides. For image-only slides, set the individual duration to 4000ms. Enable Pause on Hover = true so desktop users can read without racing the timer.

  3. Add a CTA on the last slide: On the final item, set CTA Label = "Get Started". Set CTA Action to a Navigate action pointing to the main workspace page. Also wire the onComplete event to the same Navigate action so keyboard/auto-advance users also proceed.

  4. Mark onboarding complete: In the onComplete action chain, add a Set Variable action to set a hasCompletedOnboarding user preference variable to true. On the onboarding page's onLoad, add a condition that redirects to the workspace if the variable is already true — so returning users skip the flow.

Examples

Example: Product feature announcement

Render a 3-slide Stories block inside an announcement modal. Each slide is type image with a feature screenshot as src and a caption explaining the new capability. Set autoAdvance = false and showNavArrows = true — users navigate at their own pace. The CTA on the last slide links to the feature's help page.

Example: Seasonal promotion kiosk

Mount a full-screen Stories block with type image slides pulled from a CMS data source. Set loop = true, autoAdvance = true, defaultDuration = 6000, showNavArrows = false. The carousel runs indefinitely without user interaction — suitable for a lobby screen or kiosk display.

Example: Step-by-step configuration wizard

Use type custom for each slide with a form section inside. Set autoAdvance = false so users advance only by clicking the "Next" CTA button inside each custom slide. Use onItemChange to save partial form state to a page variable as users progress through the steps. The final slide's CTA submits the collected data to an API action.

Frequently Asked Questions

Can I navigate to a specific story item programmatically?

Yes. Use the Control Block action with Operation = goToItem and specify the target item ID or index. This is useful when an external button (e.g. a table of contents) should jump directly to a specific story slide. The progress bar updates to reflect the new position.

How do I pause the stories auto-advance when a video is playing?

For type = video items, auto-advance is automatically synchronized to the video duration if no duration is set on the item. The timer only starts after the video begins playing. If you set a fixed duration shorter than the video length, the story advances before the video finishes. To allow the full video to play, leave the item's duration unset and the block will use the video's ended event as the advance trigger.

Can the Stories block appear embedded in a page (not full-screen)?

Yes. The Stories block fills its parent container's dimensions, not the full viewport. Place it inside a Card, Container, or Modal and set an explicit height (e.g. 400px) on the container. The progress bar, navigation, and content all scale to the container size. The swipe gesture is scoped to the block — it does not conflict with page-level scrolling.

PageRelationship
Flippable CardTwo-face toggle — simpler binary reveal; use when two states are sufficient
Stepper V2Linear multi-step flow with validation — use for forms that require completion at each step
Tabs & Stepped ContainerUser-navigated tabbed content — use when steps are not time-based and the user needs free navigation