SpringConfig
Tunes how a spring() animation moves: by its physics, or by a duration and how bouncy it is.
Utilização
Fade a view on entry or removal.
Este tipo é usado por spring
// Fade a view on entry or removal.
import { Box, fade, slide, spring } from 'kuito';
<Box enter={fade.and(slide.up(12))} exit={fade} layout={spring()} />;Declaração do tipo
export interface SpringConfig {
damping?: number;
stiffness?: number;
mass?: number;
velocity?: number;
/** False stops it at its target instead of swinging past; true by default. */
overshoot?: boolean;
energyThreshold?: number;
duration?: number;
dampingRatio?: number;
clamp?: { min?: number; max?: number };
delay?: number;
onEnd?: AnimationCallback;
}Membros 11
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
damping | number | Não | — |
stiffness | number | Não | — |
mass | number | Não | — |
velocity | number | Não | — |
overshoot | boolean | Não | False stops it at its target instead of swinging past; true by default. |
energyThreshold | number | Não | — |
duration | number | Não | — |
dampingRatio | number | Não | — |
clamp | { min?: number; max?: number;} | Não | — |
delay | number | Não | — |
onEnd | AnimationCallback | Não | — |
clamp — campos aninhados
clamp campos
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
min | number | Não | — |
max | number | Não | — |
onEnd — assinaturas de método
Assinaturas
(finished: boolean): voidParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
finished | boolean | Sim | — |
Devolve
void
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.