# Icon Swap Button

> A gradient pill button where the text label slides up and a download icon slides in from below on hover — driven entirely by GPU-composited `translateY` transitions with no layout recalculation.

- Category: Button
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Aperture
- Dark mode: yes
- Access: free (sign in to copy the code)
- Tags: gradient, pill, animation
- Page: https://builder.atheros.ai/components/icon-swap
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_icon_swap/preview-5708c072e932.webp

## Features

- Gradient pill button using design-system primary color blended with a complementary hue (a sky-azure gradient: azure blended with deepskyblue)
- Text slides up (`translateY(-100%)`) and icon slides in from below (`translateY(0)`) on hover
- Pure CSS hover — no JS required for the swap effect
- Single "Download" button with a Tabler download icon
- Subtle lift on hover via `translateY(-1px)`
- Active scale feedback (`scale(0.96)`)
- Prefers-reduced-motion support
- Accessible: `aria-label` on the button, keyboard activation

## Accessibility

- **Button label** — `aria-label="Download"` on `.bis-btn`
- **Icon decorative** — `aria-hidden="true"` on `.bis-btn__icon` wrapper
- **Theme toggle role** — `role="switch"` with `aria-checked` toggled by JS
- **Theme toggle keyboard** — Responds to `Enter` and `Space` keys
- **Focus indicators** — `:focus-visible` with `--ring` outline on all interactive elements
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations via `transition-duration: 0.01ms`

## Keyboard shortcuts

- `Tab` — Move focus between the button and theme toggle
- `Enter / Space` — Activate focused button or toggle theme

## Common questions

**Which frameworks is Icon Swap Button available in?**

Icon Swap Button ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is Icon Swap Button free?**

Yes. Icon Swap Button is a free component: preview it without an account, and sign in with a free Atheros account to copy or download the full source and customise it with AI.

**Does Icon Swap Button support dark mode?**

Yes. Icon Swap Button ships light and dark themes, both drawn from the Aperture design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Icon Swap Button live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/icon-swap

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
