UNPKG

taos

Version:

TAOS - Tailwind CSS Animation on Scroll Library

17 lines (13 loc) 357 B
import React from "react"; import useTaos from "./useTaos"; const TAOS = ({ as = "span", children, offset = 0, ...props }) => { const As = as; const ref = useTaos({ className: props.className, offset }); return ( <As ref={ref} {...props} data-taos-offset={offset}> {children} </As> ); }; TAOS.displayName = "TAOS"; export { TAOS };