Custom PNG Bullet Points in Tailwind
May 22nd, 2023

Overview

A super quick guide on how to use PNG images as custom bullet points in tailwindcss.

This feature is available as of Tailwind v3.3.

A demo is available at here.

Setting up

First, get a small PNG image somewhere accessible. I have a 16 x 16 image in the /public folder.

Next, specify the URL using list-image. Using the format list-image-[url(/your/file.png)].

An example of using list-image might look like this:

<ul className="list-image-[url(/images/demos/carrot.png)] list-disc list-outside ml-6 leading-[3] mt-2"> <li>Eggs</li> <li>Bread</li> <li>Milk</li> </ul>

Final Product

custom bullet points