Home / Function/ slide() — astro Function Reference

slide() — astro Function Reference

Architecture documentation for the slide() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  1bbe78ea_0ee7_a748_472a_5f60bb7ae47b["slide()"]
  4165c511_345b_e746_8f71_be07c83373c5["index.ts"]
  1bbe78ea_0ee7_a748_472a_5f60bb7ae47b -->|defined in| 4165c511_345b_e746_8f71_be07c83373c5
  style 1bbe78ea_0ee7_a748_472a_5f60bb7ae47b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/transitions/index.ts lines 10–52

export function slide({
	duration,
}: {
	duration?: string | number;
} = {}): TransitionDirectionalAnimations {
	return {
		forwards: {
			old: [
				{
					name: 'astroFadeOut',
					duration: duration ?? '90ms',
					easing: EASE_IN_OUT_QUART,
					fillMode: 'both',
				},
				{
					name: 'astroSlideToLeft',
					duration: duration ?? '220ms',
					easing: EASE_IN_OUT_QUART,
					fillMode: 'both',
				},
			],
			new: [
				{
					name: 'astroFadeIn',
					duration: duration ?? '210ms',
					easing: EASE_IN_OUT_QUART,
					delay: duration ? undefined : '30ms',
					fillMode: 'both',
				},
				{
					name: 'astroSlideFromRight',
					duration: duration ?? '220ms',
					easing: EASE_IN_OUT_QUART,
					fillMode: 'both',
				},
			],
		},
		backwards: {
			old: [{ name: 'astroFadeOut' }, { name: 'astroSlideToRight' }],
			new: [{ name: 'astroFadeIn' }, { name: 'astroSlideFromLeft' }],
		},
	};
}

Domain

Subdomains

Frequently Asked Questions

What does slide() do?
slide() is a function in the astro codebase, defined in packages/astro/src/transitions/index.ts.
Where is slide() defined?
slide() is defined in packages/astro/src/transitions/index.ts at line 10.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free