Skip to content
Brandon Jordan edited this page Sep 15, 2022 · 14 revisions

Welcome to the jsUI wiki! I make jsUI and continue to make jsUI because it's fun and because I feel like I discover more and more uses for it the more I work on it as I've come to find it's very hackable.

Getting Started

Install via NPM:

npm i javascript-ui

Import and start with the view() function.

import * as jsUI from 'javascript-ui';

jsUI.view([
	// components...
]);

To use the built-in components, simply import them.

import {Section, Text} from 'javascript-ui';

Set Accent and Icon

jsUI has built-in functions to apply an accent color to the outlines, selection highlighting, and text cursor. It also has a function to apply an icon to the apple-touch-icon and icon <link> tags. The idea with jsUI, is that you touch as little CSS and HTML as possible.

jsUI.accentColor('#924ff0');
jsUI.icon('icon.png');

// or after to the view() or router() function...

jsUI.view([
    // ...
])
    .accentColor('#924ff0')
    .icon('icon.png');

Clone this wiki locally