variable / @typed/ui/Carousel

makeCollection

Creates a scoped Collection for Carousel items.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Slide registration
Since
1.0.0

Import

import { makeCollection } from "@typed/ui/Carousel";

Signatures

export declare const makeCollection: (initial?: Collection.State<string, Element>) => Effect.Effect<RefSubject.RefSubject<Collection.State<string, Element>, never, never>, never, Scope.Scope>;

Examples

import * as Effect from "effect/Effect";
import * as Carousel from "@typed/ui/Carousel";

const program = Effect.scoped(
  Effect.gen(function* () {
    const collection = yield* Carousel.makeCollection();
    return yield* collection;
  }),
);

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source