1.0.12 • Published 2 years ago

ink-checkbox v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ink-checkbox

Checkbox component for Ink.

Install

$ npm install ink-checkbox --save

Demo

Coming soon.

Props

Attributes

label

Type: string

Value to display next to the checkbox.

focused

Type: string

Checks if the cursor is above the checkbox. Highlights the highlighted checkbox using Ink's focus management.

index

Type: number \ Default: undefined

Checkbox identifier. If you are rendering more than one checkbox, it can be used instead of label to identify.

checked

Type: boolean\ Default: false

Controls whether the checkbox is selected by default.

wrapperStyles

Type: Object Default: {}

Override props of wrapper Ink's Box component.

styles

Type: Object Default: {}

Override default styles.

Event Handlers

onChanged

Type: Function

Function to call for value updates. So it triggers when Space, y and n keys.

onSubmitted

Type: Function

Function to call for value submits. So it triggers when Enter keys.

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago