프리뷰 또는 이전 버전의 문서를 보고 있습니다.seed-design.io 방문
우리는 왜 디자인 엔지니어를 찾게 됐을까
Skip to Content
React

Pull To Refresh

사용자가 화면을 아래로 당겨 콘텐츠를 새로고침할 수 있게 해주는 컴포넌트입니다. 모바일 환경에서 최신 콘텐츠를 불러올 때 사용됩니다.

사용 가능 버전@seed-design/[email protected], @seed-design/[email protected]
Loading...

Installation

npx @seed-design/cli@latest add ui:pull-to-refresh

Props

PullToRefreshRoot

Prop

Type

asChild?boolean | undefined

Whether the element should be rendered as a child of a slot.

Default

false

threshold?number | undefined

The threshold value to trigger the refresh. (px)

Default

88

displacementMultiplier?number | undefined

The multiplier to calculate displacement from the touch movement.

Default

0.75

onPtrPullStart?((ctx: PullToRefreshContext) => void) | undefined

Callback when the pull-to-refresh has started to pull.

onPtrPullMove?((ctx: PullToRefreshContext) => void) | undefined

Callback when the pull-to-refresh is moving during the pull.

onPtrPullEnd?((ctx: PullToRefreshContext) => void) | undefined

Callback when the pull-to-refresh is released. It does not matter if it is ready or not. If you want to handle the refresh, use onPtrRefresh.

The context depends on how the pull ended. Releasing the pointer reports the final coordinates, while a pull aborted by touchcancel/pointercancel or by disabled flipping on reports the already reset context (y: -1, displacement: 0), so an interrupted pull never surfaces a stale displacement.

onPtrReady?(() => void) | undefined

Callback when the pull-to-refresh is pulled over the threshold.

onPtrRefresh?(() => Promise<void>) | undefined

Callback when the pull-to-refresh is released after ready.

disabled?boolean | undefined

Whether to disable the pull-to-refresh.

Default

false

PullToRefreshIndicator

Prop

Type

PullToRefreshContent

Prop

Type

asChild?boolean | undefined

Whether the element should be rendered as a child of a slot.

Default

false

Examples

PTR in Tabs

Loading...

Disabled

disabled 속성을 사용하여 PTR를 비활성화할 수 있습니다.

Disabled

Prevent Pull

PullToRefresh.preventPull 속성을 사용하여 특정 영역에서 PTR 동작을 방지할 수 있습니다. user-select: auto;등을 통해 텍스트 선택이 가능한 영역에서 주로 사용됩니다.

Loading...

Last updated on 2026. 8. 2.