CSS Dot Grid Background
A dot grid background in pure CSS, the dotted canvas look from Notion and Figma. One radial gradient, live size and spacing controls, CSS or Tailwind.
.bg-dot-grid {
--bg: #223b8c;
--fg: #7585b7;
--size: 24px;
--dot: 2px;
background-color: var(--bg);
background-image: radial-gradient(circle, var(--fg) var(--dot), transparent calc(var(--dot) + 1px));
background-size: var(--size) var(--size);
}<div class="
[--bg:#223b8c]
[--fg:#7585b7]
[--size:24px]
[--dot:2px]
[background-color:var(--bg)]
[background-image:radial-gradient(circle,_var(--fg)_var(--dot),_transparent_calc(var(--dot)_+_1px))]
[background-size:var(--size)_var(--size)]
"></div><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dot Grid — CSS background</title>
<style>
html, body { height: 100%; margin: 0; }
.bg-dot-grid {
--bg: #223b8c;
--fg: #7585b7;
--size: 24px;
--dot: 2px;
background-color: var(--bg);
background-image: radial-gradient(circle, var(--fg) var(--dot), transparent calc(var(--dot) + 1px));
background-size: var(--size) var(--size);
}
</style>
</head>
<body class="bg-dot-grid"></body>
</html>Save the pattern as an image, with your current colors and settings.
Dot Grid in other colors
Click a color to try it in the preview above, then copy the code.
Browse by color: Red · Orange · Yellow · Green · Teal · Blue · Purple · Pink
How the dot grid pattern works
A dot grid is one small circle repeated on a square grid. The radial-gradient() starts in the center of each tile, paints --fg out to --dot pixels, then switches to transparent one pixel later. That single pixel of blend keeps the dots round instead of jagged.
background-size sets the tile, so --size is the distance between dots. Because the dot radius is in pixels rather than percent, the dots stay the same size when you change the spacing.
This is the dotted background behind whiteboard and design tools like Notion, Miro and Figma. It gives a page a sense of structure without the weight of full grid lines. Keep --dot at 1–2px for a quiet canvas, or raise it for a bolder dotted texture.
The Tailwind tab gives the same pattern as arbitrary-property classes, so it works in any Tailwind v4 project without a config change.