@neshel-ui/animations/feedback
Every export of @neshel-ui/animations/feedback, generated from its declarations.
Experimental and not on npm
Signatures, members and defaults, generated from the built declarations. For explanations and examples read the guide.
DotsPulsecomponentF04 — three pulsing dots (indeterminate); slow opacity under reduced motion.
({ label, decorative, size, className, style, ...rest }: IndicatorProps): ElementEnterExitcomponentF06 — 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): ElementLoadingButtoncomponentF07 — loading morph on the single button child (same element, name and focus; no double activation).
({ loading, children, controlRef }: LoadingButtonProps): ElementOptimisticPulsecomponentF08 — pending/confirmed/failed states on the single child; `failed` calls `onRollback`.
({ status, onRollback, children, controlRef, }: OptimisticPulseProps): ElementPendingTextcomponentF10 — the text stays one readable text; a light band sweeps while `pending`.
({ pending, className, children, ...rest }: PendingTextProps): ElementProgressBarcomponentF03 — progress bar: determinate with a real value, indeterminate sweep otherwise.
({ label, value, max, valueText, className, style, ...rest }: ProgressBarProps): ElementProgressRingcomponentF09 — progress ring (`pathLength`-normalised SVG; transitions are package CSS).
(props: ProgressRingProps): ElementShimmercomponentF02 — adds the `shimmer` token to the single child (e.g. a Components `Skeleton`); `::after` sweep.
({ children }: { children: ReactElement<unknown, string | JSXElementConstructor<any>>; }): ElementSkeletonShimmercomponentF02 — a decorative placeholder with a shimmer (`aria-hidden`; mark the region `aria-busy`).
({ width, height, shape, className, style, ...rest }: SkeletonShimmerProps): ElementSpinnercomponentF01 — indeterminate spinner (`role="progressbar"`, no value); slow pulse under reduced motion.
({ label, decorative, size, className, style, ...rest }: IndicatorProps): ElementSuccessMarkcomponentF05 — success check drawn when `show` becomes true (shape shared with S10 through core).
({ show, label, size, circle, className, ...rest }: SuccessMarkProps): ElementcreateEnterExitfunctionAnimate 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): EnterExitControlcreateLoadingButtonfunctionF07 — 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): LoadingButtonControlcreateOptimisticPulsefunctionF08 — 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): OptimisticPulseControlgetFeedbackDebugInfofunctionLive feedback counters (tests, lab).
(): FeedbackDebugInfoEnterExitControlinterfaceEnterExitControl
EnterExitControl Prop Type Default Description destroy(required) () => void— Idempotent: stops observing and restores every item's styles. size(required) number— Items currently tracked. update(required) (options: EnterExitOptions) => void— — EnterExitOptionsinterfaceEnterExitOptions
EnterExitOptions Prop Type Default Description distance number— Travel in px (0–200, default 12). duration number | DurationPreset220Duration in ms or a motionDefaults.durationpreset (default 220).exitTo EnterExitSide"end"Side the items leave towards (default "end").from EnterExitSide"bottom"Side the items enter from (default "bottom"; logical start/end follow the writing direction).reducedMotion ReducedMotion"user"Reduced-motion policy (default "user"): reduced → opacity only.selector string"[data-state]"Items to animate inside the container (default "[data-state]").FeedbackDebugInfointerfaceFeedbackDebugInfo
FeedbackDebugInfo Prop Type Default Description enterExit(required) number— — loadingButtons(required) number— — optimistic(required) number— — LoadingButtonControlinterfaceLoadingButtonControl
LoadingButtonControl Prop Type Default Description destroy(required) () => void— — loading(required) boolean— — set(required) (loading: boolean) => void— — LoadingButtonOptionsinterfaceLoadingButtonOptions
LoadingButtonOptions Prop Type Default Description loading booleanfalseInitial state (default false). NeshelExitDetailinterfaceNeshelExitDetail
Detail of the
neshel-exitevent a list owner dispatches on an item before removing it.NeshelExitDetail Prop Type Default Description waitUntil(required) (promise: Promise<unknown>) => void— — OptimisticPulseControlinterfaceOptimisticPulseControl
OptimisticPulseControl Prop Type Default Description destroy(required) () => void— — set(required) (status: OptimisticStatus) => void— — status(required) OptimisticStatus— — OptimisticPulseOptionsinterfaceOptimisticPulseOptions
OptimisticPulseOptions Prop Type Default Description onRollback () => void— Called when the status becomes failed(undo the optimistic change).status OptimisticStatus— — ProgressSourceinterfaceProgressSource
Any 0–1 progress source (the 011
ScrollProgressand motion values fit).ProgressSource Prop Type Default Description get(required) () => number— — subscribe(required) (listener: (progress: number) => void) => () => void— — EnterExitPropstypeEnterExitProps
EnterExitProps Prop Type Default Description children(required) ReactElement— One element: the list container (e.g. a Components <Toaster motion="none">).distance number— Travel in px (0–200, default 12). duration number | DurationPreset220Duration in ms or a motionDefaults.durationpreset (default 220).exitTo EnterExitSide"end"Side the items leave towards (default "end").from EnterExitSide"bottom"Side the items enter from (default "bottom"; logical start/end follow the writing direction).reducedMotion ReducedMotion"user"Reduced-motion policy (default "user"): reduced → opacity only.selector string"[data-state]"Items to animate inside the container (default "[data-state]").EnterExitSidetype"bottom" | "top" | "start" | "end"LoadingButtonPropstypeLoadingButtonProps
LoadingButtonProps Prop Type Default Description children(required) ReactElement— One button element (e.g. a Components Buttonwithout itsloadingprop).controlRef RefObject<LoadingButtonControl | null>— — loading(required) boolean— — OptimisticPulsePropstypeOptimisticPulseProps
OptimisticPulseProps Prop Type Default Description children(required) ReactElement— — controlRef RefObject<OptimisticPulseControl | null>— — onRollback () => void— — status(required) OptimisticStatus— — OptimisticStatustype"idle" | "pending" | "confirmed" | "failed"PendingTextPropstypePendingTextProps
PendingTextProps Prop Type Default Description children(required) ReactNode— — pending boolean— — Also accepts the props of: React DOM attributes.
ProgressBarPropstypeProgressBarProps
ProgressBarProps Prop Type Default Description label(required) string— Accessible name (required). max number— — value number— Known progress; omit for an indeterminate indicator (no aria-valuenow).valueText string— Human-readable value ( aria-valuetext).Also accepts the props of: React DOM attributes.
ProgressRingPropstypeProgressRingProps
ProgressRingProps Prop Type Default Description label(required) string— Accessible name (required). max number— — progress ProgressSource— 0–1 source (timeline value, scroll progress…): visual per frame, aria-valuenowon integer changes.size string2.5emCSS length (default 2.5em). value number— Known progress; omit for an indeterminate indicator (no aria-valuenow).valueText string— Human-readable value ( aria-valuetext).Also accepts the props of: React DOM attributes.
SkeletonShimmerPropstypeSkeletonShimmerProps
SkeletonShimmerProps Prop Type Default Description height string— — shape "line" | "rect" | "circle"— — width string— — Also accepts the props of: React DOM attributes.
SuccessMarkPropstypeSuccessMarkProps
SuccessMarkProps Prop Type Default Description circle boolean— — label string— Accessible name; omitted → decorative. It never announces (no live region). show(required) boolean— Draw the mark (only when the operation really succeeded). size number40px (default 40). Also accepts the props of: React DOM attributes.