<Animated.View
initial={{ scale: 0.5 }}
animate={{ scale: 1 }}
transition={{ type: 'timing', duration: 500 }}
/>
transitionProperty: {
width: "width",
height: "height",
radius: "borderRadius",
},
keyframes: {
appear: {
'0%': { opacity:'0%' },
'100%': { opacity: '100%' },
}
},
animation: {
appear: 'appear 1s ease-in-out',
}
<Box
className={
'flex flex-row' + isAnimated
? 'w-[200px]'
: 'w-[450px]' + 'transition-width duration-300 ease-in-out'
}
>
{isAnimated ? <Text>Create</Text> : <Text>Guilds</Text>}
</Box>
<Pressable onPress={() => setIsAnimated(!isAnimated)}>
<Box className={isAnimated ? 'rotate-45' : 'rotate-0'}>
<Icon as={PlusIcon} />
</Box>
</Pressable>
<Box
className={
isAnimated
? 'w-[180px] opacity-100'
: 'w-[0px] opacity-0' + 'transition-opacity duration-300'
}
>
<Text>Guilds</Text>
</Box>