Swan

API Reference

Swan Scan Components

Cross-platform scanning docs for web, React Native, iOS, and Android, plus supporting API docs for session token creation and webhooks.

Drop-in body and face scanning for any app. You pass in a user's details and an auth token. The scan, upload & processing, and results are all handled inside the component. There's no backend to build.

Before the scan

Getting ready

Before any scan, three steps prepare the user: Onboarding collects their basic details, Focal Length figures out which phone they're using so the scan knows how to read the camera correctly, and the pre-scan guidance step walks them through what to expect so they go in confident.

You can pre-fill any of these details, skip steps the user has already done, or run them all in sequence.

The scan

Body Scan

The user stands in front of their phone and the front camera records a short video. The component guides them through positioning, handles the recording and upload, and returns body measurements when the results are ready.

Face Scan

Works the same way as the body scan but uses the front camera. The user follows a few guided steps and the component handles the capture, upload, and processing. Results come back the same way.

How it flows

One sequence, start to finish

The five components run in order; Onboarding, Focal Length, Educational, Body Scan, Face Scan. Each step tells you when it's done and you decide what comes next. You stay in control of the navigation; the components handle everything inside each step.

Styling

Built for your brand

Every component accepts a config where you set your brand color, fonts, logo, and button styles. Define it once and pass it to all five components. Anything you don't set falls back to the built-in defaults.