Skip to content

hyper-ui/core

Repository files navigation

hyper-ui

A lightweight front-end UI lib.

Links

Hello World

// Define a component called `Greeting`
const Greeting = HUI.define('Greeting', {
    // Define the renderer
    render(props) {
        // Render a simple heading
        return HUI('h1', { style: { textAlign: 'center' } }, [
            'Hello,',
            props.target,
            '!'
        ]);
    }
});
// Render the app
HUI.render(
    // Create a greeting instance
    HUI(Greeting, { target: 'world' })
);