Skip to content

Dotted Background

BackgroundsMIT
View in Storybook

Dotted-grid background pattern — subtle texture without competing for attention.

bun add @otfdashkit/ui

Preview

Dotted Background
Loading Storybook preview…

Code

import { 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.

PropTypeDefaultDescription
colorstringDot color (default uses --border token)
dotSizenumber1Dot size in px (default 1)
fixedbooleanfalse
gapnumber24Gap between dots in px (default 24)
vignettebooleantrueVignette fade at edges