kiss-components
TypeScript icon, indicating that this package has built-in type declarations

0.3.5 • Public • Published

kiss-components

Keep web components simple, stupid:

  • No ShadowDOM
  • No slots
  • No nested elements

Install

npm install --save kiss-components
# or
yarn add kiss-components

Components

ComboBox

// kiss-combo-box
interface ComboBox {
  // attribute
  name?: string

  // property
  items: Array<[name: string, value: string]> = []

  // pass-through properties
  get value(): string
  set value(val: string)

  // events
  change(): void
}

DropDownList

// kiss-dropdrop-list
interface DropdownList {
  // attribute
  name?: string

  // property
  items: Array<[name: string, value: string]> = []

  // pass-through properties
  get selectedIndex(): number
  set selectedIndex(val: number)

  get value(): string
  set value(val: string)

  // events
  change(): void
}

ListBox

// kiss-list-box
interface ListBox {
  // attribute
  name?: string
  size: number = 2

  // property
  items: Array<[name: string, value: string]> = []

  // pass-through properties
  get selectedIndex(): number
  set selectedIndex(val: number)

  get value(): string
  set value(val: string)

  // events
  change(): void
}

Readme

Keywords

none

Package Sidebar

Install

npm i kiss-components

Weekly Downloads

0

Version

0.3.5

License

MIT

Unpacked Size

9.84 MB

Total Files

142

Last publish

Collaborators

  • black_glory