Back to Element Plus

Backtop

docs/en-US/component/backtop.md

2.13.71.3 KB
Original Source

Backtop

A button to back to top.

Basic Usage

Scroll down to see the bottom-right button.

:::demo

backtop/basic

:::

Customizations

Display area is 40px * 40px.

:::demo

backtop/custom

:::

API

Attributes

NameDescriptionTypeDefault
targetthe target to trigger scroll.^[string]
visibility-heightthe button will not show until the scroll height reaches this value.^[number]200
rightright distance.^[number]40
bottombottom distance.^[number]40

Events

NameDescriptionParameters
clicktriggers when click.^[Function](evt: MouseEvent) => void

Slots

NameDescription
defaultcustomize default content.