SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

zoom

A fade paired with a scale, entering from slightly smaller than rest and exiting halfway back down to it, so leaving reads quieter than arriving.

tsx
import { zoom } from "@sdxc/ui/animations";

Signature

typescript
zoom(options?: Zoom.Options): CSSMixinDescriptor

Returns a css() mixin ready for a host element's mix prop.

Parameters

ParameterTypeDefaultRequiredDescription
optionsZoom.Options—NoExit-state opacity and scale, timing, and entered-state selector.

Examples

tsx
<dialog id="confirm-delete" mix={zoom({ scale: 0.9, duration: durations.normal })}>
	...
</dialog>;

The events, constants and types its module publishes, each imported from @sdxc/ui/animations too.

Interface

Zoom.Options

MemberTypeDefaultRequiredDescription
opacitynumber—NoExit-state opacity (0 to 1). Defaults to 0.
scalenumber—NoScale factor the host enters from (e.g. 0.95). Defaults to 0.95.
blurnumber—NoBlur radius in pixels the host softens from and to while it scales.
durationnumber—NoTransition duration in milliseconds. Defaults to durations.normal.
easingstring—NoA transition-timing-function value. Defaults to easings.standard.
whenstring—NoA selector fragment overriding the default [open]/:popover-open entered state.
@sdxc/ui

Can’t find it? Contact us