@feather-scroll/react
v0.1.1
Published
React component for FeatherScroll.
Readme
@feather-scroll/react
Official React wrapper for FeatherScroll — a thin, SSR-safe component around the zero-dependency core.
Install
npm i @feather-scroll/react @feather-scroll/core @feather-scroll/effectsUsage
import { useRef } from 'react';
import { FeatherScroll } from '@feather-scroll/react';
import { coverflow } from '@feather-scroll/effects';
import type { CarouselApi } from '@feather-scroll/core';
import '@feather-scroll/core/styles/core.css';
function Gallery() {
const ref = useRef<CarouselApi>(null);
return (
<FeatherScroll ref={ref} effect={coverflow} loop nav dots onChange={(i) => console.log(i)}>
<div>1</div>
<div>2</div>
<div>3</div>
</FeatherScroll>
);
}All core options are accepted as props; the imperative API is exposed via ref.
