Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.5

InfiniteScrollArea

InfiniteScrollArea is a component that provides infinite scrolling functionality. This component offers a smooth scrolling experience by automatically loading and displaying the next dataset when the end of the component is reached.

Source@yamada-ui/infinite-scroll-area

Props

InfiniteScrollAreaProps

behavior

Description

Determines whether scrolling is instant or animates smoothly.

Type

ScrollBehavior

colorScheme

Description

The visual color appearance of the component.

Type

"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"

finish

Description

The infinite scroll area finish to use.

Type

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

indexRef

Description

Ref to a reset index function.

Type

RefObject<(index: number) => void>

initialLoad

Description

If true, invoke onLoad function for the first time.

Type

boolean

Default

false

isDisabled

Description

If true, the infinite scroll is disabled.

Type

boolean

Default

false

isReverse

Description

If true, reverse direction.

Type

boolean

Default

false

loading

Description

The infinite scroll area loading to use.

Type

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

onLoad

Description

The callback invoked when trigger is intersect.

Type

({ entry, finish, index, }: { finish: () => void index: number entry?: IntersectionObserverEntry | undefined }) => void | Promise<void>

orientation

Description

The orientation of the infinite scroll.

Type

"horizontal" | "vertical"

Default

'vertical'

resetRef

Description

Ref to a reset function.

Type

RefObject<(index?: number | undefined, runScroll?: boolean | undefined) => void>

rootMargin

Description

Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left).

Type

string

rootRef

Description

The element that is used as the viewport for checking visibility of the target. Defaults to the browser viewport if not specified or if null.

Type

RefObject<HTMLElement>

size

Description

The size of the InfiniteScrollArea.

Type

string

startIndex

Description

If set the onLoad function will start from the given index. If initialLoad is true, index starts from 0.

Type

number

Default

1

threshold

Description

Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.

Type

number | number[]

triggerProps

Description

Props for infinite scroll area trigger component.

Type

HTMLUIProps

variant

Description

The variant of the InfiniteScrollArea.

Type

string

Edit this page on GitHub

PreviousScrollAreaNextColorSwatch