Skip to content

Getting Started

DotSelect is a zero-dependency, HTML-first select replacement library. It transforms native <select> elements into rich, searchable, and fully accessible dropdowns — all configured through HTML attributes.

Why DotSelect?

Modern web applications need powerful select components, but most libraries come with heavy trade-offs:

  • jQuery dependency — Many popular select libraries still require jQuery
  • JavaScript boilerplate — Most require manual initialization and configuration objects
  • Framework lock-in — Built exclusively for React, Vue, or Angular

DotSelect takes a different approach:

FeatureDotSelectSelect2Choices.jsTom Select
Zero dependenciesYesjQuery requiredNoNo
HTML-first configYesNoNoNo
AJAX with paginationYesYesNoYes
Chained selectsBuilt-inPluginNoNo
Bundle size (min+gz)~12 KB~30 KB~20 KB~18 KB
RTL supportAuto-detectManualLimitedLimited

Quick Start

The fastest way to get started is with the CDN. Add these two lines to your HTML:

html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dot-select@latest/dist/css/dot-select.min.css">
<script src="https://cdn.jsdelivr.net/npm/dot-select@latest/dist/js/dot-select.min.js"></script>

Then add data-dot-select to any <select> element:

That's it. No JavaScript initialization required.

TIP

DotSelect automatically initializes all <select> elements with the data-dot-select attribute on DOMContentLoaded. For elements added dynamically, call DotSelect.init().

How It Works

DotSelect follows a simple principle: your HTML is the configuration.

  1. You write a standard <select> element
  2. You add data-dot-select to enable DotSelect
  3. You add data attributes to configure behavior
  4. DotSelect reads those attributes and enhances the element

Next Steps

MIT Licensed