Forms
Select
Native selects with a custom navy chevron that turns cream in dark mode.
How it works in this theme
.form-select hides the browser's native arrow (appearance: none) and draws its own
as a background image stored in --bs-form-select-bg-img. The theme gives it:
- The same field colours as form controls:
cream-50background,cream-300border, 2 px radius, gold focus ring. - A
navy-700(#122553) chevron in light mode,cream-100(#f4ecd8) in dark mode. - Disabled:
--bs-secondary-bgbackground.
The open menu is still the browser's own. There is no custom dropdown and nothing to script. For a button-triggered menu see Dropdowns.
Default
HTML
<label for="select-default" class="form-label">Match type</label>
<select class="form-select" id="select-default" aria-label="Default select example">
<option selected>Open this select menu</option>
<option value="1">Singles</option>
<option value="2">Tag team</option>
<option value="3">Steel cage</option>
</select>Sizing
You may also choose from small and large custom selects to match the similarly sized text inputs.
HTML
<label for="select-lg" class="visually-hidden">Large select</label>
<select class="form-select form-select-lg mb-4" id="select-lg" aria-label="Large select example">
<option selected>Open this select menu</option>
<option value="1">Singles</option>
<option value="2">Tag team</option>
<option value="3">Steel cage</option>
</select>
<label for="select-sm" class="visually-hidden">Small select</label>
<select class="form-select form-select-sm" id="select-sm" aria-label="Small select example">
<option selected>Open this select menu</option>
<option value="1">Singles</option>
<option value="2">Tag team</option>
<option value="3">Steel cage</option>
</select>The multiple attribute is also supported. The chevron is removed and the right padding resets.
HTML
<label for="select-multiple" class="form-label">Stipulations</label>
<select class="form-select" id="select-multiple" multiple aria-label="Multiple select example">
<option selected>No disqualification</option>
<option value="1">No count-out</option>
<option value="2">Falls count anywhere</option>
<option value="3">Loser leaves town</option>
</select>As is the size attribute, which shows that many rows without scrolling.
HTML
<label for="select-size" class="form-label">Championship</label>
<select class="form-select" id="select-size" size="3" aria-label="Size 3 select example">
<option selected>Open this select menu</option>
<option value="1">World Heavyweight</option>
<option value="2">Intercontinental</option>
<option value="3">Tag Team</option>
</select>Disabled
Add the disabled boolean attribute on a select to give it a greyed-out appearance and remove pointer events.
HTML
<label for="select-disabled" class="visually-hidden">Disabled select</label>
<select class="form-select" id="select-disabled" aria-label="Disabled select example" disabled>
<option selected>Open this select menu</option>
<option value="1">Singles</option>
<option value="2">Tag team</option>
<option value="3">Steel cage</option>
</select>The chevron in dark mode
Bootstrap stores the arrow in the --bs-form-select-bg-img custom property on
.form-select. The theme redefines that property under both dark-mode selectors — the explicit
[data-bs-theme="dark"] and the automatic prefers-color-scheme: dark media query —
so the arrow stays visible against a dark page.
.form-select {
--bs-form-select-bg-img: url("…stroke='%23122553'…"); /* navy-700 */
}
[data-bs-theme=dark] .form-select {
--bs-form-select-bg-img: url("…stroke='%23f4ecd8'…"); /* cream-100 */
}
@media (prefers-color-scheme: dark) {
:root:not([data-bs-theme=light]) .form-select {
--bs-form-select-bg-img: url("…stroke='%23f4ecd8'…");
}
}
To swap the icon yourself, set --bs-form-select-bg-img on .form-select or on any
ancestor. Validation adds a second image through --bs-form-select-bg-icon; the two are layered,
so both show at once.
HTML
<div data-bs-theme="dark" class="p-4 bg-body text-body rounded">
<label for="select-dark" class="form-label">Dark region</label>
<select class="form-select" id="select-dark" aria-label="Dark mode select example">
<option selected>Cream chevron on the right</option>
<option value="1">Singles</option>
<option value="2">Tag team</option>
</select>
</div>Sass variables
$form-select-* variables inherit from $input-*. The theme sets one directly; the
chevron colour comes from $form-select-indicator-color, which Bootstrap defaults to
$gray-800 — mapped to navy-700 in this theme.
$form-select-border-radius: $border-radius-sm; // 2px
// Inherited through Bootstrap defaults
$form-select-bg: $input-bg; // cream-50
$form-select-border-color: $input-border-color; // cream-300
$form-select-indicator-color: $gray-800; // navy-700 (#122553)
$form-select-indicator-color-dark: $body-color-dark; // cream-100 (#f4ecd8)
$form-select-disabled-bg: $input-disabled-bg; // var(--bs-secondary-bg)