Standard Components

In oneJS you can use the full set of standard HTML tags and React Native components out of the box; import them from the @onejs-dev/components package and use them as any other function component. You can also choose to set them up yourself by using the BaseComponent function.

Web Components

The table below contains the full list of HTML tags. You can use all of them in oneJS for web just by importing the corresponding function name from @onejs-dev/components.

Tag

Function

Description

Has Children

<a>

HtmlA

Link

Yes

<abbr>

HtmlAbbr

Link

Yes

<address>

HtmlAddress

Link

Yes

<area>

HtmlArea

Link

No

<article>

HtmlArticle

Link

Yes

<aside>

HtmlAside

Link

Yes

<audio>

HtmlAudio

Link

Yes

<b>

HtmlB

Link

Yes

<base>

HtmlBase

Link

No

<bdi>

HtmlBdi

Link

Yes

<bdo>

HtmlBdo

Link

Yes

<blockquote>

HtmlBlockquote

Link

Yes

<body>

HtmlBody

Link

Yes

<br>

HtmlBr

Link

No

<button>

HtmlButton

Link

Yes

<canvas>

HtmlCanvas

Link

Yes

<caption>

HtmlCaption

Link

Yes

<cite>

HtmlCite

Link

Yes

<code>

HtmlCode

Link

Yes

<col>

HtmlCol

Link

No

<colgroup>

HtmlColgroup

Link

No

<data>

HtmlData

Link

Yes

<datalist>

HtmlDatalist

Link

Yes

<dd>

HtmlDd

Link

Yes

<del>

HtmlDel

Link

Yes

<details>

HtmlDetails

Link

Yes

<dfn>

HtmlDfn

Link

Yes

<dialog>

HtmlDialog

Link

Yes

<div>

HtmlDiv

Link

Yes

<dl>

HtmlDl

Link

Yes

<dt>

HtmlDt

Link

Yes

<em>

HtmlEm

Link

Yes

<embed>

HtmlEmbed

Link

No

<fieldset>

HtmlFieldset

Link

Yes

<figcaption>

HtmlFigcaption

Link

Yes

<figure>

HtmlFigure

Link

Yes

<footer>

HtmlFooter

Link

Yes

<form>

HtmlForm

Link

Yes

<h1>

HtmlH1

Link

Yes

<h2>

HtmlH2

Link

Yes

<h3>

HtmlH3

Link

Yes

<h4>

HtmlH4

Link

Yes

<h5>

HtmlH5

Link

Yes

<h6>

HtmlH6

Link

Yes

<head>

HtmlHead

Link

Yes

<header>

HtmlHeader

Link

Yes

<hr>

HtmlHr

Link

No

<html>

HtmlHtml

Link

Yes

<i>

HtmlI

Link

Yes

<iframe>

HtmlIframe

Link

Yes

<img>

HtmlImg

Link

No

<input>

HtmlInput

Link

No

<ins>

HtmlIns

Link

Yes

<kbd>

HtmlKbd

Link

Yes

<label>

HtmlLabel

Link

Yes

<legend>

HtmlLegend

Link

Yes

<li>

HtmlLi

Link

Yes

<link>

HtmlLink

Link

No

<main>

HtmlMain

Link

Yes

<map>

HtmlMap

Link

Yes

<mark>

HtmlMark

Link

Yes

<meta>

HtmlMeta

Link

No

<meter>

HtmlMeter

Link

Yes

<nav>

HtmlNav

Link

Yes

<noscript>

HtmlNoscript

Link

Yes

<object>

HtmlObject

Link

Yes

<ol>

HtmlOl

Link

Yes

<optgroup>

HtmlOptgroup

Link

Yes

<option>

HtmlOption

Link

Yes

<output>

HtmlOutput

Link

Yes

<p>

HtmlP

Link

Yes

<param>

HtmlParam

Link

No

<picture>

HtmlPicture

Link

Yes

<pre>

HtmlPre

Link

Yes

<progress>

HtmlProgress

Link

Yes

<q>

HtmlQ

Link

Yes

<rp>

HtmlRp

Link

Yes

<rt>

HtmlRt

Link

Yes

<ruby>

HtmlRuby

Link

Yes

<s>

HtmlS

Link

Yes

<samp>

HtmlSamp

Link

Yes

<script>

HtmlScript

Link

Yes

<section>

HtmlSection

Link

Yes

<select>

HtmlSelect

Link

Yes

<small>

HtmlSmall

Link

Yes

<source>

HtmlSource

Link

No

<span>

HtmlSpan

Link

Yes

<strong>

HtmlStrong

Link

Yes

<style>

HtmlStyle

Link

Yes

<sub>

HtmlSub

Link

Yes

<summary>

HtmlSummary

Link

Yes

<sup>

HtmlSup

Link

Yes

<svg>

HtmlSvg

Link

Yes

<table>

HtmlTable

Link

Yes

<tbody>

HtmlTbody

Link

Yes

<td>

HtmlTd

Link

Yes

<template>

HtmlTemplate

Link

Yes

<textarea>

HtmlTextarea

Link

Yes

<tfoot>

HtmlTfoot

Link

Yes

<th>

HtmlTh

Link

Yes

<thead>

HtmlThead

Link

Yes

<time>

HtmlTime

Link

Yes

<title>

HtmlTitle

Link

Yes

<tr>

HtmlTr

Link

Yes

<track>

HtmlTrack

Link

No

<u>

HtmlU

Link

Yes

<ul>

HtmlUl

Link

Yes

<var>

HtmlVar

Link

Yes

<video>

HtmlVideo

Link

Yes

<wbr>

HtmlWbr

Link

No

Native Components

The table below contains the full list of React Native components. You can use all of them in oneJS native just by importing the corresponding function name from @onejs-dev/components.

Tag

Function

Description

Has Children

ActivityIndicator

RNActivityIndicator

Link

No

Button

RNButton

Link

No

FlatList

RNFlatList

Link

No

Image

RNImage

Link

No

ImageBackground

RNImageBackground

Link

Yes

KeyboardAvoidingView

RNKeyboardAvoidingView

Link

Yes

Modal

RNModal

Link

Yes

Pressable

RNPressable

Link

Yes

RefreshControl

RNRefreshControl

Link

No

ScrollView

RNScrollView

Link

Yes

SectionList

RNSectionList

Link

No

StatusBar

RNStatusBar

Link

No

Switch

RNSwitch

Link

No

Text

RNText

Link

Yes

TextInput

RNTextInput

Link

No

TouchableHighlight

RNTouchableHighlight

Link

Yes

TouchableOpacity

RNTouchableOpacity

Link

Yes

TouchableWithoutFeedback

RNTouchableWithoutFeedback

Link

Yes

View

RNView

Link

Yes

VirtualizedList

RNVirtualizedList

Link

No

DrawerLayoutAndroid

RNDrawerLayoutAndroid

Link

Yes

TouchableNativeFeedback

RNTouchableNativeFeedback

Link

Yes

InputAccessoryView

RNInputAccessoryView

Link

Yes

SafeAreaView

RNSafeAreaView

Link

Yes

Example

import {app, read, update} from '@onejs-dev/core';
import {HtmlDiv, HtmlH1, HtmlInput} from '@onejs-dev/components';

const state = {name: 'World'}

const App = () => HtmlDiv()([
    HtmlH1()(`Hello ${read('name')}!`),
    HtmlInput({value: read('name'), onChange: update('name'), placeholder: 'Name'})
]);

app({component: App, state: state});