Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

react select options

import React, { Component } from 'react'
import Select from 'react-select'

const options = [
  { value: 'chocolate', label: 'Chocolate' },
  { value: 'strawberry', label: 'Strawberry' },
  { value: 'vanilla', label: 'Vanilla' }
]

const MyComponent = () => (
  <Select options={options} />
)
Source by react-select.com #
 
PREVIOUS NEXT
Tagged: #react #select #options
ADD COMMENT
Topic
Name
9+3 =