shadcnhooks
libis-browsersource: ok · refreshed
Is Browser
A library that checks if the code is running in a browser.
npx shadcn add "https://shadcn-hooks.com/r/is-browser.json"free
Visual style
terminal-mono
Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.
Files1 · source cached 10/8/2026, 9:13:10 AM
registry/lib/is-browser.ts
/**
* A library that checks if the code is running in a browser.
*/
export const isBrowser = typeof window !== 'undefined'