SelectCreditScore presents a default set of credit score values within a Select component, and enables pods to update the values per their use cases.
Best practices
- Intended for single select use cases.
- When multiple selections are required, use Checkbox or pose the question in two parts using disabled to indicate the previous selection.
Variants
Default
Error
Disabled
Development
import SelectCreditScore from '@nerdwallet/react-input-credit-score/select';<SelectCreditScore />;
Props
<SelectCreditScore>
options
Array<Object>
= [ { label: 'Excellent 720 - 850', value: 720, }, { label: 'Good 690 - 719', value: 690, }, { label: 'Average 630 - 689', value: 630, }, { label: 'Poor 350 - 629', value: 350, }, ]
An array of options `[{ value, label }]`.
Array<{}>
label: node
value: number | string | bool
disabled: bool
/**
Silence the maxLineLength error to allow a label > 21 characters. Generally only used in instances where copy or compliance requires them.
*/
__dangerouslyAllowLongLabel: boolvalue
= ''
string
The currently selected value. Must match a provided option.