Skip to content

xiaomingTang/ease-scroll

Repository files navigation

ease-scroll

便捷地构建类似 miui 官网 的页面滚动动画

live demo

install

$ yarn add xm-ease-scroll

usage

import { EaseScroll, EasePageOptions, useSize } from "xm-ease-scroll"

const pages: EasePageOptions = [
  {
    colspan: 1,
    elem(options) {
      return <WhatEverYouWant />
    },
  }
]

export default function App() {
  const size = useSize()

  return <EaseScroll
    pageSize={size}
    pages={pages}
  />
}