BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-ui-blocks/background-04

Vertical Lines Background

shadcn-ui-blocks-shadcnship/background-04
FreeBlock

Customizable vertical lines background with adjustable line count, width, color, and opacity. Use it behind hero or pricing sections to create a structured, architectural visual backdrop.

See it running

Open the demo on shadcn-ui-blocks

shadcnship.com/blocks/background-04
Open
This registry sends X-Frame-Options, so its page cannot be embedded here. The link is the same page the frame would have shown.

Install it

npx shadcn@latest add https://shadcnship.com/r/background-04.json

Source

src/registry/blocks/background-04/background.tsxshadcnship.com/r/background-04.json
1import { cn } from "@/lib/utils";
2
3type MaskPosition = "top" | "bottom" | "center" | "none";
4
5type Background04Props = {
6 className?: string;
7 lineCount?: number;
8 lineWidth?: number;
9 lineColor?: string;
10 gap?: number;
11 mask?: MaskPosition;
12};
13
14const getMaskStyle = (mask: MaskPosition): string => {
15 switch (mask) {
16 case "top":
17 return "radial-gradient(ellipse 60% 50% at 50% 0%, transparent 40%, #000 110%)";
18 case "bottom":
19 return "radial-gradient(ellipse 60% 50% at 50% 100%, transparent 40%, #000 110%)";
20 case "center":
21 return "radial-gradient(ellipse 50% 50% at 50% 50%, transparent 20%, #000 70%)";
22 case "none":
23 default:
24 return "none";
25 }
26};
27
28const Background04 = ({
29 className,
30 lineCount = 12,
31 lineWidth = 1,
32 lineColor = "var(--border)",
33 gap = 0,
34 mask = "none",
35}: Background04Props) => {
36 const maskStyle = getMaskStyle(mask);
37
38 return (
39 <div
40 className={cn(
41 "pointer-events-none absolute inset-0 z-0 overflow-hidden",
42 className
43 )}
44 style={
45 mask !== "none"
46 ? {
47 maskImage: maskStyle,
48 WebkitMaskImage: maskStyle,
49 }
50 : undefined
51 }
52 >
53 <div
54 className="flex size-full items-stretch justify-between"
55 style={{ padding: gap ? `0 ${gap}px` : undefined }}
56 >
57 {Array.from({ length: lineCount }).map((_, i) => (
58 <div
59 key={i}
60 style={{
61 width: `${lineWidth}px`,
62 backgroundColor: lineColor,
63 }}
64 />
65 ))}
66 </div>
67 </div>
68 );
69};
70
71export default Background04;

Files it writes

  • src/registry/blocks/background-04/background.tsx

Facts

Registry
shadcn-ui-blocks
Type
registry:block
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
today

Go to the source

Docs on shadcn-ui-blocks shadcnship.com arnaudvolp/shadcnship on GitHub Raw registry item This item as JSON

More from shadcn-ui-blocks

All 74 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Square Grid Backgroundbackground-01shadcn-ui-blocksBlocksFreeno deps
Dot Pattern Backgroundbackground-02shadcn-ui-blocksBlocksFreeno deps
Diagonal Stripes Backgroundbackground-03shadcn-ui-blocksBlocksFreeno deps
Interactive Grid Backgroundbackground-05shadcn-ui-blocksBlocksFreeno deps
Banner 01banner-01shadcn-ui-blocksBlocksFree1 dep
Blog 01blog-01shadcn-ui-blocksBlocksFreeno deps
Changelog 01changelog-01shadcn-ui-blocksBlocksFreeno deps
Comparison 01comparison-01shadcn-ui-blocksBlocksFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex