dotbot

dotbot is a simple library that let's you create a randomised, dotted background-pattern on any given element on your website.

Usage no npm install needed!

<script type="module">
  import dotbot from 'https://cdn.skypack.dev/dotbot';
</script>

README

dotbot

dotbot is a simple library that let's you create a randomised, dotted background-pattern on any given element on your website.

Example

Example

To initiate dotbot. simply include the library and call the dot function like so:

var myDots = new dotbot({
  selectorId: "dotbot-selector-id"
)};

Options

You can define almost every aspect of layout:

var myDots = new dotbot({
  selectorId: "dotbot-selector-id",
  parentPosition: "relative",
  colors: [
     "blue",
     "rgb(126, 211, 33)",
     "#f06d06"
  ],
  sizeMin: 3,
  sizeMax: 80,
  dots: 35,
  radius: 0,
  opacity: 0.1,
  zIndex: -1
});