Custom Code Blocks

Add the following Embed to your page
Recommended : If you want to switch themes to light or dark, copy the block-style.css & block-style.scss from designer
(Also change the theme of the code block from code block's settings)
Light Mode / Center
Light Mode / No Heading
Light Mode / Next.js Style
Light Mode / Neon Pop
1async function getItem() {
2  // The `fetch` function is automatically memoized and the result
3  // is cached
4  const res = await fetch('https://.../item/1')
5  return res.json()
6}
7 
8// This function is called twice, but only executed the first time
9const item = await getItem() // cache MISS
10 
11// The second call could be anywhere in your route
12const item = await getItem() // cache HIT
Language
Dark Mode / Center
Dark Mode / No Heading
Dark Mode / Next.js Style
Dark Mode / Neon Pop
1gsap.to('.box', {
2    y: 100,
3    stagger: {
4        // wrap advanced options in an object
5        each: 0.1,
6        from: 'center',
7        grid: 'auto',
8        ease: 'power2.inOut',
9        repeat: -1 // Repeats immediately, not waiting for the other staggered animations to finish
10    }
11});
Language