Components
Loading preview...
Here is Background Components component
npx shadcn@latest add https://21st.dev/r/meghtrix/background-components// This is file of your component
// You can use any dependencies from npm; we import them automatically in package.json
import { cn } from "@/lib/utils";
import { useState } from "react";
export const Component = () => {
const [count, setCount] = useState(0);
return (
<div className="min-h-screen w-full relative">
{/* Dashed Gradient */}
<div
className="absolute inset-0 z-0"
style={{
backgroundImage: `
linear-gradient(to right, #e7e5e4 1px, transparent 1px),
linear-gradient(to bottom, #e7e5e4 1px, transparent 1px)
`,
backgroundSize: "20px 20px",
backgroundPosition: "0 0, 0 0",
maskImage: `
repeating-linear-gradient(
to right,
black 0px,
black 3px,
transparent 3px,
transparent 8px
),
repeating-linear-gradient(
to bottom,
black 0px,
black 3px,
transparent 3px,
transparent 8px
)
`,
WebkitMaskImage: `
repeating-linear-gradient(
to right,
black 0px,
black 3px,
transparent 3px,
transparent 8px
),
repeating-linear-gradient(
to bottom,
black 0px,
black 3px,
transparent 3px,
transparent 8px
)
`,
maskComposite: "intersect",
WebkitMaskComposite: "source-in",
}}
/>
{/* Your Content/Components */}
</div>
);
};
export default Component;