PXD

Checkerboard

Display a checkerboard pattern background, commonly used to indicate transparency.

Default

<template>
  <PCheckerboard class="h-40 rounded-lg" />
</template>

Custom Size

<template>
  <PCheckerboard :size="40" class="h-40 rounded-lg" />
</template>

Custom Colors

<template>
  <PCheckerboard primary-color="#e879f9" background-color="#f0abfc" class="h-40 rounded-lg" />
</template>

With Content

Transparent Area
<template>
  <PCheckerboard class="h-40 rounded-lg flex items-center justify-center">
    <span class="text-lg font-bold">Transparent Area</span>
  </PCheckerboard>
</template>

Props

NameTypeDefaultDescription
sizestring | number20Size of each checkerboard cell
primary-colorstringvar(--color-gray-200)Primary (darker) color
background-colorstringvar(--color-background-100)Background (lighter) color

Slots

NameDescription
defaultDefault slot

Source

Source