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): CSSMixinDescriptorReturns a css() mixin ready for a host element's mix prop.
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
options | Fade.Options | — | No | Exit-state opacity, timing, and entered-state selector. |
Examples
<div id="tooltip-1" popover="hint" mix={fade({ duration: durations.fast })}>
Copied!
</div>;Used with it
The events, constants and types its module publishes, each imported from @sdxc/ui/animations too.
Interface
Fade.Options
| Member | Type | Default | Required | Description |
|---|---|---|---|---|
opacity | number | — | No | Exit-state opacity (0 to 1). Defaults to 0 — fully transparent when closed. |
blur | number | — | No | Blur radius in pixels the host softens from and to while it fades. |
duration | number | — | No | Transition duration in milliseconds. Defaults to durations.normal. |
easing | string | — | No | A transition-timing-function value. Defaults to easings.standard. |
when | string | — | No | A selector fragment overriding the default [open]/:popover-open entered state. |