{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "swipe-row",
  "title": "Swipe Row",
  "description": "Swipeable list rows with iOS-style reveal actions, full-swipe commits and floating cards, with layout-animated removal.",
  "dependencies": [
    "motion",
    "lucide-react"
  ],
  "registryDependencies": [
    "utils",
    "https://trytweenly.vercel.app/r/use-reduced-motion.json",
    "https://trytweenly.vercel.app/r/tweenly-theme.json"
  ],
  "files": [
    {
      "path": "registry/new-york/swipe-row/swipe-row.tsx",
      "content": "\"use client\"\n\nimport { useEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\"\nimport {\n  AnimatePresence,\n  animate,\n  motion,\n  useMotionValue,\n  useMotionValueEvent,\n  useSpring,\n  useTransform,\n  useVelocity,\n  type MotionValue,\n  type PanInfo,\n  type Transition,\n} from \"motion/react\"\nimport { Ellipsis } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\nimport { useReducedMotion } from \"@/registry/new-york/hooks/use-reduced-motion\"\n\nexport type SwipeRowVariant = \"reveal\" | \"full\" | \"card\"\n/** Direction the row was dragged. Dragging left reveals `rightActions`. */\nexport type SwipeDirection = \"left\" | \"right\"\n\nexport interface SwipeAction {\n  /** Stable identifier. */\n  id: string\n  /** Visible label and accessible name. */\n  label: string\n  /** Icon shown above the label. */\n  icon?: ReactNode\n  /** Background color of the action (any CSS color). Default: the row `accent` */\n  color?: string\n  /** Called when the action runs. */\n  onAction?: () => void\n  /** Removes the row after the action runs. Default: false */\n  destructive?: boolean\n}\n\nexport interface SwipeRowProps {\n  /** Row content. */\n  children?: ReactNode\n  /** Interaction style: iOS-style reveal, full-swipe commit, or floating cards. Default: \"reveal\" */\n  variant?: SwipeRowVariant\n  /** Actions revealed when dragging right, listed from the outer (left) edge inward. `full` and `card` commit the first one. Default: [] */\n  leftActions?: SwipeAction[]\n  /** Actions revealed when dragging left, listed from the outer (right) edge inward. `full` and `card` commit the first one. Default: [] */\n  rightActions?: SwipeAction[]\n  /** Drag distance, as a fraction of the row width, that commits a full swipe. Default: 0.4 */\n  threshold?: number\n  /** Rubber-band resistance past the drag limits (0 = rigid, 1 = free). Default: 0.5 */\n  elastic?: number\n  /** Vibrate briefly (where supported) when a swipe arms or commits. Default: true */\n  haptics?: boolean\n  /** Accent used for focus rings and actions without a color. Default: \"#ff4d12\" */\n  accent?: string\n  /** Corner radius of the row in px. Default: 14 */\n  radius?: number\n  /** Disable dragging and actions. Default: false */\n  disabled?: boolean\n  /** Called after an action runs, with the drag direction it belongs to. */\n  onSwipe?: (direction: SwipeDirection, action: SwipeAction) => void\n  /** Called once a destructive action has animated the row away. When omitted the row collapses itself. */\n  onRemove?: () => void\n  className?: string\n}\n\nconst ACTION_W = 76\nconst EASE_OUT = [0.22, 1, 0.36, 1] as const\nconst EASE_IN_OUT = [0.76, 0, 0.24, 1] as const\nconst snap: Transition = { type: \"spring\", stiffness: 460, damping: 36 }\nconst pop: Transition = { type: \"spring\", stiffness: 700, damping: 15, mass: 0.6 }\nconst layoutSpring: Transition = { type: \"spring\", stiffness: 500, damping: 40 }\nconst instant: Transition = { duration: 0 }\n\nfunction vibrate(enabled: boolean, pattern: number | number[] = 8) {\n  if (!enabled || typeof navigator === \"undefined\") return\n  navigator.vibrate?.(pattern)\n}\n\n/* --------------------------------------------------------------- reveal buttons */\n\nfunction RevealButton({\n  action,\n  index,\n  count,\n  side,\n  open,\n  x,\n  accent,\n  tabbable,\n  onPress,\n}: {\n  action: SwipeAction\n  index: number\n  count: number\n  side: \"left\" | \"right\"\n  open: number\n  x: MotionValue<number>\n  accent: string\n  tabbable: boolean\n  onPress: () => void\n}) {\n  const sign = side === \"right\" ? -1 : 1\n  // Each button trails the row edge proportionally so they fan out like iOS Mail\n  const tx = useTransform(x, (v) => (sign * v > 0 ? v : 0) * ((index + 1) / count))\n  const start = open * 0.12 * (count - 1 - index)\n  const progress = useTransform(x, [sign * start, sign * (start + open * 0.7)], [0, 1], { clamp: true })\n  const scale = useTransform(progress, [0, 1], [0.55, 1])\n  const opacity = useTransform(progress, [0, 0.35, 1], [0, 0.4, 1])\n  const w = open / count\n\n  return (\n    <motion.button\n      type=\"button\"\n      tabIndex={tabbable ? 0 : -1}\n      aria-hidden={!tabbable}\n      onClick={onPress}\n      className={cn(\n        \"absolute inset-y-0 flex items-center text-white outline-none focus-visible:brightness-110\",\n        side === \"right\" ? \"left-full justify-start\" : \"right-full justify-end\"\n      )}\n      style={{ x: tx, width: open + 480, background: action.color ?? accent, zIndex: count - index }}\n    >\n      <motion.span\n        className=\"flex flex-col items-center justify-center gap-1 text-[11px] font-medium\"\n        style={{ width: w, scale, opacity }}\n      >\n        {action.icon && <span className=\"grid size-5 place-items-center [&_svg]:size-[18px]\">{action.icon}</span>}\n        {action.label}\n      </motion.span>\n    </motion.button>\n  )\n}\n\n/* ------------------------------------------------------------ swipe background */\n\nfunction CommitLayer({\n  action,\n  dir,\n  armed,\n  x,\n  thresholdPx,\n  accent,\n  card,\n  reduced,\n}: {\n  action: SwipeAction | undefined\n  dir: SwipeDirection | null\n  armed: boolean\n  x: MotionValue<number>\n  thresholdPx: number\n  accent: string\n  card: boolean\n  reduced: boolean\n}) {\n  const color = action?.color ?? accent\n  const tint = useTransform(x, (v) => Math.min(Math.abs(v) / Math.max(thresholdPx, 1), 1) * (card ? 0.22 : 0.16))\n  // The icon waits at the edge until the threshold, then rides along with the row\n  const iconX = useTransform(x, (v) => (card ? 0 : v < -thresholdPx ? v + thresholdPx : v > thresholdPx ? v - thresholdPx : 0))\n  const iconIn = useTransform(x, (v) => Math.min(Math.abs(v) / Math.max(thresholdPx * 0.45, 1), 1))\n  const side = dir === \"left\" ? \"right\" : \"left\"\n\n  if (!action || !dir) return null\n  return (\n    <div aria-hidden className={cn(\"absolute inset-0 overflow-hidden\", card ? \"rounded-[inherit]\" : \"bg-foreground/[0.05]\")}>\n      <motion.div className=\"absolute inset-0\" style={{ background: color, opacity: tint }} />\n      <motion.div\n        className=\"absolute top-1/2 size-[260%] -translate-y-1/2 rounded-full\"\n        style={{\n          background: color,\n          [side]: 44,\n          translateX: side === \"right\" ? \"50%\" : \"-50%\",\n        }}\n        initial={false}\n        animate={{ scale: armed ? 1 : 0 }}\n        transition={reduced ? instant : { type: \"spring\", stiffness: 420, damping: 38 }}\n      />\n      <motion.div\n        className={cn(\"absolute inset-y-0 flex items-center\", side === \"right\" ? \"right-5\" : \"left-5\")}\n        style={{ x: iconX, opacity: iconIn }}\n      >\n        <motion.div\n          className={cn(\n            \"flex flex-col items-center gap-1 text-[11px] font-medium transition-colors duration-150 [&_svg]:size-5\",\n            card && \"rounded-2xl px-3 py-2\",\n            armed ? \"text-white\" : \"text-muted-foreground\"\n          )}\n          style={card && armed ? { background: color } : undefined}\n          initial={false}\n          animate={{ scale: armed ? 1.12 : 0.9 }}\n          transition={reduced ? instant : pop}\n        >\n          {action.icon}\n          <span>{action.label}</span>\n        </motion.div>\n      </motion.div>\n    </div>\n  )\n}\n\n/* ------------------------------------------------------------------- SwipeRow */\n\nexport function SwipeRow({\n  children,\n  variant = \"reveal\",\n  leftActions = [],\n  rightActions = [],\n  threshold = 0.4,\n  elastic = 0.5,\n  haptics = true,\n  accent = \"#ff4d12\",\n  radius = 14,\n  disabled = false,\n  onSwipe,\n  onRemove,\n  className,\n}: SwipeRowProps) {\n  const reduced = useReducedMotion()\n  const rootRef = useRef<HTMLDivElement>(null)\n  const movedRef = useRef(false)\n  const armedRef = useRef(false)\n  const dirRef = useRef<SwipeDirection | null>(null)\n  const [width, setWidth] = useState(0)\n  const [openSide, setOpenSide] = useState<\"left\" | \"right\" | null>(null)\n  const [menuOpen, setMenuOpen] = useState(false)\n  const [armed, setArmed] = useState(false)\n  const [dir, setDir] = useState<SwipeDirection | null>(null)\n  const [removed, setRemoved] = useState(false)\n  const [busy, setBusy] = useState(false)\n\n  const x = useMotionValue(0)\n  const velocity = useVelocity(x)\n  const tiltTarget = useTransform(velocity, [-1600, 0, 1600], [-7, 0, 7], { clamp: true })\n  const tilt = useSpring(tiltTarget, { stiffness: 400, damping: 30 })\n\n  const rowWidth = width || 360\n  const thresholdPx = Math.max(24, Math.min(threshold, 0.95) * rowWidth)\n  const openLeft = leftActions.length * ACTION_W\n  const openRight = rightActions.length * ACTION_W\n  const hasActions = leftActions.length + rightActions.length > 0\n  const isCard = variant === \"card\"\n  const spring = reduced ? instant : snap\n\n  useEffect(() => {\n    const el = rootRef.current\n    if (!el) return\n    const ro = new ResizeObserver(([entry]) => setWidth(entry.contentRect.width))\n    ro.observe(el)\n    return () => ro.disconnect()\n  }, [])\n\n  // Tap outside closes an open row or menu\n  useEffect(() => {\n    if (!openSide && !menuOpen) return\n    const onDown = (e: PointerEvent) => {\n      if (rootRef.current?.contains(e.target as Node)) return\n      setOpenSide(null)\n      setMenuOpen(false)\n      animate(x, 0, reduced ? instant : snap)\n    }\n    document.addEventListener(\"pointerdown\", onDown)\n    return () => document.removeEventListener(\"pointerdown\", onDown)\n  }, [openSide, menuOpen, reduced, x])\n\n  useMotionValueEvent(x, \"change\", (v) => {\n    const d: SwipeDirection | null = v < -0.5 ? \"left\" : v > 0.5 ? \"right\" : null\n    if (d !== dirRef.current) {\n      dirRef.current = d\n      setDir(d)\n    }\n  })\n\n  const snapTo = (side: \"left\" | \"right\" | null) => {\n    setOpenSide(side)\n    animate(x, side === \"right\" ? -openRight : side === \"left\" ? openLeft : 0, spring)\n  }\n\n  const setArmedState = (next: boolean) => {\n    if (next === armedRef.current) return\n    armedRef.current = next\n    setArmed(next)\n    if (next) vibrate(haptics, 10)\n  }\n\n  const run = async (direction: SwipeDirection, action: SwipeAction) => {\n    setMenuOpen(false)\n    if (action.destructive) {\n      setBusy(true)\n      vibrate(haptics, [6, 30, 12])\n      const off = (direction === \"left\" ? -1 : 1) * rowWidth * (isCard ? 1.35 : 1.1)\n      await animate(x, off, reduced ? instant : { duration: 0.32, ease: EASE_IN_OUT })\n      action.onAction?.()\n      onSwipe?.(direction, action)\n      if (onRemove) onRemove()\n      else setRemoved(true)\n      return\n    }\n    vibrate(haptics, 8)\n    action.onAction?.()\n    onSwipe?.(direction, action)\n    setOpenSide(null)\n    setArmedState(false)\n    animate(x, 0, spring)\n  }\n\n  const primary = (d: SwipeDirection | null) => (d === \"left\" ? rightActions[0] : d === \"right\" ? leftActions[0] : undefined)\n\n  const onDrag = (_: unknown, info: PanInfo) => {\n    if (variant === \"reveal\") return\n    const d: SwipeDirection = info.offset.x < 0 ? \"left\" : \"right\"\n    setArmedState(!!primary(d) && Math.abs(info.offset.x) >= thresholdPx)\n  }\n\n  const onDragEnd = (_: unknown, info: PanInfo) => {\n    const vx = info.velocity.x\n    if (variant === \"reveal\") {\n      const projected = x.get() + vx * 0.18\n      if (openRight && projected < -openRight / 2) snapTo(\"right\")\n      else if (openLeft && projected > openLeft / 2) snapTo(\"left\")\n      else snapTo(null)\n      return\n    }\n    const off = info.offset.x\n    const d: SwipeDirection = off < 0 ? \"left\" : \"right\"\n    const action = primary(d)\n    const flung = Math.abs(vx) > 900 && Math.sign(vx) === Math.sign(off) && Math.abs(off) > thresholdPx * 0.4\n    if (action && (armedRef.current || flung)) {\n      void run(d, action)\n      armedRef.current = false\n      if (!action.destructive) setArmed(false)\n      return\n    }\n    setArmedState(false)\n    animate(x, 0, spring)\n  }\n\n  const toggleKeyboard = () => {\n    if (variant === \"reveal\") snapTo(openSide ? null : openRight ? \"right\" : \"left\")\n    else setMenuOpen((o) => !o)\n  }\n\n  const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n    if (disabled || busy || e.target !== e.currentTarget) return\n    if (e.key === \"Escape\") {\n      if (variant === \"reveal\") snapTo(null)\n      setMenuOpen(false)\n    } else if (variant === \"reveal\" && e.key === \"ArrowLeft\" && openRight) {\n      e.preventDefault()\n      snapTo(openSide === \"left\" ? null : \"right\")\n    } else if (variant === \"reveal\" && e.key === \"ArrowRight\" && openLeft) {\n      e.preventDefault()\n      snapTo(openSide === \"right\" ? null : \"left\")\n    } else if (variant !== \"reveal\" && (e.key === \"ArrowLeft\" || e.key === \"ArrowRight\")) {\n      e.preventDefault()\n      setMenuOpen(true)\n    }\n  }\n\n  const constraints =\n    variant === \"reveal\"\n      ? { left: -openRight, right: openLeft }\n      : variant === \"full\"\n        ? { left: rightActions.length ? -rowWidth : 0, right: leftActions.length ? rowWidth : 0 }\n        : { left: 0, right: 0 }\n\n  const menuActions: { action: SwipeAction; direction: SwipeDirection }[] = [\n    ...leftActions.map((action) => ({ action, direction: \"right\" as const })),\n    ...rightActions.map((action) => ({ action, direction: \"left\" as const })),\n  ]\n\n  return (\n    <motion.div\n      ref={rootRef}\n      initial={false}\n      animate={removed ? { height: 0, opacity: 0 } : { height: \"auto\", opacity: 1 }}\n      transition={reduced ? instant : layoutSpring}\n      className={cn(\"relative isolate\", isCard ? \"overflow-visible\" : \"overflow-hidden\", className)}\n      style={{ borderRadius: isCard ? undefined : radius, \"--swipe-accent\": accent } as React.CSSProperties}\n    >\n      <div className=\"relative\" style={isCard ? { borderRadius: radius } : undefined}>\n        {/* Foreground (draggable) */}\n        <motion.div\n          drag={disabled || busy || !hasActions ? false : \"x\"}\n          dragConstraints={constraints}\n          dragElastic={elastic}\n          dragMomentum={false}\n          dragDirectionLock\n          whileDrag={isCard && !reduced ? { scale: 1.02 } : undefined}\n          onPointerDown={() => {\n            movedRef.current = false\n          }}\n          onDragStart={() => {\n            movedRef.current = true\n            setMenuOpen(false)\n          }}\n          onDrag={onDrag}\n          onDragEnd={onDragEnd}\n          onClickCapture={(e) => {\n            if (movedRef.current || openSide) {\n              e.preventDefault()\n              e.stopPropagation()\n            }\n            if (!movedRef.current && openSide) snapTo(null)\n          }}\n          tabIndex={disabled ? -1 : 0}\n          role=\"group\"\n          aria-roledescription=\"swipeable row\"\n          aria-label={hasActions ? \"Swipe or press the arrow keys for actions\" : undefined}\n          onKeyDown={onKeyDown}\n          className={cn(\n            \"group/row relative z-10 cursor-grab touch-pan-y select-none bg-card outline-none active:cursor-grabbing\",\n            \"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--swipe-accent)]\",\n            isCard && \"shadow-sm ring-1 ring-border\",\n            disabled && \"cursor-default opacity-60\"\n          )}\n          style={{\n            x,\n            rotate: isCard && !reduced ? tilt : 0,\n            borderRadius: isCard ? radius : undefined,\n          }}\n        >\n          {children}\n\n          {hasActions && !disabled && (\n            <button\n              type=\"button\"\n              aria-label=\"Show actions\"\n              aria-expanded={variant === \"reveal\" ? !!openSide : menuOpen}\n              onClick={toggleKeyboard}\n              className={cn(\n                \"absolute right-2 top-1/2 grid size-7 -translate-y-1/2 place-items-center rounded-full bg-panel text-muted-foreground opacity-0 shadow-sm ring-1 ring-border outline-none transition-opacity duration-150\",\n                \"hover:text-foreground focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-[var(--swipe-accent)] group-focus-visible/row:opacity-100 [@media(hover:hover)]:group-hover/row:opacity-100\",\n                (openSide || menuOpen) && \"opacity-100\"\n              )}\n            >\n              <Ellipsis className=\"size-4\" />\n            </button>\n          )}\n\n          <AnimatePresence>\n            {menuOpen && (\n              <motion.div\n                role=\"menu\"\n                aria-label=\"Row actions\"\n                initial={{ opacity: 0, x: 12, scale: 0.94 }}\n                animate={{ opacity: 1, x: 0, scale: 1 }}\n                exit={{ opacity: 0, x: 8, scale: 0.96, transition: { duration: 0.14 } }}\n                transition={reduced ? instant : { duration: 0.28, ease: EASE_OUT }}\n                onKeyDown={(e) => {\n                  if (e.key === \"Escape\") {\n                    setMenuOpen(false)\n                    rootRef.current?.querySelector<HTMLElement>(\"[aria-roledescription]\")?.focus()\n                  }\n                }}\n                className=\"absolute right-11 top-1/2 z-20 flex -translate-y-1/2 origin-right items-center gap-1 rounded-full bg-panel p-1 shadow-lg ring-1 ring-border\"\n              >\n                {menuActions.map(({ action, direction }, i) => (\n                  <button\n                    key={action.id}\n                    type=\"button\"\n                    role=\"menuitem\"\n                    autoFocus={i === 0}\n                    onClick={() => void run(direction, action)}\n                    className=\"flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium text-white outline-none focus-visible:ring-2 focus-visible:ring-foreground/40 [&_svg]:size-3.5\"\n                    style={{ background: action.color ?? accent }}\n                  >\n                    {action.icon}\n                    {action.label}\n                  </button>\n                ))}\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </motion.div>\n\n        {/* Background actions */}\n        {variant === \"reveal\" ? (\n          <div className=\"absolute inset-0 z-0 bg-foreground/[0.05]\">\n            {rightActions.map((action, i) => (\n              <RevealButton\n                key={action.id}\n                action={action}\n                index={i}\n                count={rightActions.length}\n                side=\"right\"\n                open={openRight}\n                x={x}\n                accent={accent}\n                tabbable={openSide === \"right\"}\n                onPress={() => void run(\"left\", action)}\n              />\n            ))}\n            {leftActions.map((action, i) => (\n              <RevealButton\n                key={action.id}\n                action={action}\n                index={i}\n                count={leftActions.length}\n                side=\"left\"\n                open={openLeft}\n                x={x}\n                accent={accent}\n                tabbable={openSide === \"left\"}\n                onPress={() => void run(\"right\", action)}\n              />\n            ))}\n          </div>\n        ) : (\n          <CommitLayer\n            action={primary(dir)}\n            dir={dir}\n            armed={armed}\n            x={x}\n            thresholdPx={thresholdPx}\n            accent={accent}\n            card={isCard}\n            reduced={reduced}\n          />\n        )}\n      </div>\n    </motion.div>\n  )\n}\n\n/* ------------------------------------------------------------------ SwipeList */\n\ntype RowPassthrough = Omit<SwipeRowProps, \"children\" | \"leftActions\" | \"rightActions\" | \"onSwipe\" | \"onRemove\" | \"className\">\n\nexport interface SwipeListProps<T> extends RowPassthrough {\n  /** Items to render. Removed items animate out and the rest glide into place. */\n  items: T[]\n  /** Returns a stable key for an item. */\n  getKey: (item: T) => string | number\n  /** Renders the content of a row. */\n  renderItem: (item: T, index: number) => ReactNode\n  /** Actions revealed when dragging right, or a function returning them per item. Default: [] */\n  leftActions?: SwipeAction[] | ((item: T) => SwipeAction[])\n  /** Actions revealed when dragging left, or a function returning them per item. Default: [] */\n  rightActions?: SwipeAction[] | ((item: T) => SwipeAction[])\n  /** Called after an action runs on an item. */\n  onSwipe?: (direction: SwipeDirection, action: SwipeAction, item: T) => void\n  /** Called when a destructive action removes an item. The list hides it immediately either way. */\n  onRemove?: (item: T) => void\n  /** Shown when every item has been removed. */\n  emptyState?: ReactNode\n  /** Space between card rows in px (card variant). Default: 8 */\n  gap?: number\n  /** Classes for each row. */\n  rowClassName?: string\n  className?: string\n}\n\nexport function SwipeList<T>({\n  items,\n  getKey,\n  renderItem,\n  leftActions = [],\n  rightActions = [],\n  onSwipe,\n  onRemove,\n  emptyState,\n  gap = 8,\n  rowClassName,\n  className,\n  variant = \"reveal\",\n  radius = 14,\n  ...rowProps\n}: SwipeListProps<T>) {\n  const reduced = useReducedMotion()\n  const [hidden, setHidden] = useState<ReadonlySet<string | number>>(() => new Set())\n  const [prevItems, setPrevItems] = useState(items)\n  if (prevItems !== items) {\n    setPrevItems(items)\n    setHidden(new Set())\n  }\n\n  const visible = items.filter((item) => !hidden.has(getKey(item)))\n  const isCard = variant === \"card\"\n  const transition = reduced ? instant : layoutSpring\n  const resolve = (a: SwipeAction[] | ((item: T) => SwipeAction[]), item: T) => (typeof a === \"function\" ? a(item) : a)\n\n  return (\n    <div className={cn(\"relative w-full\", className)}>\n      <motion.ul\n        layout\n        transition={transition}\n        className={cn(\"relative flex flex-col\", !isCard && visible.length > 0 && \"overflow-hidden bg-card shadow-sm ring-1 ring-border\")}\n        style={{ borderRadius: isCard ? undefined : radius, gap: isCard ? gap : 0 }}\n      >\n        <AnimatePresence initial={false} mode=\"popLayout\">\n          {visible.map((item, i) => {\n            const key = getKey(item)\n            return (\n              <motion.li\n                key={key}\n                layout=\"position\"\n                transition={transition}\n                exit={{ opacity: 0, transition: { duration: reduced ? 0 : 0.18 } }}\n                className={cn(\"relative\", !isCard && i > 0 && \"border-t\")}\n              >\n                <SwipeRow\n                  {...rowProps}\n                  variant={variant}\n                  radius={isCard ? radius : 0}\n                  leftActions={resolve(leftActions, item)}\n                  rightActions={resolve(rightActions, item)}\n                  onSwipe={(direction, action) => onSwipe?.(direction, action, item)}\n                  onRemove={() => {\n                    setHidden((prev) => new Set(prev).add(key))\n                    onRemove?.(item)\n                  }}\n                  className={rowClassName}\n                >\n                  {renderItem(item, i)}\n                </SwipeRow>\n              </motion.li>\n            )\n          })}\n        </AnimatePresence>\n      </motion.ul>\n\n      <AnimatePresence initial={false}>\n        {visible.length === 0 && emptyState != null && (\n          <motion.div\n            key=\"empty\"\n            initial={{ opacity: 0, y: 8 }}\n            animate={{ opacity: 1, y: 0 }}\n            exit={{ opacity: 0, transition: { duration: 0.12 } }}\n            transition={reduced ? instant : { duration: 0.4, ease: EASE_OUT, delay: 0.1 }}\n          >\n            {emptyState}\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </div>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "docs": "Docs, live playground and every prop: https://trytweenly.vercel.app/docs/components/swipe-row",
  "type": "registry:component"
}