Skip to content
@craftkit

craftkit

Unlock WebUI OOP excellence with pure JavaScript and ShadowDOM for dynamic, encapsulated web interfaces.

Write web apps as if they're native apps!

craftkit is a cutting-edge library designed for imperative programming on the web, harnessing the power of the Shadow DOM.

It's time to embrace the Shadow DOM and leave the Virtual DOM behind!

code2

Show as text
classGreetingextendsCraft.UI.View{constructor(){super();this.views={local: newLocal(),world: newWorld()};}viewDidLoad(callback){this.appendView({id: "whom",component: this.views.local});if(callback){callback();}}greet(){this.replaceView({id: "whom",component: this.views.world});}style(componentId){return` .container { display: flex; flex-direction: row; } `;}template(componentId){return` <div class="root"> <div class="container> <div>Hello</div> <div id="whom"></div> </div> <button onclick="${componentId}.greet()">Greet</button> </div> `;}}classHelloPlaceextendsCraft.UI.View{constructor(){super();this.data={place: "Any Where"};}style(componentId){return` .msg { color: blue; } `;}template(componentId){return` <div class="root"> <span class="msg">${this.data.place}<\span> </div> `;}}classLocalextendsHelloPlace{constructor(){super();this.data={place: "Local"};}}classWorldextendsHelloPlace{constructor(){super();this.data={place: "World!"};}style(componentId){returnsuper.style(componentId)+` .msg { color: red; } `;}}

Pinned Loading

  1. craft-bootloadercraft-bootloaderPublic

    Ultra fast web application loader by caching all libraries in IndexedDB.

    JavaScript 2

  2. craft-widget-stickyheadernavicraft-widget-stickyheadernaviPublic

    Sticky header navigation system with parallax scrolling effect, for both browser and PWA.

    JavaScript 1

  3. craft-widget-navigationgroupcraft-widget-navigationgroupPublic

    Classic stack navigation for Craft-UIKit

    JavaScript 1

  4. craftkit-playgroundcraftkit-playgroundPublic

    Online tutorial for CraftKit

    JavaScript 2

  5. craft-widget-quicktoolscraft-widget-quicktoolsPublic

    Widgets for your first Craft-UIKit application

    JavaScript 1

Repositories

Showing 10 of 13 repositories

Top languages

Loading…

Most used topics

Loading…