BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/motiq/filter-result-transition

Filter Result Transition

motiq/filter-result-transition
FreeComponent

A transition layer for filtered/searched collections your app drives: cards enter, leave, and reorder with layout continuity, the result count morphs, and empty/loading/error states cross-fade. If the focused item is filtered out, onFocusFallback fires so focus never drops to the page root. Capped entrance stagger; results are never delayed for animation; reduced motion is an instant swap. Not a data table or a search library.

Live preview

live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.motiq.dev/r/filter-result-transition.json

Source

registry/data/filter-result-transition.tsxwww.motiq.dev/r/filter-result-transition.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import { motion, AnimatePresence, LayoutGroup } from "motion/react";
5
6import { cn } from "@/lib/utils";
7import { useReducedMotion, useAnimatedNumber, formatNumber } from "@/lib/motiq";
8
9/* -------------------------------------------------------------------------- */
10/* Types */
11/* -------------------------------------------------------------------------- */
12
13export type FilterLayout = "cards" | "list" | "grid";
14export type FilterResultState = "idle" | "loading" | "error";
15
16/**
17 * One active filter/facet the host applied. `id` is the stable removal key; the
18 * host removes it in `onRemoveFilter`. `group` labels the facet (e.g. "Status")
19 * so the chip and its accessible name stay unambiguous.
20 */
21export interface ActiveFilter {
22 /** Stable id passed back to `onRemoveFilter` (required). */
23 id: string;
24 /** Visible chip text (e.g. "Design"). */
25 label: string;
26 /** Optional facet name shown before the value (e.g. "Category"). */
27 group?: string;
28}
29
30/** Context handed to `renderItem` for each row. */
31export interface RenderItemContext {
32 /** Position in the current (post-filter) result set. */
33 index: number;
34 /** Active layout, in case the card adapts. */
35 layout: FilterLayout;
36 /** Whether this item matches `focusedItemId`. */
37 focused: boolean;
38}
39
40/** Context handed to `onFocusFallback` when the focused item disappears. */
41export interface FocusFallbackContext<T> {
42 /** The id that was focused and is now gone. */
43 previousId: string;
44 /** The stable results-region anchor (already `tabIndex=-1`). */
45 anchor: HTMLElement | null;
46 /** The surviving items after the change, for "focus the first result" logic. */
47 items: T[];
48}
49
50export interface FilterResultTransitionProps<T> {
51 /** The already-filtered/sorted items to show — the host owns filtering. */
52 items: T[];
53 /** Stable identity per item — the key to continuity + focus preservation. */
54 getItemId: (item: T) => string;
55 /** Render one result. Keep interactive controls inside the card, not nested. */
56 renderItem: (item: T, ctx: RenderItemContext) => React.ReactNode;
57
58 /** Card arrangement. `grid` reflows responsively; `list`/`cards` stack. */
59 layout?: FilterLayout;
60
61 /** Full override for the count line; receives the *morphing* integer. */
62 resultLabel?: (count: number) => React.ReactNode;
63 /** Plain-text count for the polite announcement (no nodes). */
64// … truncated

What it pulls in

npm packages

  • motion

Other registry items

  • https://motiq.dev/r/utils.json
  • https://motiq.dev/r/primitives.json

Files it writes

  • registry/data/filter-result-transition.tsx

Facts

Registry
motiq
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

Docs on motiq www.motiq.dev RMahammad/motiq on GitHub Raw registry item This item as JSON

More from motiq

All 100 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Activity Streamactivity-streammotiqComponentsFree1 dep
Adaptive Safe-Zone Gridadaptive-safe-zone-gridmotiqComponentsFreeno deps
Agent Run Timelineagent-run-timelinemotiqComponentsFree1 dep
AI Response Streamai-response-streammotiqComponentsFree1 dep
Animated Accordionanimated-accordionmotiqComponentsFree2 deps
Animated Buttonanimated-buttonmotiqComponentsFree1 dep
Animated Dialoganimated-dialogmotiqComponentsFree2 deps
Animated Gridanimated-gridmotiqComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex