# Morphing Button Group — React Native component for Expo

> Buttons that split, join and stretch between sets — with a signature sheet built on it.

A row of buttons that morphs between sets: one button splits into two, two join into one, and a button that changes its label cross-fades it while it stretches. Ships with SignatureSheet, the pattern it was made for — a "Sign" pill that grows into a signing card whose Cancel splits into Reset + Confirm once you draw, and Confirm stretches into "Confirm Signature" before the card glides back down.

- Docs: https://expokit.in/docs/components/morphing-button-group
- Tier: Pro (ExpoKit Pro plan)
- Also called: signature pad, signature capture, animated button group, expanding buttons, morphing toolbar
- Category: Buttons
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg, expo-haptics
- Uses ExpoKit items: kit
- Variants: Signature, Follow Row

## Installation

This component is part of ExpoKit Pro. With a Pro plan, log the CLI in once and add it like any other item:

```bash
npx @expokit/cli@latest login
```

Plans: https://expokit.in/pricing

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `buttons` | `{ key, label, icon?, variant?, onPress? }[]` | — | MorphingButtonGroup: the buttons to show now; changing it morphs the row. |
| `height` | `number` | `44` | Button height. |
| `gap` | `number` | `10` | Space between buttons. |
| `duration` | `number` | `380` | Morph length in ms. |
| `SignatureSheet label` | `string` | `'Sign'` | The pill's text. |
| `SignatureSheet title` | `string` | `'Add Signature'` | Card title. |
| `SignatureSheet onConfirm` | `({ paths, width, height }) => void` | — | The finished signature. |
| `SignatureSheet onCancel` | `() => void` | — | Closed without signing. |
| `SignatureSheet cardHeight` | `number` | `340` | Height of the open card. |
| `style` | `StyleProp<ViewStyle>` | — | Root style. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Morph**: Buttons with the same key keep their place and resize; new ones grow in from nothing and leaving ones shrink away, on one smooth ease (no bounce).
- **Labels**: A label change cross-fades while the button resizes.
- **Signature**: The pad draws smoothed strokes; undo removes the last one, Reset clears, Confirm asks once more. onConfirm gets SVG path data and the pad size.
- **Haptics**: A tick on each button, a light tap opening the sheet, success on confirm.
- **Reduced motion**: Morphs are instant.

## FAQ

### How do I make a signature pad in React Native?

Use ExpoKit's Morphing Button Group, a Pro component: with ExpoKit Pro, the ExpoKit CLI copies a ready-made signature pad into your Expo or React Native app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Morphing Button Group work in Expo Go?

Yes. Morphing Button Group runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg, expo-haptics) are all included in Expo Go.

### How do I add Morphing Button Group to my Expo app?

With ExpoKit Pro, add it with the ExpoKit CLI: it copies the component's source into your app and installs react-native-svg, expo-haptics, so the code is yours to change. The install command is on this page for Pro members.

### Is Morphing Button Group free?

Morphing Button Group is part of ExpoKit Pro. With a Pro plan, log the CLI in once and it installs the full source into your app.

### Can I change how Morphing Button Group looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/morphing-button-group
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
