Skip to content

Default Theme

The default theme provides a clean, minimal design that works well in any project without framework dependencies.

Preview

The default theme features:

  • Neutral gray borders and backgrounds
  • Subtle hover and focus states
  • Clean typography using the system font stack
  • Responsive sizing that adapts to container width

Usage

CDN

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

npm

js
import 'dot-select/dist/css/dot-select.min.css';

SCSS

scss
@import 'dot-select/src/scss/themes/default';

Variables

The default theme uses these SCSS variable values:

VariableValueDescription
$ds-primary-color#3b82f6Primary accent color (focus ring, highlights)
$ds-font-familysystem-ui, -apple-system, sans-serifFont stack
$ds-font-size0.875remBase font size
$ds-line-height1.5Base line height
$ds-border-color#d1d5dbBorder color for the control
$ds-border-radius6pxBorder radius
$ds-border-width1pxBorder width
$ds-bg-color#ffffffBackground color
$ds-text-color#1f2937Text color
$ds-placeholder-color#9ca3afPlaceholder text color
$ds-disabled-opacity0.5Opacity for disabled state
$ds-focus-ring-colorrgba(59, 130, 246, 0.25)Focus ring color
$ds-focus-ring-width3pxFocus ring width
$ds-dropdown-shadow0 4px 6px -1px rgba(0,0,0,0.1)Dropdown box shadow
$ds-item-bg#eff6ffSelected item background
$ds-item-color#1e40afSelected item text color
$ds-item-border#bfdbfeSelected item border color
$ds-option-hover-bg#f3f4f6Option hover background
$ds-option-selected-bg#eff6ffSelected option background

Customizing

Override any variable before importing the theme:

scss
$ds-primary-color: #10b981;
$ds-border-radius: 12px;
$ds-item-bg: #d1fae5;
$ds-item-color: #065f46;
$ds-item-border: #6ee7b7;

@import 'dot-select/src/scss/themes/default';

MIT Licensed