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

    Single-frame carousel strategy.

    Only the active item is visible at a time. Each slide stretches to the carousel viewport so projected media can fill the available space.

    For edge-to-edge imagery, pair this strategy with object-fit: cover on the projected image element.

    readonly strategy = new SingleCarouselStrategy();
    

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    name: "single"

    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

      Returns CarouselItemStyle

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

      Returns Record<string, string>