Pick a platform feel
Make every component handle like macOS, iOS or Windows, by installing one feel or letting the device choose before the first paint.
On this page
Install one feel
For an app that always runs on one platform, install its feel. It changes handling only and leaves your colors alone.
pnpm dlx shadcn@latest add @ballmac/feel-macosnpx shadcn@latest add @ballmac/feel-macosyarn dlx shadcn@latest add @ballmac/feel-macosbun x shadcn@latest add @ballmac/feel-macosThe other feels are @ballmac/feel-ios, @ballmac/feel-windows and @ballmac/feel-web. See what each feel sets.
Let the device pick
A Tauri or Electron app that ships to Mac and Windows, or a web app used on phones and desktops, should handle like the platform it is on. feel-auto includes all four feels and sets the right one before the first paint, so there is no flash.
pnpm dlx shadcn@latest add @ballmac/feel-autonpx shadcn@latest add @ballmac/feel-autoyarn dlx shadcn@latest add @ballmac/feel-autobun x shadcn@latest add @ballmac/feel-autoAdd FeelScript to your root layout:
import { FeelScript } from "@/components/ballmac/feel-script"
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<FeelScript />
</head>
<body>{children}</body>
</html>
)
}Let people override it
Go back to the device's own feel with auto. The choice is remembered in the browser.
import { useFeel } from "@/lib/ballmac/feel"
const { feel, setFeel } = useFeel()
setFeel("windows") // "web" | "macos" | "ios" | "windows"
setFeel("auto") // the device's own feelShare a feel as a link
# open a feel in the builder
https://ui.ballmac.com/themes?fe=windowsInstall a custom design with a feel, colors and motion together:
pnpm dlx shadcn@latest add "https://ui.ballmac.com/themes/custom.json?h=262&fe=macos"npx shadcn@latest add "https://ui.ballmac.com/themes/custom.json?h=262&fe=macos"yarn dlx shadcn@latest add "https://ui.ballmac.com/themes/custom.json?h=262&fe=macos"bun x shadcn@latest add "https://ui.ballmac.com/themes/custom.json?h=262&fe=macos"