Features

The Features a Handle takes (#511, ADR-0067; ADR-0071 Amendment (#516), and Amendment (#791) at slices 2 and 3): Wardic.make({ env, features: [Features.layout, Features.presence] }), or a preset, features: Features.domAnimation, or a load, features: () => import("./features.ts").then((m) => m.domMax). Without one, a w.* element is Slim: a gesture attribute is then a type error naming its Feature, and at runtime warns once in development and does nothing. The DOM's Features are @wardic/dom's; presence is the binding's own, since w.Presence sits on the shared builder and dom's presence controller would otherwise ship to every Foldkit app.

Example

import { DomLive } from "@wardic/dom"
import { Features, Wardic } from "@wardic/foldkit"

const wardic = Wardic.make({ env: DomLive, features: [Features.domAnimation, Features.presence] })

Its exports also name types the module doesn't export: its internal types.

Variables

layout

layout: any;

presence

const presence: Feature.Feature<PresenceMaker, PresenceMakerShape, "presence">;

Presence (ADR-0007; ADR-0071 decision 29): w.Presence on a parent keeps each child Foldkit removes on the page while its w.Exit plays, in Motion's order, with mode, custom, onExitComplete, propagate and the rest of Motion's AnimatePresence props.

References

domAnimation

Renames and re-exports layout


domMax

Renames and re-exports layout


drag

Renames and re-exports layout


focus

Renames and re-exports layout


hover

Renames and re-exports layout


inView

Renames and re-exports layout


pan

Renames and re-exports layout


press

Renames and re-exports layout


scroll

Renames and re-exports layout