Scroll Down 👇
1
2
3
4
5
6
7
8
9
10
Bottom Content ✨


npm install tango-horizon-cwimport { Horizon } from "tango-horizon-cw";
import "tango-horizon-cw/style.css";
const HorizonDemo = () => {
return (
<div style={{ width: "40vw", height: "25vh", overflow: "auto", position: "relative" }}>
<Horizon
boxCount={10}
boxWidth={200}
boxHeight={120}
topHeight={300}
bottomHeight={300}
middleHeight="25vh"
topContent={<div style={{ textAlign: "center", paddingTop: "50px" }}>Scroll Down</div>}
bottomContent={<div style={{ textAlign: "center", paddingTop: "50px" }}>End</div>}
/>
</div>
);
};import { Horizon } from "tango-horizon-cw";
import type { HorizonProps } from "tango-horizon-cw";
const horizonConfig: HorizonProps = {
boxCount: 15,
boxWidth: 250,
damping: 0.15,
topContent: <div>Top Area</div>,
};
const MyComponent = () => {
return <Horizon {...horizonConfig} />;
};Prop | Type | Accepted Values | Description | Default |
|---|---|---|---|---|
className | string | - | Additional class name for the wrapper | - |
topContent | ReactNode | - | Content for the top section | 'TOP TITLE AREA' |
bottomContent | ReactNode | - | Content for the bottom section | 'BOTTOM TITLE AREA' |
topHeight | number | string | - | Height of the top section | 1500 |
bottomHeight | number | string | - | Height of the bottom section | 1000 |
middleHeight | number | string | - | Height of the middle section | '100%' |
boxCount | number | - | Number of horizontal cards | 20 |
boxWidth | number | - | Width of each card (px) | 300 |
boxHeight | number | - | Height of each card (px) | 300 |
boxGap | number | - | Gap between cards (px) | 24 |
trackPaddingX | number | - | Horizontal padding of the track (px) | 64 |
boxBorderRadius | number | - | Border radius of each card (px) | 16 |
damping | number | 0~1 | Scroll damping coefficient | 0.12 |
stopThreshold | number | - | Stop threshold for damping animation | 0.1 |
wheelIdleDelay | number | - | Wheel idle delay (ms) | 120 |