sdxc

Type to search, or start from one of these:

[ @sdxc/ui/animations ]

zoom

A fade paired with a scale, entering from slightly smaller than rest and exiting back down to it.

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

Signature

zoom(options?: Zoom.Options): CSSMixinDescriptor

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

Parameters

ParameterTypeDescription
options?Zoom.OptionsExit-state opacity and scale, timing, and entered-state selector.

Examples

<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

MemberTypeDescription
opacity?numberExit-state opacity (0 to 1). Defaults to 0.
scale?numberExit-state scale factor (e.g. 0.95). Defaults to 0.95.
duration?numberTransition duration in milliseconds. Defaults to durations.normal.
easing?stringA transition-timing-function value. Defaults to easings.standard.
when?stringA selector fragment overriding the default [open]/:popover-open entered state.

Written by Sergio Xalambrí. Follow @sergiodxa for new packages, or sponsor the work.