Open Source · MIT License · v0.2.0

The select component,
reforged for the modern web

Forge Select is a zero-dependency, accessible, high-performance replacement for Select2 — rich items, automatic virtualization for huge lists, tags, AJAX, tree select, drag-and-drop tag ordering, i18n, and a plugin architecture.

Get Started Live Demo Playground
npm install forge-select
import ForgeSelect from "forge-select";
import "forge-select/styles.css";

const select = new ForgeSelect("#country", {
  placeholder: "Select a country",
  searchable: true,
  clearable: true,
});

select.on("change", (value) => console.log(value));

Everything Select2 does — without the baggage

No jQuery. No CSS fights. No performance cliffs.

🚀

Fast by default

Lists over 100 rows virtualize automatically — 1,000 rich items keep only ~11 rows in the DOM, and rendered rows are cached per option.

🖼️

Rich items

Built-in avatar and description fields render avatar + label + subtext layouts with zero templates — and they're XSS-safe.

🎨

Fully themeable

Styling is driven entirely by CSS variables. A dark theme ships out of the box; custom templates give you full HTML control.

Accessible

ARIA combobox/listbox semantics, aria-activedescendant, and complete keyboard navigation are built in, not bolted on.

🏷️

Tags & multi-select

Multiple selection with removable, drag-to-reorder tags, and allowCreate to add options from free text.

🌐

Async data

Debounced AJAX loading with a transform hook, stale-response guarding, and optional infinite-scroll pagination.

🌲

Tree select

Nested children with expand/collapse and cascading multi-select — purely additive on top of flat lists.

🧩

Plugin architecture

Extend behavior with lifecycle hooks (onInit, onOpen, onClose, onDestroy) instead of forking the core.

📦

Zero dependencies

Written in strict TypeScript, ships ESM + CJS + IIFE bundles with type declarations. Works with every framework.

Migrating from Select2?

There's a full option/event/method mapping table and a step-by-step checklist.

Read the migration guide

Frequently asked questions

Is Forge Select a drop-in replacement for Select2?

Forge Select is a drop-in-concept replacement, not a byte-for-byte API clone: it covers Select2's core ideas (searchable dropdowns, tags, AJAX, templates) with a smaller, framework-agnostic API. See the Migration from Select2 guide for the full option/event/method mapping.

Does Forge Select have any dependencies?

No. Forge Select has zero runtime dependencies — it's written in strict TypeScript and ships ESM, CJS, and IIFE bundles with type declarations, so it works with any framework or none.

Can Forge Select handle large option lists?

Yes. Lists over 100 rows virtualize automatically — rendering only the visible rows plus a small buffer — and rendered row content is cached per option, so lists with thousands of items stay fast.

Is Forge Select accessible?

Yes. Forge Select implements ARIA combobox/listbox semantics, aria-activedescendant, and full keyboard navigation out of the box.

Does Forge Select work with React, Vue, Angular, or Svelte?

Forge Select is framework-agnostic vanilla JavaScript/TypeScript, so it can be mounted inside any framework today. Official wrapper packages are available for React (forge-select-react) and Vue (forge-select-vue) with controlled value/v-model support; Angular and Svelte wrappers are on the roadmap.

Can I reorder selected tags by dragging them?

Yes. Set sortable: true on a multiple select to let users drag tags into a new order with mouse, touch, or pen, or use Alt+Left/Alt+Right when a tag has keyboard focus.

Is Forge Select production-ready?

Forge Select is pre-1.0 (currently 0.2.0). The core API — options, methods, and events — is functional and tested, but the API may still change before a stable 1.0 release.