pencil.js
Version:
Nice modular interactive 2D drawing library.
33 lines (23 loc) • 704 B
Markdown
Select user input.

```js
import { Select } from "pencil.js";
const position = [100, 200];
const items = [
null, // Selectable empty item
"Unicorn",
"Pony",
"Doggy",
];
const options = {
value: 1, // index of the default value
};
const select = new Select(position, items, options);
```
Inherit from [TextOptions](../text/readme.md
| Name | Type | Default | Comment |
|-------|----------|---------|------------------------------|
| value | `Number` | `0` | Selected index of the select |