> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: BounceAnimation Component

## Article: BounceAnimation Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/animations/bounce-animation-component.md

## Article Content:

# BounceAnimation

_Components/Animations_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/bounceanimation>

## Overview

```jsx
() => {
  const [active, setActive] = React.useState(false);
  return (
    <Layout>
      <Cell span={8}>
        <BounceAnimation onEnd={() => setActive(false)} active={active}>
          <FormField labelPlacement="left" label="Field label">
            <Input />
          </FormField>
        </BounceAnimation>
      </Cell>
      <Cell span={4}>
        <Button onClick={() => setActive(true)}>Play</Button>
      </Cell>
    </Layout>
  );
};
```

`<BounceAnimation/>` is a wrapper with a predefined bounce animation. It emphasizes UI elements with a bounce motion.

### Do

- Use it to emphasize an element that needs the user's attention.
- Play it once, and loop it only until users act on the element.

### Don't

- Don't animate several elements on the same screen at once.
- Don't use it only for decoration.

### Feature examples

#### "onEnd" example

The callback is executed when the transition ends. This allows triggering actions after component finished playing its animation.

```jsx
() => {
  const [active, setActive] = React.useState(false);
  const inputRef = React.useRef(null);
  return (
    <Layout>
      <Cell span={8}>
        <BounceAnimation
          onEnd={() => {
            inputRef.current.focus();
            setActive(false);
          }}
          active={active}
        >
          <FormField labelPlacement="left" label="Field label">
            <Tooltip content="I am here">
              <Input ref={inputRef} />
            </Tooltip>
          </FormField>
        </BounceAnimation>
      </Cell>
      <Cell span={4}>
        <Button onClick={() => setActive(true)}>Play</Button>
      </Cell>
    </Layout>
  );
};
```

#### Loop example

When \`loop\` prop is true, the child component bounces repetitively until stopped by other event.

```jsx
() => {
  const [active, setActive] = React.useState(false);

  return (
    <Layout>
      <Cell span={8}>
        <BounceAnimation loop active={active}>
          <FormField labelPlacement="left" label="Field label">
            <Input />
          </FormField>
        </BounceAnimation>
      </Cell>
      <Cell span={4}>
        <Button onClick={() => setActive(!active)}>
          {active ? 'Stop' : 'Play'}
        </Button>
      </Cell>
    </Layout>
  );
};
```

#### Delay example

The \`delay\` prop is used to set a delay before the animation execution.

```jsx
() => {
  const [active, setActive] = React.useState(false);

  return (
    <Layout>
      <Cell span={8}>
        <BounceAnimation
          onEnd={() => setActive(false)}
          delay="500ms"
          active={active}
        >
          <FormField label="With delay" labelPlacement="left">
            <Input />
          </FormField>
        </BounceAnimation>
      </Cell>
      <Cell span={4}>
        <Button onClick={() => setActive(true)}>Play</Button>
      </Cell>
    </Layout>
  );
};
```

#### Size example

The scale of the animation is set manually, according to the size of the object:

```jsx
() => {
  const [active1, setActive1] = React.useState(false);
  const [active2, setActive2] = React.useState(false);
  return (
    <Layout>
      <Cell>
        <Layout>
          <Cell span={5}>
            <BounceAnimation onEnd={() => setActive1(false)} active={active1}>
              <FormField labelPlacement="left" label="Small">
                <Input placeholder="I scale to 1.03" />
              </FormField>
            </BounceAnimation>
          </Cell>
          <Cell span={4}>
            <Button onClick={() => setActive1(true)}>Play</Button>
          </Cell>
        </Layout>
      </Cell>
      <Cell>
        <Layout>
          <Cell span={8}>
            <BounceAnimation onEnd={() => setActive2(false)} active={active2}>
              <FormField labelPlacement="left" label="Medium">
                <Input placeholder="I scale to 1.07" />
              </FormField>
            </BounceAnimation>
          </Cell>
          <Cell span={4}>
            <Button onClick={() => setActive2(true)}>Play</Button>
          </Cell>
        </Layout>
      </Cell>
    </Layout>
  );
};
```

## Code

```jsx
import { BounceAnimation } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `active` | `boolean` | — | Triggers the animation transition. |
| `children` *(required)* | `ReactNode` | — | The component which we would like to animate. |
| `dataHook` | `string` | — | Applied as data-hook HTML attribute that can be used in the tests. |
| `delay` | `string \| number` | — | Sets a delay before the animation starts. A number is treated as milliseconds, and a string is used as a CSS `animation-delay` value. |
| `loop` | `boolean` | — | Specifies whether the animation repeats continuously while `active` is `true`. |
| `onEnd` | `(event: AnimationEvent<HTMLDivElement>) => void` | — | A callback fired immediately after the animation ends. |
| `onStart` | `(event: AnimationEvent<HTMLDivElement>) => void` | — | A callback fired immediately after the animation starts. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { BounceAnimationUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { BounceAnimationTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { BounceAnimationTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { BounceAnimationTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.331.0** (2026-10-01) — maintenance release, no component-specific changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.322.0** (2026-09-09) — maintenance release, no component-specific changes
- **1.310.0** (2026-08-10) — maintenance release, no component-specific changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.267.0** (2026-04-09) — maintenance release, no component-specific changes
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.263.0** (2026-03-31) — maintenance release, no component-specific changes
- **1.260.1** (2026-03-23) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.102.0** (2024-04-16) — maintenance release, no component-specific changes
- **1.93.0** (2024-02-08) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes