Optional
defaultValue?: TArray of options to display in the dropdown
using difficultyField = app.scene(generic(Select), {
defaultProps: {
id: 'difficulty',
label: 'Difficulty Level',
defaultValue: 'medium',
options: [
{ value: 'easy', label: 'Easy' },
{ value: 'medium', label: 'Medium' },
{ value: 'hard', label: 'Hard' },
],
},
});
const data = await difficultyField.show();
console.log(data.value); // 'easy' | 'medium' | 'hard'
Dropdown select component for choosing from predefined options