Select Components

Examples

<script>
import { Select} from 'flowbite-svelte'

let selectprops = {
  id : 'countries',
	name : 'country',
	label : 'Select your country',
}
</script>

<Select {...selectprops} bind:value={selected}>
  <option value="us">United States</option>
  <option value="ca">Canada</option>
  <option value="fr">France</option>
</Select>

Props

The component has the following props, type, and default values. See types page for type information.

Name Type Default
value string | number
selectClass string 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500'

References