Development
Hook
Hooks
What componentsbuild runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
Install
$ npx -y skills add vercel/components.build --agent claude-codeShips with componentsbuild. Installing the plugin gets these hooks.
Where it lives
- hooks/use-mobile.tsGitHub
Read the script
import * as React from "react" const MOBILE_BREAKPOINT = 768 export function useIsMobile() { const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined) React.useEffect(() => { const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) const onChange = () => { setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) } mql.addEventListener("change", onChange) setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) return () => mql.removeEventListener("change", onChange) }, []) return !!isMobile }
Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
Ships withcomponentsbuild
An open-source standard for building modern, composable, and accessible UI components.
Get the whole plugin
Stats
793
Stars
57
Forks
Active
Maintenance
MDX
Language
28d ago
Last commit
0y ago
Created
Repo: vercel/components.build

