/** * @fileoverview Floating scroll-to-top button with theme-aware styling. * Appears after the user scrolls past a configurable offset. Supports both * window-level and custom container scrolling. * * Integrates with SaasflareProvider: * - `animated` → gates Motion transitions and scroll-to-top behavior * - `surface` → swaps between flat (solid primary) and glass (backdrop-blur) * * @module packages/ui/components/composed/scroll-to-top-button * @package ui * * @component * @example * * * @example * // With a custom scroll container * * * @example * // Per-instance surface override (ignores provider value) * */ import { JSX } from 'react'; import * as React from 'react'; import { type SaasflareComponentProps } from '../../providers'; /** Motion event overrides that conflict with React HTML events */ type MotionConflicts = "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart" | "onAnimationEnd"; /** * Props for the ScrollToTopButton component. * * @interface * @package ui */ export interface ScrollToTopButtonProps extends Omit, MotionConflicts | keyof SaasflareComponentProps>, SaasflareComponentProps { /** * Optional scroll container element ID. * If not provided, falls back to the global `window`. */ scrollContainerId?: string; /** * Vertical scroll offset (in pixels) after which the button is shown. * @default 300 */ scrollOffset?: number; /** Additional class names merged onto the root button. */ className?: string; } /** * A floating button that appears after scrolling down and smoothly scrolls * the user back to the top of the container (or window). * * @component */ export declare function ScrollToTopButton({ scrollContainerId, scrollOffset, className, surface, radius, animated, iconWeight, onClick, ...props }: ScrollToTopButtonProps): JSX.Element; export {};