1.1.0 • Published 7 months ago

javascript-ui v1.1.0

Weekly downloads
-
License
GPL-2.0-only
Repository
github
Last release
7 months ago

JavaScript UI

License Version

Javascript UI is a JavaScript framework. It describes HTML and CSS in Javascript similar to SwiftUI.

❇️ Features

  • ✔️ Declarative syntax, functions nest within each other, similar to HTML, but with methods instead of CSS properties and HTML attributes.
  • 😎 Useful shorthands for HTML tags and attributes and CSS properties (e.g. Image().caption()).
  • 🦋 Built-in standard animations like rotate, fade, flip, shake, and more!
  • 🤓 Methods for CSS tricks like truncate(), fontSmoothing(), fit, etc. More CSS tricks are abstracted into views and stacks like ScrollView(), GridStack(), HStack(), VStack(), etc.
  • 🐰 It's fast! Element objects simply provide helpful methods and are used during the first render, but they keep a reference to their element or document fragment. They modify the element directly rather than re-rendering it. There are never entire page re-renders, only selective re-renders when needed for state management.

🔧 Built-ins

  • 💾 Stores
  • ⚛️ State management
  • 🧭 Router

Playground Documentation

Usage

Install via NPM:

npm i javascript-ui

Import and add elements to the view() function.

import {view, Section, Paragraph} from 'javascript-ui';

view([
    Section([
        Paragraph('Hello, World!')
            .textColor('green')
    ])
]);

Resulting HTML:

<section>
    <p style="color: green;">Hello, World!</p>
</section>

Result in browser:

Example


This project aims to create a framework that allows you to create UI in a way that feels natural and easy.

1.1.0

7 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

10 months ago

1.0.4

11 months ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago