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
787
Stars
53
Forks
Active
Maintenance
MDX
Language
10d ago
Last commit
10mo ago
Created
Repo: vercel/components.build

