> ## Documentation Index
> Fetch the complete documentation index at: https://starrycodes.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Widget - Shake Animation

> Add continuous scaling and click-response bounce effects to your widgets effortlessly to draw user attention.

{/*     title="⚡ Quick Usage" */}

{/* > */}

{/* // Shake to signal invalid input */}

{/* ``` */}

<Steps titleSize="h3">
  <Step title="💥 Shake Effect">
    <ResponseField name="shake" type="Widget">
      <Expandable title="Parameters">
        <ParamField body="delay" type="int" default="0">
          The `duration` to wait before starting the animation (in `milliseconds`).
        </ParamField>

        <ParamField body="duration" type="int" default="500">
          The length of the entire shake sequence (in `milliseconds`).
        </ParamField>

        <ParamField body="repeat" type="bool" default="false">
          If `true`, the animation loops indefinitely.
        </ParamField>

        <ParamField body="reverse" type="bool" default="false">
          If `true`, reverses direction when repeating.
        </ParamField>

        <ParamField body="autoPlay" type="bool" default="true">
          If `true`, the animation starts automatically.
        </ParamField>

        <ParamField body="curve" type="Curve?" default="null">
          The `curve` to use for the animation speed (uses the built-in shake `curve`).
        </ParamField>

        <ParamField body="onInit" type="void Function(AnimationController)?" default="null">
          A callback fired when the `AnimationController` is initialized.
        </ParamField>
      </Expandable>

      Applies a horizontal shaking animation to the widget. The shake effect is built-in to the `flutter_animate` package used under the hood.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      // Shakes for 500ms
      Container(color: Colors.red).shake();
      ```
    </ResponseField>
  </Step>
</Steps>
