
<FormatHero
  title="Web stories written in Markdown."
  format="webstory"
  description="Full-screen 9:16 cards, played with a tap or a swipe."
  actions={[
    { label: "Play a story", href: "/play/launch" },
    { label: "See the gallery", href: "/gallery" },
  ]}
>
  <FormatVignette format="webstory" />
</FormatHero>

**Récit webstory** turns a Markdown file into a web story: full-screen cards in 9:16, one idea per
card, read one tap at a time. A card has a background (a color, the theme, an image or a muted
video), its text, a call to action if you want, or a motion block. The story below comes from
[`examples/webstory-launch`](https://github.com/vguerand/recit/tree/main/examples/webstory-launch);
tap its right half, swipe or press the arrow keys. It is also full screen under
[Play](/webstory/launch), and [in French](/fr/webstory/launch).

<StoryEmbed slug="webstory/launch" format="webstory" />

<details>
<summary>The Markdown source of this story</summary>

<SourceFile deck="webstory/launch" title="examples/webstory-launch/launch.md" />

</details>

<PageSection tone="surface" label="The webstory format">

## The webstory format

<FeatureGrid cols={3}>
  <FeatureCard title="One card per scene" description="Each scene is a 9:16 card: its text, a background and a call to action, never more than one idea." site="docs" href="/formats/webstory/overview" />
  <FeatureCard title="Tap, swipe, keys" description="Tap a half to go back or on, swipe, use the arrows; the pause button is always there." href="/webstory/launch" />
  <FeatureCard title="Motion blocks" description="A card with `type=stat`, `title` or `list` is played by the blocks of motion, the same as in a film." site="docs" href="/formats/webstory/overview" />
  <FeatureCard title="One image per card" description="`recit export --to images` writes a 1080×1920 PNG per card, listed in exports.json." href="/webstory/exports" />
  <FeatureCard title="A vertical film" description="`recit render` plays the same file as a 9:16 film: the story and the film share one source." href="/webstory/exports" />
  <FeatureCard title="Typed JSON twin" description="Every story has a typed JSON form, checked by the schema and convertible both ways." site="docs" href="/formats/webstory/overview" />
</FeatureGrid>

</PageSection>

<PageSection tone="tint" label="Start a story">

## Start a story

<TutorialSteps>
  <TutorialStep title="Create a story" duration="10 s">
    `recit init --format webstory` writes a story of Lorem cards.

    ```bash
    npx recit init launch.md --format webstory
    ```

  </TutorialStep>
  <TutorialStep title="Play it with live reload" duration="1 min">
    `recit dev` serves the player and reloads it when the story or a background changes. The
    **Safe area** button (or the key G) shades what a social app covers with its own buttons, for
    the preset picked beside it (`instagram-story`, `tiktok`…); the exported pictures stay clean.

    ```bash
    npx recit dev launch.md
    ```

  </TutorialStep>
  <TutorialStep title="Check and build" duration="30 s">
    `recit validate` checks the cards (density, budget, backgrounds); `recit build` writes the
    player as static files.

    ```bash
    npx recit validate launch.md && npx recit build launch.md
    ```

  </TutorialStep>
</TutorialSteps>

The full syntax is specified on [docs.recit.dev](https://docs.recit.dev/formats/webstory/overview).

</PageSection>
