Code Monkey home page Code Monkey logo

rn-animate-memo-viz's Introduction

React Native Hamburgur Button Animation

This project demonstrates how to create an animated hamburgur button component in React Native. The button animates into an X-shaped icon when clicked, providing a visually appealing user interaction.

Getting Started

To get started with the animation, follow these steps:

  1. Install dependencies:

    yarn install
  2. Run the project:

    yarn start

Component Description

"component located in src/components/BurgurButton"

The BurgurButton component is composed of three horizontal lines, resembling a hamburger menu icon. When clicked, these lines animate into an X-shaped icon using React Native's Animated API.

The animation is achieved by interpolating between two states: the initial state (hamburger icon) and the final state (X-shaped icon). This interpolation is done using the interpolate method of the Animated API, mapping input ranges to output ranges for various animated properties.

The component utilizes React's state management (useState hook) to toggle between the two states when the button is clicked. The Animated.timing and Animated.spring methods are used to animate the position and rotation of the lines, creating a smooth and visually appealing transition.

Credits

https://medium.com/cheesecake-labs/first-steps-with-react-native-animations-1bfdb10d3770

rn-animate-memo-viz's People

Contributors

sorrawichyooboon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.