Skip to content
Native Animation
ButtonClipboardMicroFeedback

Copy Confirm Button

A dimensional copy action that rotates into a check, flashes a success halo, and raises a polished confirmation bubble.

Free
Get it free with your email

No password and no card: we email you a sign-in link, then the full source is yours.

Add to your project

Copy the component and its assets into your app with the Native Animation CLI.

npx nativeanimation add copy-confirm-button

About this animation

A dimensional copy action that rotates into a check, flashes a success halo, and raises a polished confirmation bubble.

How it works

  1. The button calls the supplied onCopy callback and never imports a clipboard API.
  2. One shared transition crossfades the two View-built icons while rotating and briefly compressing them.
  3. Success triggers a short halo and specular sweep while a second shared value raises and fades the confirmation bubble.
  4. A close-tone gradient, light edge, and layered shadow create the surface depth in either color scheme.
  5. Uncontrolled feedback resets with a cleaned-up timer; controlled consumers decide when to reset.

Install

npx expo install expo-linear-gradient react-native-reanimated

Usage

<CopyConfirmButton onCopy={() => copyText(value)} />

<CopyConfirmButton
  size={48}
  backgroundColor="#23232A"
  colorScheme="dark"
  iconColor="#F1F1F4"
  successColor="#53D894"
  resetMs={2000}
  onCopy={copyText}
/>

Props

PropTypeDefaultDescription
copiedboolean—Controlled feedback state.
defaultCopiedbooleanfalseInitial uncontrolled state.
onCopy() => voidRequiredPerforms the product's copy operation.
onChange(copied: boolean) => void—Receives feedback state changes.
resetMsnumber1600Feedback duration.
sizenumber40Square button size.
backgroundColorstringScheme-awareButton color.
surfaceEndColorstringScheme-awareBottom material color.
iconColorstring'#3D3D46'Copy icon and bubble color.
successColorstring'#169B62'Check color.
copiedLabelstring'Copied'Bubble text.
fontFamilystringSystem fontBubble font.
colorScheme'light' | 'dark' | 'auto''auto'Surface color treatment.
accessibilityLabelstring'Copy'Screen-reader label.
styleStyleProp<ViewStyle>—Button style.
testIDstring—Test identifier.

Compatibility

Expo SDK 57, React Native 0.86, and Reanimated 4.5. iOS and Android are supported but device-unverified; web is verified by the project gate. Works in Expo Go.

Accessibility

The component exposes a labeled button and selected feedback state. Reduced Motion crossfades the icons and shows the bubble in place without rotation or travel.

Source code

Free with an account

Sign in with your email to read the full source here, or install it in one command with the CLI.

Get it free