GithubHelp home page GithubHelp logo

ganeshsivakumar / jhoo Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 15 KB

A dart package to build websites

Home Page: https://pub.dev/packages/jhoo

License: MIT License

HTML 4.17% Dart 93.49% CSS 2.35%
dart dart-web web

jhoo's Introduction

Dart package to build websites

Features

Jhoo can help you create pure dart web apps with flutter like syntax

Getting started

Start by importing the package

import 'package:jhoo/jhoo.dart';
import 'package:jhoo/src/elements/elementTree/tree.dart';

Use createPage() inside main method to create a new HTML page, provide pageName and element to the createPage() method.

void main() {
  createPage(pageName: "Home Page", body: HomeElement());
}

pageName is the tile of the html document and body takes the dom element that will be attached to the body of the html document.

You can create dom elements by extending StatefulElement and you can @override build() method to return DomElement.

Here, HomeElement creates 3 Text element, which is 3 'p' html element with their respective id and text.

class HomeElement extends StatefulElement {
  @override
  DomElement build() {
    return Row(children: [
      Text(id: "t1", text: "Welcome to HomePage"),
      Text(id: "t2", text: "This is second element"),
      Text(id: "t3", text: "This is thrid Element")
    ]);
  }
}

Usage

/example contains a sample web app built with Jhoo package, it will demonstrate how you can dynamically update the UI using StreamBuilder from Jhoo.

Additional information

Jhoo package is in it's early stages and not stable, it's under developement. Please feel to share your ideas and contribution.

run dart pub get to fix all errors after cloning the package

jhoo's People

Contributors

ganeshsivakumar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.