Home Reference Source

Function

Static Public Summary
public

Box(props: BoxProperties, children: h[])

A flexbox

public

BoxContainer(props: BoxProperties, children: h[])

A flexbox container

public

BoxStyled(props: BoxProperties, children: h[])

A styled flexbox container

public

Button(props: Object, children: h[])

A button

public

Element(props: Object, children: h[]): *

A generic OS.js GUI container

public

Expander(props: Object, children: h[])

A status bar

public

Icon(props: Object, children: h[]): *

An icon

public

Iframe(props: Object, children: h[])

A iframe

public

Image(props: Object)

A image

public

Label(props: Object, children: h[]): *

A label element

public

Menu(props: Object)

A menu

public

Menubar(props: BoxProperties, children: h[])

A menubar container

public

MenubarItem(props: Object, children: h[]): *

A menubar item

public

Panes(props: Object, children: h[])

Resizable panes

public

Progressbar(props: Object, children: h[]): *

A progress bar

public

RangeField(props: Object, children: h[])

A range field

public

SelectField(props: Object, children: h[]): *

A text field

public

Statusbar(props: Object, children: h[])

A status bar

public

Tabs(props: Object, children: h[])

A tab container

public

TextField(props: Object, children: h[])

A text field

public

TextareaField(props: Object, children: h[])

A text field

public

ToggleField(props: Object, children: h[])

A text field

public

Toolbar(props: BoxProperties, children: h[])

Contains entries with spacing

public

Video(props: Object)

A video

public

createField(name: String, props: Object, cb: Function, cb: Function): *

Creates a new field Element wrapper

public

Creates a double-tap event handler

public

filteredProps(props: Object, filterKeys: String[]): Object

Filter an object based on keys

Static Public

public Box(props: BoxProperties, children: h[]) source

A flexbox

Params:

NameTypeAttributeDescription
props BoxProperties

Properties

props.orientation string
  • optional
  • default: 'horizontal'

Box orientation

children h[]

Children

public BoxContainer(props: BoxProperties, children: h[]) source

import {BoxContainer} from '@osjs/gui/src/components/BoxContainer.js'

A flexbox container

Params:

NameTypeAttributeDescription
props BoxProperties

Properties

props.orientation string
  • optional
  • default: 'vertical'

Box orientation

children h[]

Children

public BoxStyled(props: BoxProperties, children: h[]) source

import {BoxStyled} from '@osjs/gui/src/components/BoxStyled.js'

A styled flexbox container

Params:

NameTypeAttributeDescription
props BoxProperties

Properties

children h[]

Children

public Button(props: Object, children: h[]) source

import {Button} from '@osjs/gui/src/components/Button.js'

A button

Params:

NameTypeAttributeDescription
props Object

Properties

props.icon string
  • optional

Icon source

props.label string
  • optional

Use this as label instead of children

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public Element(props: Object, children: h[]): * source

import {Element} from '@osjs/gui/src/components/Element.js'

A generic OS.js GUI container

Params:

NameTypeAttributeDescription
props Object

Properties

children h[]

Children

Return:

*

public Expander(props: Object, children: h[]) source

import {Expander} from '@osjs/gui/src/components/Expander.js'

A status bar

Params:

NameTypeAttributeDescription
props Object

Properties

props.active boolean
  • optional

Active state

props.ontoggle Function
  • optional

Toggle callback => (ev, active)

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public Icon(props: Object, children: h[]): * source

An icon

Params:

NameTypeAttributeDescription
props Object

Properties

props.src string

Icon src

props.name string
  • optional

Icon name

children h[]

Children

Return:

*

public Iframe(props: Object, children: h[]) source

import {Iframe} from '@osjs/gui/src/components/Iframe.js'

A iframe

Params:

NameTypeAttributeDescription
props Object

Properties

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public Image(props: Object) source

import {Image} from '@osjs/gui/src/components/Image.js'

A image

Params:

NameTypeAttributeDescription
props Object

Properties

props.src String

The image source

props.alt String
  • optional

The image alternate text

props.width number
  • optional

Image width

props.height number
  • optional

Image height

props.onload Function
  • optional

On loaded data event

props.oncreate Function
  • optional

Hyperapp oncreate function

props.onupdate Function
  • optional

Hyperapp onupdate function

props.ondestroy Function
  • optional

Hyperapp ondestroy function

public Label(props: Object, children: h[]): * source

import {Label} from '@osjs/gui/src/components/Label.js'

A label element

Params:

NameTypeAttributeDescription
props Object

Properties

props.text string
  • optional

Label Text

props.placement string
  • optional

Placement

props.for string
  • optional

The "for" attribute

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

Return:

*

public Menu(props: Object) source

A menu

Params:

NameTypeAttributeDescription
props Object

Properties

props.visible Boolean
  • optional
  • default: true

Visible property

posprops.ition Object
  • optional

