Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

CommitChange/flimflam

 
 

Repository files navigation

🌀 FLIMFLAM! 🌀

Flimflam is a system and a pattern for creating UI components on the web.

You can visit the website here: http://flimflamjs.github.io/.

At its core, flimflam makes use of snabbdom and flyd for virtual DOM and asynchronous streams.

This package comes with a set of core UI components that we find necessary in most any application. View them in the flimflam/ui directory.

You can view a demo of UI components at this page: http://flimflamjs.github.io/flimflam

Render your UI components to the page using flimflam/render

Example

const h = require('flimflam/h')
const flyd = require('flimflam/flyd')
const render = require('flimflam/render')
const modal = require('flimflam/ui/modal')

// Initialize the state object
const init = function() {
  return { showModal$: flyd.stream(false) }
}

// Render the state into markup
const view = function(state) {
  return h('body', [
    h('button', {on: {click: state.showModal$}}, 'Say Hello')
  , modal({show$: state.showModal$, body: h('p', 'Hello World!')})
  ])
}

render(view, init(), document.body)

Packages

No packages published

Languages

  • HTML 89.9%
  • JavaScript 8.4%
  • CSS 1.7%