SolidJS bindings for FormKit's AutoAnimate
npm install solid-auto-animate> SolidJS bindings for FormKit's AutoAnimate
 
``bash`
npm install --save solid-js @formkit/auto-animate solid-auto-animate
`bash`
yarn add solid-js @formkit/auto-animate solid-auto-animate
`bash`
pnpm add solid-js @formkit/auto-animate solid-auto-animate
`js
import { createSignal } from 'solid-js';
import { autoAnimate } from 'solid-auto-animate';
function App() {
// Required to prevent TS from removing the directive
autoAnimate;
const [items, setItems] = createSignal([0, 1, 2]);
const add = () => setItems((current) => [...current, current.length]);
return (
<>
$3
`js
import { createSignal } from 'solid-js';
import { useAutoAnimate } from 'solid-auto-animate';function App() {
const [items, setItems] = createSignal([0, 1, 2]);
const add = () => setItems((current) => [...current, current.length])
let parent;
useAutoAnimate(() => parent, / optional config /)
return (
<>
{(item) => - {item}
}
>
);
}
``MIT © lxsmnsyc