---
title: "Animated Maximize Icon"
description: "Four corners for a full screen button. They fold in while the view is maximized, and lean out on hover."
url: https://gelatinui.com/components/animated-maximize-icon
markdown_url: https://gelatinui.com/components/animated-maximize-icon.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/animated-maximize-icon"
version: "2026-11-13"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Animated Maximize Icon

> Four corners for a full screen button. They fold in while the view is maximized, and lean out on hover.

Page: https://gelatinui.com/components/animated-maximize-icon

## When to use it

Best for: A full screen button: four corners fold in while the view is maximized.

- Set `maximized` from your state.
- Use it in a Button that enters and leaves full screen.

## When not to use it

- For a settings button, use an [Animated Settings Icon](https://gelatinui.com/components/animated-settings-icon.md).

## Notes for agents

- `variant` (`stroke`, `solid`, `duotone`, `twotone`, `bulk`) and `corners` (`round`, `sharp`) pick the style. Use one style for every icon of a product.
- A change of `maximized` mid-fold goes on from where the points are.
- It plays once per hover or keyboard focus of the control around it.
- `trigger="none"` with `play` plays it only from code.

## Anatomy

```text
AnimatedMaximizeIcon
```

## API reference

### AnimatedMaximizeIcon

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"bulk" \| "duotone" \| "solid" \| "stroke" \| "twotone"` |  | `stroke` (default): 1.5 strokes. `solid`: the body filled, inner details cut through. `duotone`: a 40% fill under the stroke. `twotone`: the details at 40%. `bulk`: the body filled at 40% with no outline, the details at full color. |
| `corners` | `"round" \| "sharp"` |  | `round` (default): round caps and joins, soft corners. `sharp`: square caps, miter joins. |
| `trigger` | `"hover" \| "none"` |  | `hover` (default) plays once per hover or keyboard focus of the control around the icon. |
| `play` | `number` |  | Plays once each time this number changes (a new notice, a saved form). |
| `maximized` | `boolean` | false | Maximized: the corners fold in (the action is "exit full screen"). Default: they point out. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| AnimatedMaximizeIcon | `animated-maximize-icon` |  |  |  |

## Usage

Set `maximized` from your state.

The sample also uses `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/animated-maximize-icon @gelatin-ui/button
```

```tsx title="full-screen-button.tsx"
import { useState } from "react";

import { AnimatedMaximizeIcon } from "@/components/pro/icons/animated-maximize-icon";
import { Button } from "@/components/ui/button";

export function FullScreenButton() {
  const [maximized, setMaximized] = useState(false);
  return (
    <Button
      variant="outline"
      size="icon"
      aria-label={maximized ? "Leave full screen" : "Full screen"}
      onClick={() => {
        setMaximized(!maximized);
      }}
    >
      <AnimatedMaximizeIcon maximized={maximized} />
    </Button>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/animated-maximize-icon
```

It adds 14 registry items: 13 files, 2472 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Animated Play Pause Icon](https://gelatinui.com/components/animated-play-pause-icon.md)
- [Animated Settings Icon](https://gelatinui.com/components/animated-settings-icon.md)
- [Button](https://gelatinui.com/components/button.md)
- [Card](https://gelatinui.com/components/card.md)

## Accessibility

It is a picture, so the Button needs text or an `aria-label`.

Keyboard focus plays it too.
