Skip to content

Commit 8b2dbd5

Browse files
committed
Update readme
1 parent 5d1b20f commit 8b2dbd5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ $ npm install @github/combobox-nav
2828
### JS
2929

3030
```js
31-
import {clearSelection, install, navigate, start, stop, uninstall} from '@github/combobox-nav'
31+
import Combobox from '@github/combobox-nav'
3232
const input = document.querySelector('#robot-input')
3333
const list = document.querySelector('#list-id')
3434

3535
// install combobox pattern on a given input and listbox
36-
install(input, list)
36+
const combobox = new Combobox(input, list)
3737
// when options appear, start intercepting keyboard events for navigation
38-
start(input)
38+
combobox.start()
3939
// when options disappear, stop intercepting keyboard events for navigation
40-
stop(input)
40+
combobox.stop()
4141

4242
// move selection to the nth+1 item in the list
43-
navigate(input, list, 1)
43+
combobox.navigate(1)
4444
// reset selection
45-
clearSelection(input, list)
45+
combobox.clearSelection()
4646
// uninstall combobox pattern from the input
47-
uninstall(input)
47+
combobox.destroy()
4848
```
4949

5050
## Events

0 commit comments

Comments
 (0)