Components
SelectField
Code

SelectField

SelectField(props): null | ReactElement<any, string | JSXElementConstructor<any>>

Select fields allow merchants to choose a single option from a list that includes between five and seven values.

Parameters

NameType
propsSelectFieldProps & RefAttributes<HTMLSelectElement (opens in a new tab)>

Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Example

<SelectField label="Label" helpText="Help text" errorText="Error text">
  <option>option</option>
  <option>option</option>
  <option>option</option>
</SelectField>
import React from 'react'
import { SelectField } from '@vtex/shoreline-components'
export default function App() { return (<><SelectField  label="Label"  helpText="Help text"  errorText="Error text">  <option>option</option>  <option>option</option>  <option>option</option></SelectField></>)}

Defined in

node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/ts5.0/index.d.ts:355