Position

props.menu MenuItems
  • optional

Menu items

public Menubar(props: BoxProperties, children: h[]) source

import {Menubar} from '@osjs/gui/src/components/Menubar.js'

A menubar container

Params:

NameTypeAttributeDescription
props BoxProperties
  • optional

Box Properties

props.items MenubarItem[]
  • optional

Array of object

children h[]

Children

public MenubarItem(props: Object, children: h[]): * source

import {MenubarItem} from '@osjs/gui/src/components/Menubar.js'

A menubar item

Params:

NameTypeAttributeDescription
props Object

Properties

children h[]

Children

Return:

*

public Panes(props: Object, children: h[]) source

import {Panes} from '@osjs/gui/src/components/Panes.js'

Resizable panes

Params:

NameTypeAttributeDescription
props Object

Properties

props.orientation string
  • optional
  • default: 'vertical'

Pane orientation

props.sizes number[]
  • optional

Pane sizes

children h[]

Children

public Progressbar(props: Object, children: h[]): * source

import {Progressbar} from '@osjs/gui/src/components/Progressbar.js'

A progress bar

Params:

NameTypeAttributeDescription
props Object

Properties

props.value number
  • optional

The value (percentage)

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

Return:

*

public RangeField(props: Object, children: h[]) source

import {RangeField} from '@osjs/gui/src/components/RangeField.js'

A range field

Params:

NameTypeAttributeDescription
props Object

Properties

props.min string
  • optional

Minimum value

props.max string
  • optional

Maximum value

props.value string
  • optional

Value

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public SelectField(props: Object, children: h[]): * source

import {SelectField} from '@osjs/gui/src/components/SelectField.js'

A text field

Params:

NameTypeAttributeDescription
props Object

Properties

props.value string
  • optional

Value

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

Return:

*

public Statusbar(props: Object, children: h[]) source

import {Statusbar} from '@osjs/gui/src/components/Statusbar.js'

A status bar

Params:

NameTypeAttributeDescription
props Object

Properties

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public Tabs(props: Object, children: h[]) source

A tab container

Params:

NameTypeAttributeDescription
props Object

Properties

props.labels String[]

Labels

children h[]

Tabs

public TextField(props: Object, children: h[]) source

import {TextField} from '@osjs/gui/src/components/TextField.js'

A text field

Params:

NameTypeAttributeDescription
props Object

Properties

props.value string
  • optional

Value

props.type string
  • optional
  • default: text

Type

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public TextareaField(props: Object, children: h[]) source

import {TextareaField} from '@osjs/gui/src/components/TextareaField.js'

A text field

Params:

NameTypeAttributeDescription
props Object

Properties

props.value string
  • optional

Value

props.rows number
  • optional
  • default: 4

Number of rows

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public ToggleField(props: Object, children: h[]) source

import {ToggleField} from '@osjs/gui/src/components/ToggleField.js'

A text field

Params:

NameTypeAttributeDescription
props Object

Properties

props.checked string
  • optional

Value

props.type string
  • optional
  • default: checkbox

Type

props.box BoxProperties
  • optional

Box Properties

children h[]

Children

public Toolbar(props: BoxProperties, children: h[]) source

import {Toolbar} from '@osjs/gui/src/components/Toolbar.js'

Contains entries with spacing

Params:

NameTypeAttributeDescription
props BoxProperties

Properties

props.orientation string
  • optional
  • default: 'vertical'

Box orientation

children h[]

Children

public Video(props: Object) source

import {Video} from '@osjs/gui/src/components/Video.js'

A video

Params:

NameTypeAttributeDescription
props Object

Properties

props.class String
  • optional

Append this className

props.style Object
  • optional

CSS Style object

props.src String

The video source

props.width number
  • optional

Video width

props.height number
  • optional

Video height

props.poster String
  • optional

Poster image source

props.loop Boolean
  • optional

Loop video

props.autoplay Boolean
  • optional

Autoplay video

props.controls Boolean
  • optional

Show controls

props.onloadeddata Function
  • optional

On loaded data event

public createField(name: String, props: Object, cb: Function, cb: Function): * source

import {createField} from '@osjs/gui/src/element.js'

Creates a new field Element wrapper

Params:

NameTypeAttributeDescription
name String

Field name

props Object

Field props

cb Function

Callback to create inner element => (props)

cb Function

Callback to get value => (event)

Return:

*

public doubleTap(timeout: number): Function source

import {doubleTap} from '@osjs/gui/src/utils.js'

Creates a double-tap event handler

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 250

Timeout

Return:

Function

Handler with => (ev, cb)

public filteredProps(props: Object, filterKeys: String[]): Object source

import {filteredProps} from '@osjs/gui/src/utils.js'

Filter an object based on keys

Params:

NameTypeAttributeDescription
props Object

Props

filterKeys String[]

List of keys to filter

Return:

Object