# Fragment Reveal (/docs/components/fragment-reveal)

Steps through children one by one using fragment animations.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<ComponentPreview name="fragment-reveal-demo" />

### Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @slidecn/fragment-reveal
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install @revealjs/react
      ```

      <Step>
        Copy the component source into your project.
      </Step>

      <ComponentSource src="registry/slidecn/ui/fragment-reveal.tsx" title="components/slidecn/fragment-reveal.tsx" />

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Usage [#usage]

```tsx
import FragmentReveal from "@/components/slides/fragment-reveal";

function MyPresentation() {
  return (
    <Deck>
      <FragmentReveal animation="fade-in" stagger>
        <p>Revealed first</p>
        <p>Revealed second</p>
        <p>Revealed third</p>
      </FragmentReveal>
    </Deck>
  );
}
```

## API Reference [#api-reference]

### FragmentReveal [#fragmentreveal]

| Prop        | Type                | Default     | Description        |
| ----------- | ------------------- | ----------- | ------------------ |
| `children`  | `ReactNode[]`       | required    | Elements to reveal |
| `animation` | `FragmentAnimation` | `"fade-in"` | Fragment animation |
| `stagger`   | `boolean`           | `false`     | Stagger indices    |
