Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import { Box, BoxProps, forwardRef, keyframes } from "@chakra-ui/react";
const animation = keyframes`
0% {
background-position:0% 50%;
}
50% {
background-position:100% 50%;
}
100% {
background-position:0% 50%;
}
`;
export const GradientContainer = forwardRef<BoxProps, "div">((props, ref) => (
<Box
animation={`${animation} 10s linear infinite`}
bgGradient="linear(to-bl, brand.900, brand.500)"
bgSize="200% 200%"
ref={ref}
{...props}
/>
));
|