interface AffixProps {
    children: ReactNode;
    className?: string;
    offsetBottom?: number;
    offsetTop?: number;
    onChange?: ((affixed?) => void);
    prefixCls?: string;
    rootClassName?: string;
    style?: CSSProperties;
    target?: (() => null | Window | HTMLElement);
}

Properties

children: ReactNode
className?: string
offsetBottom?: number

Triggered when the specified offset is reached from the bottom of the window

offsetTop?: number

Triggered when the specified offset is reached from the top of the window

onChange?: ((affixed?) => void)

Callback function triggered when fixed state changes

Type declaration

    • (affixed?): void
    • Callback function triggered when fixed state changes

      Parameters

      • Optional affixed: boolean

      Returns void

prefixCls?: string
rootClassName?: string
style?: CSSProperties
target?: (() => null | Window | HTMLElement)

Set the element that Affix needs to listen to its scroll event, the value is a function that returns the corresponding DOM element

Type declaration

    • (): null | Window | HTMLElement
    • Set the element that Affix needs to listen to its scroll event, the value is a function that returns the corresponding DOM element

      Returns null | Window | HTMLElement

Generated using TypeDoc