Skip to main content

Select

A form control that provides a dropdown menu of options

Installation

Install

yarn add @iag/chroma-react-ui.components

Import

import { Select } from '@iag/chroma-react-ui.components';

Accessibility

Accessibility documentation(opens in new window)

Default

Disabled

Error

Widths

Properties

Name
Description
  • className
    stringAdditional CSS classes to be applied
  • disabled
    booleanBoolean indicating if the input is disabled
  • error
    booleanBoolean indicating if the input is in an error state
  • id
    stringHTML id attribute for the Input
  • name
    stringHTML name attribute for the input
  • onChange*
    (e: React.ChangeEvent<HTMLSelectElement>) => voidFunction to be called when the input value changes
  • options*
    IOptions[]An Array of objects { label:string, value:string }
  • valid
    booleanBoolean indicating if the input is in a valid state
  • value
    stringThe input value
  • size
    SizeSet the size of the input (1-4)

CSS Variables