Components
Loading preview...
A React hook that provides responsive styles
@shugar
npx shadcn@latest add https://21st.dev/r/shugar/use-responsiveimport { useResponsive } from "@/components/ui/use-responsive";
export default function DefaultDemo() {
const width = useResponsive({ sm: 150, md: 196 });
return (
<div className="bg-red-500 text-center" style={{ width }}>
Responsive {width}
</div>
);
}