React Design Patterns Documentation - v0.0.3
    Preparing search index...
    • A reusable select dropdown component with label, error handling, and helper text support.

      Parameters

      • props: SelectProps

        Additional HTML select element properties

        • options

          Array of option objects with value, label, and optional disabled properties

        • placeholder

          Optional placeholder text shown as the first disabled option

        • label

          Optional label text displayed above the select input

        • error

          Optional error message displayed below the select in red text

        • helperText

          Optional helper text displayed below the select when no error is present

        • className

          Additional CSS classes to apply to the select element

        • size

          Size variant for the select component styling

        • variant

          Style variant for the select component styling

      Returns Element

      A styled select dropdown component with accessibility features

      <Select
      options={[
      { value: 'option1', label: 'Option 1' },
      { value: 'option2', label: 'Option 2', disabled: true }
      ]}
      label="Choose an option"
      placeholder="Select..."
      helperText="Please select one option"
      />