UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

17 lines • 832 B
declare const BREAKPOINTS: readonly [readonly ["2xl", "(min-width: 1536px)"], readonly ["xl", "(min-width: 1280px)"], readonly ["lg", "(min-width: 1024px)"], readonly ["md", "(min-width: 768px)"], readonly ["sm", "(min-width: 640px)"]]; type Breakpoint = (typeof BREAKPOINTS)[number][0]; /** * Returns the name of the current CSS breakpoint based on viewport width. * Evaluates breakpoints from largest to smallest and returns the first match. * * @returns The active breakpoint name: `"sm"`, `"md"`, `"lg"`, `"xl"`, or `"2xl"`. * Returns `"sm"` when no breakpoint matches (viewport narrower than 640px). * * @example * ```tsx * const bp = useBreakpoint(); // "lg" on a 1200px viewport * ``` */ export declare function useBreakpoint(): Breakpoint; export type { Breakpoint }; //# sourceMappingURL=useBreakpoint.d.ts.map