import React$1 from 'react'; interface GlassButtonProps extends React$1.ButtonHTMLAttributes { /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; /** Any CSS colour. Colours the label (`tinted`) or the fill (`filled`). Default accent blue. */ tint?: string; /** Light bloom under the finger while pressed. Default true. */ shimmer?: boolean; /** Rim bevel scale (1–4). Wider bevels bend more of the backdrop. Default 1. */ thickness?: number; /** Height preset: 36 / 44 / 52 px. Default 'md'. */ size?: 'sm' | 'md' | 'lg'; /** * `glass` (alias `default`) regular glass · `clear` (alias `ghost`) see-through * glass · `tinted` glass with a coloured label · `tinted-filled` a soft wash * of the colour with a label in that colour · `filled` solid colour. * Combine with `tint` for any colour, or `destructive` for red. */ variant?: 'glass' | 'default' | 'clear' | 'ghost' | 'tinted' | 'tinted-filled' | 'filled' | 'destructive'; /** Marks a delete / irreversible action: red label, or red fill with `filled`. */ destructive?: boolean; /** Leading icon. With no children the button becomes a circle. */ icon?: React$1.ReactNode; /** * Renders a real link (``) instead of a button, so it opens in a new tab * with cmd/ctrl-click and shows its URL on hover. Use with `target`/`rel`. */ href?: string; target?: string; rel?: string; children?: React$1.ReactNode; } declare const GlassButton: React$1.ForwardRefExoticComponent>; interface GlassCardProps extends React$1.HTMLAttributes { /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; /** CSS colour washed over the glass. */ tint?: string; /** Kept for API compatibility. */ shimmer?: boolean; /** Rim bevel scale (1–4). Default 1. */ thickness?: number; /** Inner padding. Default '24px'. */ padding?: string; /** Corner radius. Default '28px'. */ radius?: string; /** `regular` frosted panel (default) or `clear` see-through glass. */ variant?: 'regular' | 'clear'; children?: React$1.ReactNode; } /** A refracting glass panel for grouping content. */ declare const GlassCard: React$1.ForwardRefExoticComponent>; interface GlassInputProps extends Omit, 'onChange'> { /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; /** Colour for the caret and focus glow. */ tint?: string; placeholder?: string; value?: string; onChange?: (e: React$1.ChangeEvent) => void; /** Small label above the field. */ label?: string; /** Leading icon. `type="search"` gets a magnifier by default. */ icon?: React$1.ReactNode; /** Trailing accessory, e.g. a microphone glyph. */ trailing?: React$1.ReactNode; /** Called by the clear button. Without it, clearing emits an empty `onChange`. */ onClear?: () => void; } /** iOS 26 search / text field on regular glass. */ declare const GlassInput: React$1.ForwardRefExoticComponent>; interface GlassSheetProps { /** Whether the sheet is open. */ open: boolean; /** Called when the user dismisses the sheet (scrim, Escape, or swipe down). */ onClose?: () => void; /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; /** CSS colour washed over the glass. */ tint?: string; /** Optional portal host for a sheet contained within an app preview. */ container?: HTMLElement | null; /** * Resting heights, like iOS `.presentationDetents`. `['medium', 'large']` * opens at half height; drag or flick up for full screen, down to settle or * dismiss. Leave unset for a sheet that fits its content. */ detents?: Array<'medium' | 'large'>; /** Accessible name for the dialog. */ 'aria-label'?: string; children?: React$1.ReactNode; } /** * iOS 26 floating sheet. Rises on a spring, can be flicked or dragged down to * dismiss, and rubber-bands when pulled up. With `detents` it rests at half * height and expands to full screen. */ declare const GlassSheet: React$1.FC; interface GlassMenuItem { label: React$1.ReactNode; /** Leading icon. */ icon?: React$1.ReactNode; /** * Shows a trailing checkmark. Set it (true or false) on every item of a * pick-one menu: those items become `menuitemradio` with `aria-checked`, * so screen readers announce which one is selected. */ checked?: boolean; /** Red label for irreversible actions. */ destructive?: boolean; disabled?: boolean; onSelect?: () => void; } interface GlassMenuProps { /** Icon for the trigger button (e.g. an ellipsis). */ icon: React$1.ReactNode; items: GlassMenuItem[]; /** Accessible name for the trigger. */ 'aria-label': string; /** Which edge of the trigger the menu grows from. Default 'end' (right). */ align?: 'start' | 'end'; /** Trigger size, as for GlassButton. Default 'md'. */ size?: 'sm' | 'md' | 'lg'; /** Menu width in px. Default 230. */ width?: number; /** Trailing checkmark icon. */ check?: React$1.ReactNode; className?: string; } /** * iOS 26 pull-down menu. The glass button itself grows into the menu from its * corner, its items sharpening out of a blur as it opens, and on close the * menu folds back down into the button. */ declare const GlassMenu: React$1.FC; interface GlassNavItem { label: string; icon?: React$1.ReactNode; /** The selected look of `icon`, e.g. its filled version. The lens always * draws this one: whatever part of an icon it covers fills in, right up to * its edge, and the rest stays as `icon`, as on the iOS 26 tab bar. */ activeIcon?: React$1.ReactNode; } interface GlassNavProps { /** Tabs to render. Icons sit above labels, like the iOS 26 tab bar. */ items: GlassNavItem[]; /** Zero-based index of the selected tab. Default 0. */ activeIndex?: number; /** Called when a tab is tapped, or when the lens is dragged onto one. */ onChange?: (index: number) => void; /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; /** Show the label under each icon. With `false` the bar is icons only and * the labels become the tabs' accessible names. Default true. */ showLabels?: boolean; className?: string; style?: React$1.CSSProperties; 'aria-label'?: string; } /** * The iOS 26 floating tab bar. Press a tab and the selection inflates into a * liquid lens you can drag across the bar; let go and it drops into place. */ declare const GlassNav: React$1.FC; interface GlassSegmentedOption { label: string; icon?: React$1.ReactNode; } interface GlassSegmentedProps { /** Segment labels, or `{ label, icon }` objects. */ options: Array; /** Zero-based index of the selected segment. */ value: number; onChange?: (index: number) => void; /** 36px (default) or compact 28px. */ size?: 'sm' | 'md'; /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; className?: string; style?: React$1.CSSProperties; 'aria-label'?: string; } /** * iOS 26 segmented control. The whole control swells under the finger and the * selection lifts into a clear lens that can be dragged between segments. */ declare const GlassSegmented: React$1.FC; interface GlassSliderProps extends Omit, 'onChange' | 'type' | 'value' | 'min' | 'max'> { value?: number; min?: number; max?: number; /** Continuous dragging by default (`"any"`). Set a numeric step to snap. */ step?: React$1.InputHTMLAttributes['step']; /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; /** Fill colour. Defaults to the accent blue (white in block mode). */ tint?: string; /** Kept for API compatibility. */ shimmer?: boolean; /** Kept for API compatibility. */ thickness?: number; /** * `true` (default): thin iOS track with a glass thumb that lifts into a lens. * `false`: Control Center block that fills and stretches under the finger. */ showThumb?: boolean; /** Icon shown inside the block slider. */ icon?: React$1.ReactNode; /** Label shown inside the block slider. */ label?: string; onChange?: (value: number) => void; } declare const GlassSlider: React$1.ForwardRefExoticComponent>; interface GlassSwitchProps extends Omit, 'onChange' | 'value' | 'defaultValue'> { checked?: boolean; defaultChecked?: boolean; onChange?: (checked: boolean) => void; /** On-state colour. Defaults to system green. */ tint?: string; /** Refraction strength from 1 (subtle) to 10 (heavy). Default 5. */ intensity?: number; } /** * iOS 26 switch. Touch the knob and it inflates into a clear lens that hangs * over the track, refracting it; drag it across or tap, and it drops back * into a white pill with a jelly wobble. */ declare const GlassSwitch: React$1.ForwardRefExoticComponent>; interface LiquidGlassFilterProps { children?: React$1.ReactNode; } /** * @deprecated Left over from v0.1 and no longer used by any component: each * surface now builds its own refraction. Wrapping an app in it has no effect. * It will be removed in the next breaking release (0.4.0). */ declare function LiquidGlassFilter({ children }: LiquidGlassFilterProps): React$1.JSX.Element; type GlassKind = 'surface' | 'lens'; interface GlassShape { /** `surface` bends the backdrop inward at the rim (bars, buttons, cards). * `lens` is a thick droplet: magnifies, bends outward and splits colour. */ kind?: GlassKind; /** Width of the curved rim in px. */ bezel?: number; /** Optical depth of the glass in px; deeper bends more. */ thickness?: number; /** Index of refraction. Glass ≈ 1.5. */ ior?: number; /** Interior magnification (lens only). 1 = none, below 1 minifies. */ zoom?: number; /** Horizontal magnification of a copied lens, when it differs from `zoom` * (e.g. a switch knob thins the track without shortening it). */ zoomX?: number; /** Chromatic split strength, 0–1. */ dispersion?: number; /** Overall displacement multiplier. */ strength?: number; /** * Rim stretch, 0–1 (lens only). Instead of pulling in light from past the * edge, the rim samples inward ever more steeply, so whatever sits under it * smears out to the edge in streaks: the thick-droplet look of iOS tab bars. */ stretch?: number; /** * Margin (px) along the top and bottom of a lens that stays clear and * unbent, e.g. where a tab-bar lens rises past its bar: only the part over * the bar refracts, so the bar's edge isn't pulled into a second outline. */ inset?: number; /** * Draw the lens from a live copy of `mirror` in every browser, not only * where backdrop refraction is missing. Needed for a minifying lens: a * backdrop filter can't see past the element's own edge. `'refract'` also * bends the copy at the rim where SVG filters run on elements (Chromium), * so content the rim draws in is styled like the rest of the copy. */ copy?: boolean | 'refract'; /** * With a copied lens, never refract the live backdrop too (Chromium would): * the glass behind the copy stays clear in every browser, so the lens looks * the same everywhere. */ copyOnly?: boolean; } /** Only Chromium runs SVG filters inside `backdrop-filter`. */ declare function canRefractBackdrop(): boolean; /** * Bakes refraction for `ref`'s current box (untransformed) and keeps it fresh * on resize. Writes `--lg-refraction` (Chromium) and `--lg-rim` on the element; * CSS maps the first to `--lg-filter` unless the page is scrolling, the glass * is off screen, or a weak device rests it (see quality.ts). * * `mirror` names the content that sits beneath the glass. Where the browser * can't refract the live backdrop (Safari, Firefox), a live copy of it is * refracted inside the glass instead, so lenses still bend light everywhere. */ declare function useRefraction(ref: React.RefObject, shape?: GlassShape, enabled?: boolean, mirror?: React.RefObject, /** While false the mirror sleeps (Safari/Firefox only). */ mirrorActive?: () => boolean): void; /** * Keeps refraction affordable. * * A refracting surface re-runs its SVG displacement over the live backdrop on * every frame the backdrop moves. Fast GPUs shrug that off; mid-range phones * drop frames as soon as a page holds a few dozen of them. So: * * - while the page scrolls, `html[data-lg-scrolling]` turns refraction off * (blur and the baked rim stay, which reads the same in motion); * - glass well outside the viewport gets `data-lg-offscreen` and skips it; * - on weak devices (`html[data-lg-quality='low']`) resting surfaces keep blur * and rim only; lenses still bend while they're held. * * The quality starts from device hints and drops to low if the first seconds * of scrolling miss frames. `setGlassQuality` pins it either way. */ type GlassQuality = 'auto' | 'high' | 'low'; /** * Pins the refraction quality. `'auto'` (default) picks from device hints and * drops to `'low'` if scrolling misses frames; `'high'` always refracts * resting surfaces; `'low'` refracts lenses only while they're held. */ declare function setGlassQuality(quality: GlassQuality): void; interface PressOptions { /** Swell on touch as a fraction (0.14 = 14%). Defaults to iOS sizing: small * circles swell ~20%, wide pills ~10%. Mouse presses swell a little less. */ grow?: number; /** How far (px) the shape may lean toward a drag. */ lean?: number; /** Max anisotropic stretch while dragging (0.1 = 10%). */ stretch?: number; disabled?: boolean; } declare function usePress(ref: React.RefObject, options?: PressOptions): void; /** * Closed-form damped harmonic springs, stepped on a shared rAF loop. * * Each spring is solved analytically per frame (no Euler drift), so stiff * presses stay stable and soft releases wobble exactly as tuned. */ interface SpringConfig { /** Spring constant k (mass is 1). */ stiffness: number; /** Damping coefficient c. ζ = c / (2√k); below 1 it overshoots. */ damping: number; } interface Spring { readonly value: number; readonly velocity: number; readonly target: number; /** Animate toward `target`. `instant` jumps there. */ set(target: number, instant?: boolean): void; /** Change the feel mid-flight without losing velocity. */ tune(config: SpringConfig): void; /** Give the spring a kick (px/s or units/s). */ impulse(velocity: number): void; stop(): void; } declare function createSpring(initial: number, config: SpringConfig, onUpdate: (value: number, velocity: number) => void): Spring; /** Converts Apple-style (response, dampingFraction) into k/c. */ declare function springFrom(response: number, dampingFraction: number): SpringConfig; /** Feel presets, tuned by eye against iOS 26 screen recordings. */ declare const SPRINGS: { /** Finger down: quick, almost no overshoot. */ readonly press: SpringConfig; /** Finger up: soft settle with the gentle jelly wobble. */ readonly release: SpringConfig; /** Following the finger during a drag. */ readonly drag: SpringConfig; /** Sliding into a new slot after release. */ readonly snap: SpringConfig; /** Lens inflating out of a selection pill. */ readonly lift: SpringConfig; /** Lens deflating back into a pill: visibly wobbly. */ readonly settle: SpringConfig; /** Colour cross-fades. */ readonly fade: SpringConfig; /** A dragged lens's stretch: loose, so it wobbles when the drag stops. */ readonly jelly: SpringConfig; }; declare function haptic(): void; interface UseGlassEffectOptions { intensity?: number; tint?: string; shimmer?: boolean; thickness?: number; blur?: number; } interface GlassEffectResult { style: React.CSSProperties; filterId: string; } declare function useGlassEffect(options?: UseGlassEffectOptions): GlassEffectResult; interface GlassAnimationState { isHovered: boolean; isPressed: boolean; isFocused: boolean; handlers: { onPointerEnter: () => void; onPointerLeave: () => void; onPointerDown: () => void; onPointerUp: () => void; onFocus: () => void; onBlur: () => void; }; } declare function useGlassAnimation(): GlassAnimationState; export { type GlassAnimationState, GlassButton, type GlassButtonProps, GlassCard, type GlassCardProps, GlassInput, type GlassInputProps, type GlassKind, GlassMenu, type GlassMenuItem, type GlassMenuProps, GlassNav, type GlassNavItem, type GlassNavProps, type GlassQuality, GlassSegmented, type GlassSegmentedOption, type GlassSegmentedProps, type GlassShape, GlassSheet, type GlassSheetProps, GlassSlider, type GlassSliderProps, GlassSwitch, type GlassSwitchProps, LiquidGlassFilter, type LiquidGlassFilterProps, type PressOptions, SPRINGS, type Spring, type SpringConfig, type UseGlassEffectOptions, canRefractBackdrop, createSpring, haptic, setGlassQuality, springFrom, useGlassAnimation, useGlassEffect, usePress, useRefraction };