Skip to Content
Neshel-UI
Animations (experimental)Reference

@neshel-ui/animations/feedback

Every export of @neshel-ui/animations/feedback, generated from its declarations.

Experimental and not on npm

@neshel-ui/animations is a private package (0.0.0). It cannot be installed, and its API may change before a first publication. These pages document what exists in the repository.

Signatures, members and defaults, generated from the built declarations. For explanations and examples read the guide.

  • DotsPulse component

    F04 — three pulsing dots (indeterminate); slow opacity under reduced motion.

    ({ label, decorative, size, className, style, ...rest }: IndicatorProps): Element
  • EnterExit component

    F06 — enter/exit motion for the items of a list another component owns (`data-state` + `neshel-exit`, see `createEnterExit`). Renders no element of its own; content, roles, timers and focus stay with the owner.

    ({ children, from, exitTo, distance, duration, selector, reducedMotion, }: EnterExitProps): Element
  • LoadingButton component

    F07 — loading morph on the single button child (same element, name and focus; no double activation).

    ({ loading, children, controlRef }: LoadingButtonProps): Element
  • OptimisticPulse component

    F08 — pending/confirmed/failed states on the single child; `failed` calls `onRollback`.

    ({ status, onRollback, children, controlRef, }: OptimisticPulseProps): Element
  • PendingText component

    F10 — the text stays one readable text; a light band sweeps while `pending`.

    ({ pending, className, children, ...rest }: PendingTextProps): Element
  • ProgressBar component

    F03 — progress bar: determinate with a real value, indeterminate sweep otherwise.

    ({ label, value, max, valueText, className, style, ...rest }: ProgressBarProps): Element
  • ProgressRing component

    F09 — progress ring (`pathLength`-normalised SVG; transitions are package CSS).

    (props: ProgressRingProps): Element
  • Shimmer component

    F02 — adds the `shimmer` token to the single child (e.g. a Components `Skeleton`); `::after` sweep.

    ({ children }: { children: ReactElement<unknown, string | JSXElementConstructor<any>>; }): Element
  • SkeletonShimmer component

    F02 — a decorative placeholder with a shimmer (`aria-hidden`; mark the region `aria-busy`).

    ({ width, height, shape, className, style, ...rest }: SkeletonShimmerProps): Element
  • Spinner component

    F01 — indeterminate spinner (`role="progressbar"`, no value); slow pulse under reduced motion.

    ({ label, decorative, size, className, style, ...rest }: IndicatorProps): Element
  • SuccessMark component

    F05 — success check drawn when `show` becomes true (shape shared with S10 through core).

    ({ show, label, size, circle, className, ...rest }: SuccessMarkProps): Element
  • createEnterExit function

    Animate the items of a keyed list on enter and exit. The container keeps its own semantics; F06 never moves focus, never announces and never removes an item.

    (container: HTMLElement, options?: EnterExitOptions | undefined): EnterExitControl
  • createLoadingButton function

    F07 — keep the same button (identity, accessible name, focus) while an operation runs: `aria-disabled`, activation blocked in the capture phase (click, Enter/Space and implicit submission all arrive as a click), width locked from one measurement, label hidden visually (still in the DOM), spinner on the `::after` layer.

    (button: HTMLElement, options?: LoadingButtonOptions | undefined): LoadingButtonControl
  • createOptimisticPulse function

    F08 — an optimistic change is shown as pending (soft `::before` pulse, `aria-busy`), never as confirmed until the caller says so; `failed` shows a distinct static state and calls `onRollback`.

    (element: HTMLElement, options?: OptimisticPulseOptions | undefined): OptimisticPulseControl
  • getFeedbackDebugInfo function

    Live feedback counters (tests, lab).

    (): FeedbackDebugInfo
  • EnterExitControl interface

    EnterExitControl

    EnterExitControl
    PropTypeDefaultDescription
    destroy(required)() => void—Idempotent: stops observing and restores every item's styles.
    size(required)number—Items currently tracked.
    update(required)(options: EnterExitOptions) => void——
  • EnterExitOptions interface

    EnterExitOptions

    EnterExitOptions
    PropTypeDefaultDescription
    distancenumber—Travel in px (0–200, default 12).
    durationnumber | DurationPreset220Duration in ms or a motionDefaults.duration preset (default 220).
    exitToEnterExitSide"end"Side the items leave towards (default "end").
    fromEnterExitSide"bottom"Side the items enter from (default "bottom"; logical start/end follow the writing direction).
    reducedMotionReducedMotion"user"Reduced-motion policy (default "user"): reduced → opacity only.
    selectorstring"[data-state]"Items to animate inside the container (default "[data-state]").
  • FeedbackDebugInfo interface

    FeedbackDebugInfo

    FeedbackDebugInfo
    PropTypeDefaultDescription
    enterExit(required)number——
    loadingButtons(required)number——
    optimistic(required)number——
  • LoadingButtonControl interface

    LoadingButtonControl

    LoadingButtonControl
    PropTypeDefaultDescription
    destroy(required)() => void——
    loading(required)boolean——
    set(required)(loading: boolean) => void——
  • LoadingButtonOptions interface

    LoadingButtonOptions

    LoadingButtonOptions
    PropTypeDefaultDescription
    loadingbooleanfalseInitial state (default false).
  • NeshelExitDetail interface

    NeshelExitDetail

    Detail of the neshel-exit event a list owner dispatches on an item before removing it.

    NeshelExitDetail
    PropTypeDefaultDescription
    waitUntil(required)(promise: Promise<unknown>) => void——
  • OptimisticPulseControl interface

    OptimisticPulseControl

    OptimisticPulseControl
    PropTypeDefaultDescription
    destroy(required)() => void——
    set(required)(status: OptimisticStatus) => void——
    status(required)OptimisticStatus——
  • OptimisticPulseOptions interface

    OptimisticPulseOptions

    OptimisticPulseOptions
    PropTypeDefaultDescription
    onRollback() => void—Called when the status becomes failed (undo the optimistic change).
    statusOptimisticStatus——
  • ProgressSource interface

    ProgressSource

    Any 0–1 progress source (the 011 ScrollProgress and motion values fit).

    ProgressSource
    PropTypeDefaultDescription
    get(required)() => number——
    subscribe(required)(listener: (progress: number) => void) => () => void——
  • EnterExitProps type

    EnterExitProps

    EnterExitProps
    PropTypeDefaultDescription
    children(required)ReactElement—One element: the list container (e.g. a Components <Toaster motion="none">).
    distancenumber—Travel in px (0–200, default 12).
    durationnumber | DurationPreset220Duration in ms or a motionDefaults.duration preset (default 220).
    exitToEnterExitSide"end"Side the items leave towards (default "end").
    fromEnterExitSide"bottom"Side the items enter from (default "bottom"; logical start/end follow the writing direction).
    reducedMotionReducedMotion"user"Reduced-motion policy (default "user"): reduced → opacity only.
    selectorstring"[data-state]"Items to animate inside the container (default "[data-state]").
  • EnterExitSide type
    "bottom" | "top" | "start" | "end"
  • LoadingButtonProps type

    LoadingButtonProps

    LoadingButtonProps
    PropTypeDefaultDescription
    children(required)ReactElement—One button element (e.g. a Components Button without its loading prop).
    controlRefRefObject<LoadingButtonControl | null>——
    loading(required)boolean——
  • OptimisticPulseProps type

    OptimisticPulseProps

    OptimisticPulseProps
    PropTypeDefaultDescription
    children(required)ReactElement——
    controlRefRefObject<OptimisticPulseControl | null>——
    onRollback() => void——
    status(required)OptimisticStatus——
  • OptimisticStatus type
    "idle" | "pending" | "confirmed" | "failed"
  • PendingTextProps type

    PendingTextProps

    PendingTextProps
    PropTypeDefaultDescription
    children(required)ReactNode——
    pendingboolean——

    Also accepts the props of: React DOM attributes.

  • ProgressBarProps type

    ProgressBarProps

    ProgressBarProps
    PropTypeDefaultDescription
    label(required)string—Accessible name (required).
    maxnumber——
    valuenumber—Known progress; omit for an indeterminate indicator (no aria-valuenow).
    valueTextstring—Human-readable value (aria-valuetext).

    Also accepts the props of: React DOM attributes.

  • ProgressRingProps type

    ProgressRingProps

    ProgressRingProps
    PropTypeDefaultDescription
    label(required)string—Accessible name (required).
    maxnumber——
    progressProgressSource—0–1 source (timeline value, scroll progress…): visual per frame, aria-valuenow on integer changes.
    sizestring2.5emCSS length (default 2.5em).
    valuenumber—Known progress; omit for an indeterminate indicator (no aria-valuenow).
    valueTextstring—Human-readable value (aria-valuetext).

    Also accepts the props of: React DOM attributes.

  • SkeletonShimmerProps type

    SkeletonShimmerProps

    SkeletonShimmerProps
    PropTypeDefaultDescription
    heightstring——
    shape"line" | "rect" | "circle"——
    widthstring——

    Also accepts the props of: React DOM attributes.

  • SuccessMarkProps type

    SuccessMarkProps

    SuccessMarkProps
    PropTypeDefaultDescription
    circleboolean——
    labelstring—Accessible name; omitted → decorative. It never announces (no live region).
    show(required)boolean—Draw the mark (only when the operation really succeeded).
    sizenumber40px (default 40).

    Also accepts the props of: React DOM attributes.

Edit on GitHub