import { useState } from 'react'
import { Fade } from 'tranzit'
export function MyComponent() {
const [isVisibile, setIsVisible] = useState(false)
return (
<>
<button onClick={() => setShow((prev) => !prev)}>Toggle</button>
<Fade when={show}>
<div style={{ width: 100, height: 100, background: 'purple' }} />
</Fade>
</>
)
}
// Made by @smastrom - https://github.com/smastrom