@neshel-ui/animations/advanced
Todas las exportaciones de @neshel-ui/animations/advanced, generadas desde sus declaraciones.
Experimental y no disponible en npm
Firmas, miembros y valores por defecto, generados desde las declaraciones compiladas. Las explicaciones y los ejemplos están en la guía.
Las descripciones de esta referencia se generan desde el código fuente del paquete y se muestran en inglés; las guías y el catálogo están en español.
CardFlipcomponentD01 — a card with two faces that flips in 3D (`div.neshel-flip`).
(props: CardFlipProps): ElementCornerRecedecomponentD05 — the corner under the pointer recedes like a folded page (`div.neshel-corner`).
(props: CornerRecedeProps): ElementCubeRotatecomponentD02 — panels (children) that change through a cube rotation (`div.neshel-cube`).
(props: CubeRotateProps): ElementGlitchcomponentD07 — RGB split / glitch bursts on text (`span.neshel-glitch`); the text exists once.
(props: GlitchProps): ElementPerspectiveGridcomponentD09 — a decorative perspective grid floor behind the children (`div.neshel-grid-host`).
(props: PerspectiveGridProps): ElementRingCarouselcomponentD03 — items (children) on a rotating 3D ring (`div.neshel-ring`).
(props: RingCarouselProps): ElementTiltShiftcomponentD11 — tilt-shift depth of field over the children (`div.neshel-tiltshift-host`).
(props: TiltShiftProps): ElementcreateCardFlipfunction(root: HTMLElement, options?: CardFlipOptions | undefined): CardFlipControlcreateCornerRecedefunction(root: HTMLElement, options?: CornerRecedeOptions | undefined): CornerRecedeControlcreateCubeRotatefunction(root: HTMLElement, options?: CubeRotateOptions | undefined): CubeControlcreateGlitchfunction(element: HTMLElement, options?: GlitchOptions | undefined): GlitchControlcreatePerspectiveGridfunction(root: HTMLElement, options?: PerspectiveGridOptions | undefined): GridControlcreateRingCarouselfunction(root: HTMLElement, options?: RingCarouselOptions | undefined): RingControlcreateTiltShiftfunction(root: HTMLElement, options?: TiltShiftOptions | undefined): TiltShiftControlgetAdvancedDebugInfofunction(): AdvancedDebugInfoGLITCH_MAX_RATEconstMaximum slice changes per second (WCAG 2.3.1 general flash threshold).
3AdvancedDebugInfointerfaceAdvancedDebugInfo
AdvancedDebugInfo Prop Tipo Predeterminado Descripción attributeEntries(obligatoria) number— — effects(obligatoria) number— — flaps(obligatoria) number— — gateElements(obligatoria) number— — gateObservers(obligatoria) number— — glitchLayers(obligatoria) number— — glitchSteps(obligatoria) number— — layers(obligatoria) number— — listeners(obligatoria) number— — observers(obligatoria) number— — CardFlipControlinterfaceCardFlipControl
CardFlipControl Prop Tipo Predeterminado Descripción destroy(obligatoria) () => void— — drive(obligatoria) (source: ProgressSource) => () => void— Follow a 0–1 source; returns the unsubscribe. flip(obligatoria) (side?: FlipSide) => void— — mode(obligatoria) "3d" | "fade"— "3d"or"fade"(reduced motion withreducedEffect: "fade", or nopreserve-3d).progress(obligatoria) number— 0 front … 1 back. seek(obligatoria) (progress: number) => void— Render an exact pose (no animation). side(obligatoria) FlipSide— The face currently facing the viewer. target(obligatoria) FlipSide— The side the card is moving to (or resting on). toggle(obligatoria) () => void— — track(obligatoria) (options?: ProgressTrackOptions) => ProgressTrack— A value track for a C01 timeline. CardFlipOptionsinterfaceCardFlipOptions
CardFlipOptions Prop Tipo Predeterminado Descripción axis "y" | "x"— — back HTMLElement— — direction 1 | -1— — flipped booleanfalseEmpieza por el reverso (por defecto false). front HTMLElement— Caras (por defecto: los dos primeros hijos del elemento interior). inner HTMLElement— El elemento que gira (por defecto: el primer hijo de la raíz). onFlip (side: FlipSide) => void— Cambió la cara visible (la rotación cruzó 90°). onToggle (side: FlipSide) => void— Un cambio (control en la cara o toggle()) modificó el lado deseado: la intención, antes de cualquier movimiento.perspective number1200px 200–4000 (por defecto 1200). reducedEffect "fade" | "instant"— Con movimiento reducido: fundido (por defecto) o salto. reducedMotion ReducedMotion— — spring SpringOptions— — toggleSelector string | false— Elementos de las caras que la giran con un clic (botones nativos); falselo desactiva.CornerRecedeControlinterfaceCornerRecedeControl
CornerRecedeControl Prop Tipo Predeterminado Descripción amount(obligatoria) number— Rendered fold amount 0–1. corner(obligatoria) Corner— — destroy(obligatoria) () => void— — reset(obligatoria) () => void— — seek(obligatoria) (corner: Corner, amount: number) => void— Render a pose exactly (no animation). set(obligatoria) (corner: Corner, amount: number) => void— Animate to a pose (programmatic or external progress). CornerRecedeOptionsinterfaceCornerRecedeOptions
CornerRecedeOptions Prop Tipo Predeterminado Descripción angle number60Ángulo máximo del pliegue, grados 10–85 (por defecto 60). corners readonly Corner[]— Esquinas que se pueden plegar (por defecto las cuatro). flap "clone" | "plain""clone""clone": copia inerte sin ids de la superficie;"plain": un triángulo de su color (por defecto "clone").focusCorner Corner | false"top-right"Esquina plegada al 35 % mientras el foco interior es :focus-visible;falselo desactiva (por defecto "top-right").perspective number900px 300–3000, perspectiva de la solapa (por defecto 900). pointerTypes readonly ("mouse" | "pen" | "touch")[]— — reducedMotion ReducedMotion— — reverse booleanfalseLevanta la esquina hacia quien mira en vez de hundirla (por defecto false). shade number0.3Oscurecimiento de la solapa 0–0.6 (por defecto 0.3). size number0.35Lado del pliegue como fracción del lado menor 0.1–0.6 (por defecto 0.35). spring SpringOptions— — surface HTMLElement— El contenido vivo que se recorta (por defecto: el primer hijo de la raíz). threshold number0.3Zona neutra alrededor del centro 0–0.9 (por defecto 0.3). CubeControlinterfaceCubeControl
CubeControl Prop Tipo Predeterminado Descripción cancel(obligatoria) () => void— — count(obligatoria) number— — destroy(obligatoria) () => void— — drive(obligatoria) (source: ProgressSource) => () => void— Follow a 0–1 source instead of the own clock; returns the unsubscribe. finish(obligatoria) () => void— — finished(obligatoria) Promise<MotionResult>— Promise of the current (or next) run. go(obligatoria) (index: number, options?: { direction?: 1 | -1; }) => void— — index(obligatoria) number— Logical active panel. mode(obligatoria) "3d" | "fade"— — next(obligatoria) () => void— — pause(obligatoria) () => void— — play(obligatoria) () => void— — previous(obligatoria) () => void— — progress(obligatoria) number— Rendered progress 0–1. refresh(obligatoria) () => void— Re-read the panels (children changed). reverse(obligatoria) () => void— — seek(obligatoria) (progress: number) => void— Render the effect at a time fraction 0–1 of its run (eased). state(obligatoria) MotionState— — track(obligatoria) (options?: ProgressTrackOptions) => ProgressTrack— A value track for createTimeline().add(…): the timeline clock drives this effect.CubeRotateOptionsinterfaceCubeRotateOptions
CubeRotateOptions Prop Tipo Predeterminado Descripción axis Axis3D— — duration number700ms 0–10000 (por defecto 700). easing Easing | EasingPreset— — index number0Panel inicial (por defecto 0). loop booleantrueContinúa en el otro extremo (por defecto true). onChange (index: number) => void— — perspective number1600px 200–6000 (por defecto 1600). reducedMotion ReducedMotion— — GlitchControlinterfaceGlitchControl
GlitchControl Prop Tipo Predeterminado Descripción active(obligatoria) boolean— — destroy(obligatoria) () => void— — play(obligatoria) () => void— — stop(obligatoria) () => void— — GlitchOptionsinterfaceGlitchOptions
GlitchOptions Prop Tipo Predeterminado Descripción colors readonly [string, string]— Dos colores CSS de las capas de canal. duration number600Duración de la ráfaga, ms 100–2000 (por defecto 600). intensity number— 0–1 (desplazamiento ≤ 6 px; por defecto 0.4). rate number— Cambios de franja por segundo 1–3 (límite fijo 3; por defecto 3). reducedMotion ReducedMotion— — seed number1Semilla entera del patrón de franjas (por defecto 1). trigger GlitchTrigger— — GridControlinterfaceGridControl
GridControl Prop Tipo Predeterminado Descripción destroy(obligatoria) () => void— — pause(obligatoria) () => void— — play(obligatoria) () => void— — state(obligatoria) GridState— — PerspectiveGridOptionsinterfacePerspectiveGridOptions
PerspectiveGridOptions Prop Tipo Predeterminado Descripción angle number72Inclinación del plano, grados 45–85 (por defecto 72). cell number48Tamaño de celda, px 8–256 (por defecto 48). color stringcurrentColorColor de las líneas (por defecto currentColor).drift number0Celdas laterales por segundo −4–4 (por defecto 0). duration number5000Tiempo en marcha, ms 0–600000 o Infinity(por defecto 5000).fade booleantrueSe desvanece hacia el horizonte (por defecto true). horizon number0.45Horizonte como fracción de la altura 0–0.9 (por defecto 0.45). line number2Ancho de línea, px 1–6 (por defecto 2). opacity number0.8Opacidad 0.05–1 (por defecto 0.8). reducedMotion ReducedMotion— — speed number1Celdas por segundo hacia quien mira 0–8 (por defecto 1). vanishing number0.5Punto de fuga horizontal 0–1 (por defecto 0.5). ProgressSourceinterfaceProgressSource
Any 0–1 progress source (the 011
ScrollProgressand motion values fit).ProgressSource Prop Tipo Predeterminado Descripción get(obligatoria) () => number— — subscribe(obligatoria) (listener: (progress: number) => void) => () => void— — ProgressTrackinterfaceProgressTrack
A C01 value track (
timeline.add(effect.track())).ProgressTrack Prop Tipo Predeterminado Descripción duration(obligatoria) number— — easing(obligatoria) Easing | EasingPreset— — from(obligatoria) number— — id string— — to(obligatoria) number— — value(obligatoria) MotionValue— — RingCarouselOptionsinterfaceRingCarouselOptions
RingCarouselOptions Prop Tipo Predeterminado Descripción announce (index: number, count: number) => string"Slide n of N"Texto del anuncio (por defecto "Slide n of N"). drag boolean— — gap number— px 0–400 entre elementos (radio automático; por defecto 24). index number— — keyboard boolean— — label string— Nombre accesible del carrusel (obligatorio salvo que la raíz ya tenga nombre). onChange (index: number) => void— — perspective number1400px 200–6000 (por defecto 1400). radius "auto" | number— "auto"(según el ancho de los elementos) o px 50–4000.reducedMotion ReducedMotion— — spring SpringOptions— — RingControlinterfaceRingControl
RingControl Prop Tipo Predeterminado Descripción angle(obligatoria) number— Current ring angle (deg). count(obligatoria) number— — destroy(obligatoria) () => void— — go(obligatoria) (index: number) => void— — index(obligatoria) number— — next(obligatoria) () => void— — previous(obligatoria) () => void— — refresh(obligatoria) () => void— — TiltShiftControlinterfaceTiltShiftControl
TiltShiftControl Prop Tipo Predeterminado Descripción destroy(obligatoria) () => void— — drive(obligatoria) (source: ProgressSource) => () => void— — focus(obligatoria) number— — mode(obligatoria) "backdrop" | "tint" | "none"— — setFocus(obligatoria) (center: number) => void— — TiltShiftOptionsinterfaceTiltShiftOptions
TiltShiftOptions Prop Tipo Predeterminado Descripción bands number2Bandas por lado 1–2 (por defecto 2). blur number6Desenfoque máximo, px 0–12 (por defecto 6). fallback "tint" | "none"— Sin backdrop-filter: un tinte degradado (por defecto) o nada.focus number0.5Centro focal 0–1 (por defecto 0.5). orientation "horizontal" | "vertical" | "radial"— — progress ProgressSource— Fuente de 0 a 1 que mueve el centro focal. reducedMotion ReducedMotion— — size number0.35Banda focal 0.1–0.9 (por defecto 0.35). spring SpringOptions— — tint string— — CardFlipPropstypeCardFlipProps
CardFlipProps Prop Tipo Predeterminado Descripción axis "y" | "x"— — back(obligatoria) ReactNode— — controlRef RefObject<C | null>— — defaultFlipped boolean— — direction 1 | -1— — flipped boolean— Controlled side ( true= back).front(obligatoria) ReactNode— — onFlip (side: FlipSide) => void— Cambió la cara visible (la rotación cruzó 90°). onFlippedChange (flipped: boolean) => void— The user asked for the other side (in-face toggle): the intent, reported before any motion. perspective number1200px 200–4000 (por defecto 1200). reducedEffect "fade" | "instant"— Con movimiento reducido: fundido (por defecto) o salto. reducedMotion ReducedMotion— — spring SpringOptions— — toggleSelector string | false— Elementos de las caras que la giran con un clic (botones nativos); falselo desactiva.También acepta las props de: React DOM attributes.
Cornertype"top-left" | "top-right" | "bottom-left" | "bottom-right"CornerRecedePropstypeCornerRecedeProps
CornerRecedeProps Prop Tipo Predeterminado Descripción angle number60Ángulo máximo del pliegue, grados 10–85 (por defecto 60). children(obligatoria) ReactElement— One element: the live surface whose corner recedes. controlRef RefObject<C | null>— — corners readonly Corner[]— Esquinas que se pueden plegar (por defecto las cuatro). flap "clone" | "plain""clone""clone": copia inerte sin ids de la superficie;"plain": un triángulo de su color (por defecto "clone").focusCorner Corner | false"top-right"Esquina plegada al 35 % mientras el foco interior es :focus-visible;falselo desactiva (por defecto "top-right").perspective number900px 300–3000, perspectiva de la solapa (por defecto 900). pointerTypes readonly ("mouse" | "pen" | "touch")[]— — reducedMotion ReducedMotion— — reverse booleanfalseLevanta la esquina hacia quien mira en vez de hundirla (por defecto false). shade number0.3Oscurecimiento de la solapa 0–0.6 (por defecto 0.3). size number0.35Lado del pliegue como fracción del lado menor 0.1–0.6 (por defecto 0.35). spring SpringOptions— — threshold number0.3Zona neutra alrededor del centro 0–0.9 (por defecto 0.3). También acepta las props de: React DOM attributes.
CubeRotatePropstypeCubeRotateProps
CubeRotateProps Prop Tipo Predeterminado Descripción axis Axis3D— — controlRef RefObject<C | null>— — defaultIndex number— — duration number700ms 0–10000 (por defecto 700). easing Easing | EasingPreset— — index number— Controlled panel index. loop booleantrueContinúa en el otro extremo (por defecto true). onIndexChange (index: number) => void— — perspective number1600px 200–6000 (por defecto 1600). reducedMotion ReducedMotion— — También acepta las props de: React DOM attributes.
FlipSidetype"front" | "back"GlitchPropstypeGlitchProps
GlitchProps Prop Tipo Predeterminado Descripción colors readonly [string, string]— Dos colores CSS de las capas de canal. controlRef RefObject<C | null>— — duration number600Duración de la ráfaga, ms 100–2000 (por defecto 600). intensity number— 0–1 (desplazamiento ≤ 6 px; por defecto 0.4). rate number— Cambios de franja por segundo 1–3 (límite fijo 3; por defecto 3). reducedMotion ReducedMotion— — seed number1Semilla entera del patrón de franjas (por defecto 1). trigger GlitchTrigger— — También acepta las props de: React DOM attributes.
GlitchTriggertype"hover-focus" | "hover" | "focus" | "visible" | "manual"GridStatetype"running" | "paused" | "completed" | "reduced" | "static"PerspectiveGridPropstypePerspectiveGridProps
PerspectiveGridProps Prop Tipo Predeterminado Descripción angle number72Inclinación del plano, grados 45–85 (por defecto 72). cell number48Tamaño de celda, px 8–256 (por defecto 48). color stringcurrentColorColor de las líneas (por defecto currentColor).controlRef RefObject<C | null>— — drift number0Celdas laterales por segundo −4–4 (por defecto 0). duration number5000Tiempo en marcha, ms 0–600000 o Infinity(por defecto 5000).fade booleantrueSe desvanece hacia el horizonte (por defecto true). horizon number0.45Horizonte como fracción de la altura 0–0.9 (por defecto 0.45). line number2Ancho de línea, px 1–6 (por defecto 2). opacity number0.8Opacidad 0.05–1 (por defecto 0.8). reducedMotion ReducedMotion— — speed number1Celdas por segundo hacia quien mira 0–8 (por defecto 1). vanishing number0.5Punto de fuga horizontal 0–1 (por defecto 0.5). También acepta las props de: React DOM attributes.
RingCarouselPropstypeRingCarouselProps
RingCarouselProps Prop Tipo Predeterminado Descripción announce (index: number, count: number) => string"Slide n of N"Texto del anuncio (por defecto "Slide n of N"). controlRef RefObject<C | null>— — defaultIndex number— — drag boolean— — gap number— px 0–400 entre elementos (radio automático; por defecto 24). index number— — keyboard boolean— — label(obligatoria) string— Accessible name of the carousel. onIndexChange (index: number) => void— — perspective number1400px 200–6000 (por defecto 1400). radius "auto" | number— "auto"(según el ancho de los elementos) o px 50–4000.reducedMotion ReducedMotion— — spring SpringOptions— — También acepta las props de: React DOM attributes.
TiltShiftPropstypeTiltShiftProps
TiltShiftProps Prop Tipo Predeterminado Descripción bands number2Bandas por lado 1–2 (por defecto 2). blur number6Desenfoque máximo, px 0–12 (por defecto 6). controlRef RefObject<C | null>— — fallback "tint" | "none"— Sin backdrop-filter: un tinte degradado (por defecto) o nada.focus number0.5Centro focal 0–1 (por defecto 0.5). orientation "horizontal" | "vertical" | "radial"— — progress ProgressSource— Fuente de 0 a 1 que mueve el centro focal. reducedMotion ReducedMotion— — size number0.35Banda focal 0.1–0.9 (por defecto 0.35). spring SpringOptions— — tint string— — También acepta las props de: React DOM attributes.