{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feel-auto",
  "title": "Feel Auto",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "Picks the platform feel for you: macOS, iOS, Windows or web, from the device, before the first paint. All four feels are included and a user's override is remembered.",
  "registryDependencies": [
    "https://ui.ballmac.com/r/feel-presets.json"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/feel-script.tsx",
      "content": "// Ballmac UI: Feel Script. https://ui.ballmac.com/docs/feels\nimport { feelScript } from \"@/lib/ballmac/feel\"\n\n/**\n * Put this once in the document head. It sets `data-feel` on `<html>` before the first paint, from the remembered choice or the\n * device's own platform, so the right feel is there from the first frame. In Next.js, render it inside `<head>` in the root\n * layout and add `suppressHydrationWarning` to `<html>`.\n */\nexport function FeelScript() {\n  return <script dangerouslySetInnerHTML={{ __html: feelScript }} />\n}\n",
      "type": "registry:ui",
      "target": "@components/ballmac/feel-script.tsx"
    }
  ],
  "cssVars": {
    "theme": {
      "shadow-xs": "var(--bm-shadow-xs)",
      "shadow-sm": "var(--bm-shadow-sm)",
      "shadow-md": "var(--bm-shadow-md)",
      "shadow-lg": "var(--bm-shadow-lg)",
      "shadow-xl": "var(--bm-shadow-xl)",
      "shadow-2xl": "var(--bm-shadow-2xl)",
      "text-xs": "var(--bm-text-xs)",
      "text-xs--line-height": "var(--bm-text-xs-lh)",
      "text-sm": "var(--bm-text-sm)",
      "text-sm--line-height": "var(--bm-text-sm-lh)",
      "text-base": "var(--bm-text-base)",
      "text-base--line-height": "var(--bm-text-base-lh)"
    }
  },
  "css": {
    "[data-feel=\"web\"]": {
      "--radius": "0.625rem",
      "--bm-speed": "1",
      "--bm-bounce": "0.25",
      "--bm-travel": "1",
      "--bm-hover": "1",
      "--bm-stagger": "1",
      "--bm-ambient": "1",
      "--bm-ambient-state": "running",
      "--bm-ease-out": "cubic-bezier(0.22, 1, 0.36, 1)",
      "--bm-ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)",
      "--bm-ease-in": "cubic-bezier(0.55, 0, 1, 0.45)",
      "--bm-ease-spring": "linear(0, 0.0168, 0.0608, 0.1231, 0.1971, 0.2773, 0.3594, 0.4403, 0.5178, 0.5902, 0.6566, 0.7164, 0.7695, 0.816, 0.856, 0.8901, 0.9187, 0.9423, 0.9615, 0.9769, 0.989, 0.9982, 1.005, 1.0099, 1.0131, 1.0151, 1.0161, 1.0163, 1.0159, 1.0151, 1.0141, 1.0128, 1.0115, 1.0102, 1.0089, 1.0076, 1.0064, 1.0054, 1.0044, 1.0036, 1)",
      "--bm-duration-fast": "calc(140ms / var(--bm-speed))",
      "--bm-duration-base": "calc(220ms / var(--bm-speed))",
      "--bm-duration-slow": "calc(320ms / var(--bm-speed))",
      "--bm-duration-reveal": "calc(600ms / var(--bm-speed))",
      "--bm-distance": "10px",
      "--bm-lift": "-2px",
      "--bm-press": "0.97",
      "--bm-stagger-step": "calc(50ms * var(--bm-stagger) / var(--bm-speed))",
      "--bm-shadow-xs": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
      "--bm-shadow-sm": "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
      "--bm-shadow-md": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
      "--bm-shadow-lg": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
      "--bm-shadow-xl": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
      "--bm-shadow-2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
      "--bm-shadow-popover": "0 12px 36px -10px rgb(0 0 0 / 0.25)",
      "--bm-text-xs": "0.75rem",
      "--bm-text-xs-lh": "calc(1 / 0.75)",
      "--bm-text-sm": "0.875rem",
      "--bm-text-sm-lh": "calc(1.25 / 0.875)",
      "--bm-text-base": "1rem",
      "--bm-text-base-lh": "calc(1.5 / 1)",
      "--bm-focus-width": "3px",
      "--bm-focus-alpha": "50%",
      "--bm-focus-color": "var(--ring)",
      "--bm-control-h": "calc(var(--spacing) * 9)",
      "--bm-control-h-sm": "calc(var(--spacing) * 8)",
      "--bm-control-h-lg": "calc(var(--spacing) * 11)",
      "--bm-target-min": "0px",
      "--bm-check-size": "calc(var(--spacing) * 4)",
      "--bm-switch-w": "calc(var(--spacing) * 9)",
      "--bm-switch-h": "calc(var(--spacing) * 5)",
      "--bm-press-dim": "1",
      "--bm-material-blur": "0px",
      "--bm-material-alpha": "100%",
      "--bm-sidebar-item-h": "2rem",
      "--bm-sidebar-item-radius": "calc(var(--radius) - 2px)",
      "--bm-sidebar-indicator": "0px",
      "--bm-menu-item-h": "2rem",
      "--bm-menu-item-radius": "calc(var(--radius) - 4px)",
      "--bm-menu-pad": "0.25rem",
      "--bm-scrollbar-width": "auto",
      "--bm-titlebar-h": "2.5rem",
      "--bm-toolbar-h": "52px",
      "--spacing": "0.25rem"
    },
    "[data-feel=\"macos\"]": {
      "--radius": "0.375rem",
      "--bm-speed": "1",
      "--bm-bounce": "0.25",
      "--bm-travel": "1",
      "--bm-hover": "1",
      "--bm-stagger": "1",
      "--bm-ambient": "1",
      "--bm-ambient-state": "running",
      "--bm-ease-out": "cubic-bezier(0.22, 1, 0.36, 1)",
      "--bm-ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)",
      "--bm-ease-in": "cubic-bezier(0.55, 0, 1, 0.45)",
      "--bm-ease-spring": "linear(0, 0.0168, 0.0608, 0.1231, 0.1971, 0.2773, 0.3594, 0.4403, 0.5178, 0.5902, 0.6566, 0.7164, 0.7695, 0.816, 0.856, 0.8901, 0.9187, 0.9423, 0.9615, 0.9769, 0.989, 0.9982, 1.005, 1.0099, 1.0131, 1.0151, 1.0161, 1.0163, 1.0159, 1.0151, 1.0141, 1.0128, 1.0115, 1.0102, 1.0089, 1.0076, 1.0064, 1.0054, 1.0044, 1.0036, 1)",
      "--bm-duration-fast": "calc(140ms / var(--bm-speed))",
      "--bm-duration-base": "calc(220ms / var(--bm-speed))",
      "--bm-duration-slow": "calc(320ms / var(--bm-speed))",
      "--bm-duration-reveal": "calc(600ms / var(--bm-speed))",
      "--bm-distance": "10px",
      "--bm-lift": "-2px",
      "--bm-press": "0.97",
      "--bm-stagger-step": "calc(50ms * var(--bm-stagger) / var(--bm-speed))",
      "--bm-shadow-xs": "0 0.5px 1px rgb(0 0 0 / 0.08), 0 0 0 0.5px rgb(0 0 0 / 0.04)",
      "--bm-shadow-sm": "0 1px 3px rgb(0 0 0 / 0.12), 0 0 0 0.5px rgb(0 0 0 / 0.06)",
      "--bm-shadow-md": "0 4px 12px -2px rgb(0 0 0 / 0.14), 0 0 0 0.5px rgb(0 0 0 / 0.06)",
      "--bm-shadow-lg": "0 12px 32px -6px rgb(0 0 0 / 0.22), 0 0 0 0.5px rgb(0 0 0 / 0.08)",
      "--bm-shadow-xl": "0 20px 48px -8px rgb(0 0 0 / 0.26), 0 0 0 0.5px rgb(0 0 0 / 0.08)",
      "--bm-shadow-2xl": "0 28px 64px -12px rgb(0 0 0 / 0.32), 0 0 0 0.5px rgb(0 0 0 / 0.1)",
      "--bm-shadow-popover": "0 8px 30px rgb(0 0 0 / 0.22), 0 0 0 0.5px rgb(0 0 0 / 0.12)",
      "--bm-text-xs": "0.6875rem",
      "--bm-text-xs-lh": "0.875rem",
      "--bm-text-sm": "0.8125rem",
      "--bm-text-sm-lh": "1.125rem",
      "--bm-text-base": "0.9375rem",
      "--bm-text-base-lh": "1.375rem",
      "--bm-focus-width": "3px",
      "--bm-focus-alpha": "50%",
      "--bm-focus-color": "var(--ring)",
      "--bm-control-h": "1.75rem",
      "--bm-control-h-sm": "1.5rem",
      "--bm-control-h-lg": "2rem",
      "--bm-target-min": "0px",
      "--bm-check-size": "0.875rem",
      "--bm-switch-w": "2.375rem",
      "--bm-switch-h": "1.375rem",
      "--bm-press-dim": "1",
      "--bm-material-blur": "24px",
      "--bm-material-alpha": "78%",
      "--bm-sidebar-item-h": "1.75rem",
      "--bm-sidebar-item-radius": "0.375rem",
      "--bm-sidebar-indicator": "0px",
      "--bm-menu-item-h": "1.5rem",
      "--bm-menu-item-radius": "0.3125rem",
      "--bm-menu-pad": "0.3125rem",
      "--bm-scrollbar-width": "thin",
      "--bm-titlebar-h": "2.75rem",
      "--bm-toolbar-h": "52px",
      "--spacing": "0.225rem"
    },
    "[data-feel=\"ios\"]": {
      "--radius": "0.75rem",
      "--bm-speed": "1.1",
      "--bm-bounce": "0.55",
      "--bm-travel": "1.1",
      "--bm-hover": "0",
      "--bm-stagger": "1.1",
      "--bm-ambient": "1",
      "--bm-ambient-state": "running",
      "--bm-ease-out": "cubic-bezier(0.22, 1, 0.36, 1)",
      "--bm-ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)",
      "--bm-ease-in": "cubic-bezier(0.55, 0, 1, 0.45)",
      "--bm-ease-spring": "linear(0, 0.026, 0.0947, 0.1927, 0.3084, 0.4319, 0.5553, 0.6724, 0.7789, 0.8718, 0.9497, 1.0122, 1.0596, 1.0932, 1.1143, 1.1249, 1.1268, 1.1219, 1.1121, 1.0989, 1.0839, 1.0681, 1.0526, 1.038, 1.0249, 1.0136, 1.0042, 0.9967, 0.9912, 0.9873, 0.985, 0.984, 0.984, 0.9848, 0.9862, 0.9879, 0.9899, 0.9919, 0.9938, 0.9956, 1)",
      "--bm-duration-fast": "calc(140ms / var(--bm-speed))",
      "--bm-duration-base": "calc(220ms / var(--bm-speed))",
      "--bm-duration-slow": "calc(320ms / var(--bm-speed))",
      "--bm-duration-reveal": "calc(600ms / var(--bm-speed))",
      "--bm-distance": "11px",
      "--bm-lift": "0px",
      "--bm-press": "1",
      "--bm-stagger-step": "calc(50ms * var(--bm-stagger) / var(--bm-speed))",
      "--bm-shadow-xs": "0 0 0 0 rgb(0 0 0 / 0)",
      "--bm-shadow-sm": "0 0 0 0.5px rgb(0 0 0 / 0.06)",
      "--bm-shadow-md": "0 2px 10px rgb(0 0 0 / 0.08)",
      "--bm-shadow-lg": "0 10px 40px rgb(0 0 0 / 0.18)",
      "--bm-shadow-xl": "0 16px 56px rgb(0 0 0 / 0.22)",
      "--bm-shadow-2xl": "0 24px 72px rgb(0 0 0 / 0.28)",
      "--bm-shadow-popover": "0 10px 40px rgb(0 0 0 / 0.18)",
      "--bm-text-xs": "0.8125rem",
      "--bm-text-xs-lh": "1.125rem",
      "--bm-text-sm": "0.9375rem",
      "--bm-text-sm-lh": "1.375rem",
      "--bm-text-base": "1.0625rem",
      "--bm-text-base-lh": "1.5rem",
      "--bm-focus-width": "3px",
      "--bm-focus-alpha": "40%",
      "--bm-focus-color": "var(--ring)",
      "--bm-control-h": "2.75rem",
      "--bm-control-h-sm": "2.25rem",
      "--bm-control-h-lg": "3rem",
      "--bm-target-min": "2.75rem",
      "--bm-check-size": "1.375rem",
      "--bm-switch-w": "3.1875rem",
      "--bm-switch-h": "1.9375rem",
      "--bm-press-dim": "0.6",
      "--bm-material-blur": "30px",
      "--bm-material-alpha": "80%",
      "--bm-sidebar-item-h": "2.75rem",
      "--bm-sidebar-item-radius": "0.625rem",
      "--bm-sidebar-indicator": "0px",
      "--bm-menu-item-h": "2.75rem",
      "--bm-menu-item-radius": "0px",
      "--bm-menu-pad": "0px",
      "--bm-scrollbar-width": "none",
      "--bm-titlebar-h": "2.75rem",
      "--bm-toolbar-h": "44px",
      "--spacing": "0.275rem"
    },
    "[data-feel=\"windows\"]": {
      "--radius": "0.25rem",
      "--bm-speed": "1.3",
      "--bm-bounce": "0",
      "--bm-travel": "0.6",
      "--bm-hover": "0.5",
      "--bm-stagger": "0.5",
      "--bm-ambient": "1",
      "--bm-ambient-state": "running",
      "--bm-ease-out": "cubic-bezier(0.22, 1, 0.36, 1)",
      "--bm-ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)",
      "--bm-ease-in": "cubic-bezier(0.55, 0, 1, 0.45)",
      "--bm-ease-spring": "linear(0, 0.0177, 0.0622, 0.1231, 0.193, 0.2665, 0.3401, 0.4112, 0.4783, 0.5405, 0.5974, 0.6488, 0.6948, 0.7357, 0.7719, 0.8036, 0.8314, 0.8556, 0.8765, 0.8946, 0.9102, 0.9237, 0.9352, 0.945, 0.9534, 0.9606, 0.9667, 0.9719, 0.9763, 0.98, 0.9832, 0.9859, 0.9881, 0.99, 0.9916, 0.993, 0.9941, 0.9951, 0.9959, 0.9965, 1)",
      "--bm-duration-fast": "calc(140ms / var(--bm-speed))",
      "--bm-duration-base": "calc(220ms / var(--bm-speed))",
      "--bm-duration-slow": "calc(320ms / var(--bm-speed))",
      "--bm-duration-reveal": "calc(600ms / var(--bm-speed))",
      "--bm-distance": "6px",
      "--bm-lift": "-1px",
      "--bm-press": "0.985",
      "--bm-stagger-step": "calc(50ms * var(--bm-stagger) / var(--bm-speed))",
      "--bm-shadow-xs": "0 0 2px rgb(0 0 0 / 0.12), 0 1px 2px rgb(0 0 0 / 0.14)",
      "--bm-shadow-sm": "0 0 2px rgb(0 0 0 / 0.12), 0 2px 4px rgb(0 0 0 / 0.14)",
      "--bm-shadow-md": "0 0 2px rgb(0 0 0 / 0.12), 0 4px 8px rgb(0 0 0 / 0.14)",
      "--bm-shadow-lg": "0 0 2px rgb(0 0 0 / 0.12), 0 8px 16px rgb(0 0 0 / 0.14)",
      "--bm-shadow-xl": "0 0 8px rgb(0 0 0 / 0.12), 0 14px 28px rgb(0 0 0 / 0.14)",
      "--bm-shadow-2xl": "0 0 8px rgb(0 0 0 / 0.12), 0 32px 64px rgb(0 0 0 / 0.14)",
      "--bm-shadow-popover": "0 0 8px rgb(0 0 0 / 0.12), 0 14px 28px rgb(0 0 0 / 0.14)",
      "--bm-text-xs": "0.75rem",
      "--bm-text-xs-lh": "1rem",
      "--bm-text-sm": "0.875rem",
      "--bm-text-sm-lh": "1.25rem",
      "--bm-text-base": "1rem",
      "--bm-text-base-lh": "1.375rem",
      "--bm-focus-width": "2px",
      "--bm-focus-alpha": "100%",
      "--bm-focus-color": "var(--foreground)",
      "--bm-control-h": "2rem",
      "--bm-control-h-sm": "1.5rem",
      "--bm-control-h-lg": "2.5rem",
      "--bm-target-min": "0px",
      "--bm-check-size": "1.25rem",
      "--bm-switch-w": "2.5rem",
      "--bm-switch-h": "1.25rem",
      "--bm-press-dim": "1",
      "--bm-material-blur": "30px",
      "--bm-material-alpha": "85%",
      "--bm-sidebar-item-h": "2.5rem",
      "--bm-sidebar-item-radius": "0.25rem",
      "--bm-sidebar-indicator": "3px",
      "--bm-menu-item-h": "2rem",
      "--bm-menu-item-radius": "0.25rem",
      "--bm-menu-pad": "0.25rem",
      "--bm-scrollbar-width": "thin",
      "--bm-titlebar-h": "2rem",
      "--bm-toolbar-h": "48px",
      "--spacing": "0.25rem"
    },
    "[class*=\"focus-visible:ring-[3px]\"]:focus-visible": {
      "--tw-ring-color": "color-mix(in oklab, var(--bm-focus-color, var(--ring)) var(--bm-focus-alpha, 50%), transparent)",
      "--tw-ring-shadow": "var(--tw-ring-inset,) 0 0 0 calc(var(--bm-focus-width, 3px) + var(--tw-ring-offset-width, 0px)) var(--tw-ring-color)"
    },
    "[class*=\"focus-within:ring-[3px]\"]:focus-within": {
      "--tw-ring-color": "color-mix(in oklab, var(--bm-focus-color, var(--ring)) var(--bm-focus-alpha, 50%), transparent)",
      "--tw-ring-shadow": "var(--tw-ring-inset,) 0 0 0 calc(var(--bm-focus-width, 3px) + var(--tw-ring-offset-width, 0px)) var(--tw-ring-color)"
    },
    "@media (forced-colors: active)": {
      "[class*=\"focus-visible:ring\"]:focus-visible": {
        "outline": "2px solid Highlight",
        "outline-offset": "2px"
      },
      "[class*=\"focus-within:ring\"]:focus-within": {
        "outline": "2px solid Highlight",
        "outline-offset": "2px"
      },
      "[data-slot=\"button\"]": {
        "border": "1px solid ButtonText"
      }
    },
    "@layer base": {
      "*": {
        "scrollbar-width": "var(--bm-scrollbar-width, auto)"
      }
    }
  },
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "feel",
      "auto",
      "platform",
      "macos",
      "windows",
      "ios",
      "tauri",
      "electron",
      "detect"
    ],
    "version": "1.0.0",
    "updated": "2026-10-12",
    "ai": {
      "summary": "Install once, render <FeelScript /> in <head>, and the whole app handles like the platform it runs on. A Tauri or Electron app on a Mac becomes macOS and the same app on Windows becomes Windows, with no code branches.",
      "whenToUse": [
        "Desktop apps (Tauri, Electron) that ship to more than one OS",
        "Web apps that should feel native on phones and desktops"
      ],
      "whenNotToUse": [
        "Apps that always want one feel: install feel-macos, feel-ios or feel-windows instead",
        "Server components that must not read the platform: the feel is applied on the client before paint"
      ],
      "composesWith": [
        "app-window",
        "feel-presets"
      ],
      "a11y": [],
      "customization": [
        "setFeel('auto') returns to the device's own feel",
        "The font is inherited from data-feel on <html>; apps that set their own font on <body> keep it"
      ]
    },
    "examples": [],
    "url": "https://ui.ballmac.com/components/feel-auto"
  },
  "docs": "Render <FeelScript /> once in <head> in your root layout and add suppressHydrationWarning to <html>. Use setFeel('macos' | 'ios' | 'windows' | 'web' | 'auto') from @/lib/ballmac/feel to let people choose.",
  "categories": [
    "foundation"
  ],
  "type": "registry:ui"
}