OnboardingYakDocumentation
DocsBuild your onboarding
BUILD YOUR ONBOARDING

Images, video, and motion

Choose image fit and dimensions, use high-quality assets, add gentle motion, or render video.

Image quality and sizing#

Upload the original image at a resolution suitable for the largest phone display you expect. Avoid enlarging a small thumbnail in a full-screen layout. Use the image editor’s Fit, Placement, Width, and Height controls to choose cropping and size independently.

  • Fill: uses available layout space.
  • Fixed: uses the configured dimension (or the default when blank).
  • Fit: controls how the image sits inside its box, such as cover or contain.
  • Full background: makes the image cover the screen behind other content.

Screen entrance#

A screen entrance animates the whole screen in as it opens, using fade, rise, slide, or pop. Set one for a single screen in its settings, or for every screen in Brand settings. It plays along with any entrances set on individual pieces, and is skipped when the device asks for reduced motion. In a flow, set theme.screenMotion.

Image motion#

Image motion runs independently from entrance animation and respects the device’s reduced-motion preference. Options include float, gentle rocking, pulse, and slow drift/zoom. Motion is configured on the image in Studio and is included in the published flow.

Render video#

The SDK deliberately has no video player dependency. Install expo-video, rebuild the app, and provide renderVideo. The renderer should fill the supplied style, loop, and stay muted.

FlowVideo.tsx
import { useVideoPlayer, VideoView } from 'expo-video';
import { Onboarding, type OnboardingVideo } from '@onboarding-yak/react-native';

function FlowVideo({ uri, resizeMode, style }: OnboardingVideo) {
  const player = useVideoPlayer(uri, (player) => {
    player.loop = true;
    player.muted = true;
    player.play();
  });

  return (
    <VideoView
      player={player}
      style={style}
      contentFit={resizeMode === 'stretch' ? 'fill' : resizeMode}
      nativeControls={false}
    />
  );
}

<Onboarding {...props} renderVideo={(video) => <FlowVideo {...video} />} />

Video formats and assets#

Use MP4 encoded as H.264 (yuv420p) or HEVC tagged hvc1 for broad device compatibility. Keep clips short and reasonably small. Upload from Studio or provide an HTTPS URL. For AI-assisted uploads, call MCP create_asset_upload and PUT the file to the signed upload URL with the matching content type.