@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Class CoverflowCarouselStrategy

    Classic coverflow strategy inspired by macOS / iPod Cover Flow.

    The active item is shown front-and-centre; neighbours are rotated, pushed back on the Z axis, and tightly stacked so they overlap — just like the original Cover Flow in iTunes and macOS Finder.

    // Default coverflow
    readonly strategy = new CoverflowCarouselStrategy();

    // Sharp (no blur) coverflow
    readonly strategy = new CoverflowCarouselStrategy({ blur: false });

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    name: "coverflow"

    Human-readable name (useful for debugging / stories).

    Methods

    • Compute the CSS styles for a single item.

      Parameters

      • itemIndex: number

        — the item's position in the array

      • activeIndex: number

        — the currently centred / active index

      • totalItems: number

        — total number of items

      • wrap: boolean = false

      Returns CarouselItemStyle

    • Returns the CSS style object for the track container itself. Strategies may set perspective, overflow, etc.

      Returns Record<string, string>