Skip to content

Instantly share code, notes, and snippets.

View DigitalZebra's full-sized avatar
🦓

Drew DigitalZebra

🦓
View GitHub Profile
@DigitalZebra
DigitalZebra / TextInputAnimations.tsx
Last active January 22, 2024 02:59
Using react-native-reanimated to animate TextInput
import React, { useRef, useState } from "react";
import { StyleSheet, TextInput, View } from "react-native";
import Animated, {
Easing,
useAnimatedStyle,
withTiming,
} from "react-native-reanimated";
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
@DigitalZebra
DigitalZebra / CustomTamaguiComponent.tsx
Created February 3, 2023 02:33
Custom Tamagui component w/ required props
import React, {forwardRef} from 'react';
import {GetProps, Stack, styled, Text} from '@tamagui/core';
import {View} from 'react-native';
export const StyledFrame = styled(Stack, {
padding: 20,
backgroundColor: '$green7Dark',
});
type RequiredProps = {
@DigitalZebra
DigitalZebra / AccordionExample.tsx
Last active December 6, 2021 02:41
A simple accordion example built with Reanimated 2 Layout Animations
import React, {ReactNode, useState} from 'react'
import {Pressable, StyleSheet, Text, View} from 'react-native'
import {ScrollView} from 'react-native-gesture-handler'
import Animated, {
Easing,
FadeIn,
FadeOut,
Layout,
} from 'react-native-reanimated'