Skip to content

Instantly share code, notes, and snippets.

View tanner-west's full-sized avatar

Tanner West tanner-west

View GitHub Profile
const animatedStyle = useAnimatedStyle(() => {
const input = scrollOffset.value / slideWidth;
const inputRange = [index - 1, index, index + 1];
return {
transform: [
{
scale: interpolate(
input,
inputRange,
const animatedStyle = useAnimatedStyle(() => {
const input = scrollOffset.value / slideWidth;
const inputRange = [index - 1, index, index + 1];
const animatedColor = interpolateColor(input, inputRange, [
gray,
textColor,
gray,
]);
return {
import React, {useState, useEffect} from 'react';
import {
SafeAreaView,
Image,
ScrollView,
StatusBar,
ActivityIndicator,
} from 'react-native';
import {MotiView} from 'moti';
import React, {useEffect, useState} from 'react';
import {
View,
SafeAreaView,
Text,
StyleSheet,
ScrollView,
ActivityIndicator,
StatusBar,
} from 'react-native';
import React, {useState, useEffect} from 'react';
import {
View,
SafeAreaView,
Text,
StyleSheet,
ImageBackground,
StatusBar,
ActivityIndicator,
} from 'react-native';
<Circle
cx="50"
cy="50"
r="45"
stroke="rgb(246, 79, 89)"
strokeWidth="5"
fill="rgba(255,255,255,0.2)"
strokeDasharray="10"
/>
<Circle
cx="50"
cy="50"
r="45"
stroke="rgb(246, 79, 89)"
strokeWidth="5"
fill="rgba(255,255,255,0.2)"
strokeDasharray="10 20"
/>
<Circle
cx="50"
cy="50"
r="45"
stroke="rgb(246, 79, 89)"
strokeWidth="5"
fill="rgba(255,255,255,0.2)"
strokeDasharray="10 20"
strokeDashoffset="10"
/>
<Circle
cx="50"
cy="50"
r="45"
stroke="rgb(246, 79, 89)"
strokeWidth="5"
fill="rgba(255,255,255,0.2)"
strokeDasharray={`${radius * PI * 2}`}
/>
<Circle
cx="50"
cy="50"
r="45"
stroke="rgb(246, 79, 89)"
strokeWidth="5"
fill="rgba(255,255,255,0.2)"
strokeDasharray={`${radius * PI * 2}`}
strokeDashoffset={`${radius * PI * 2}`}
/>