Dotted Background
BackgroundsMITDotted-grid background pattern — subtle texture without competing for attention.
bun add @otfdashkit/ui
Preview
Dotted BackgroundBackgrounds
Loading Storybook preview…
Code
@otfdashkit/uiimport { DottedBackground } from '@otfdashkit/ui'
export function Example() {
return (
<div className="relative h-[400px]">
<DottedBackground />
<div className="relative z-10 flex items-center justify-center h-full">
<span className="text-foreground text-lg">Dotted pattern</span>
</div>
</div>
)
}
Free with the SDK. This pattern ships in @otfdashkit/ui under the MIT license.
Props
Props declared in the DottedBackground source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | Dot color (default uses --border token) | |
| dotSize | number | 1 | Dot size in px (default 1) |
| fixed | boolean | false | |
| gap | number | 24 | Gap between dots in px (default 24) |
| vignette | boolean | true | Vignette fade at edges |