0.3.0 • Published 1 year ago

rspress-plugin-back-to-top v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

rspress-plugin-back-to-top NPM Version

Rspress plugin to add a back-to-top button when scrolling reaches a certain distance.

Usage

npm i rspress-plugin-back-to-top
pnpm add rspress-plugin-back-to-top
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import back2Top from 'rspress-plugin-back-to-top';

export default defineConfig({
  root: path.join(__dirname, 'docs'),
  plugins: [back2Top()],
});

Configure

threshold

Distance from the top of the page to show the back-to-top button.

  • Type: number
  • Default: 300
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import back2Top from 'rspress-plugin-back-to-top';

export default defineConfig({
  root: path.join(__dirname, 'docs'),
  plugins: [back2Top({
    threshold: 500,
  })],
});
0.3.0

1 year ago

0.2.0

1 year ago

0.1.2-beta.0

1 year ago

0.1.1

1 year ago

0.1.3

1 year ago

0.1.3-beta.0

1 year ago

0.1.0

1 year ago