sdxc

Type to search, or start from one of these:

[ @sdxc/ui/animations ]

fade

An opacity-only enter/exit transition: sugar over enterExit for a surface that fades in place.

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

Signature

fade(options?: Fade.Options): CSSMixinDescriptor

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

Parameters

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

Examples

<div id="tooltip-1" popover="hint" mix={fade({ duration: durations.fast })}>
	Copied!
</div>;

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

Interface

Fade.Options

MemberTypeDescription
opacity?numberExit-state opacity (0 to 1). Defaults to 0 — fully transparent when closed.
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.