npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mui-js

v0.3.4

Published

a ui library for mithril

Downloads

13

Readme

mui

A very simple ui library collection.

For demo and document, please check this little demo page.

If you find bugs or get confused, fill a issue please.

usage

  • run npm i --save mui-js mithril mmsvg mss-js.

  • use webpack as build tool.

Example usage:

m = require 'mithril'
s = require 'mss-js'
Modal = require 'mui-js/Modal'  # webpack support this requiring style!

# we use coffee class instead of mithril controller here
class Demo
    constructor: ->
        @modalElem = new Modal
            widget: view: ->
                m 'h', 'hello wolrd'


    view: -> [
        m 'button', {onclick: @modalElem.show}, 'show me'
        @modalElem.view()
    ]

# inject style into page before injecting dom
s.tag Modal.mss

m.mount main, new Demo()

These stateful components can keep your model out of toggle flag or clutter text, and mithril's whole diff engine keep your view sync with dom. so connect them as you wish, don't worried too much about data flow.

index

  • AutoHide, add hide on blur to a widget (click anywhere outside will hide the widget).

  • Button, button with attachable data, prefix/suffix icon.

  • Button, button group with multiple selection by default.

  • Collaspe, aka. accordion widget.

  • DatePicker, a simple date picker w/wo time select.

  • DropDown, a drop down selector.

  • Modal, add modal to a widget with auto centering.

  • Switch, a simple toggle button.

  • TextInput, a text input with validation.

  • Notify, global notify group

  • i18n/style, feel free to modify.

  • utils, a helpers collection:

    • supporting this little library down to IE9

    • use utils.svg to fix m.trust svg glitch.

    • some widget function(spinner...).

    • debounce with leading/trailing trigger.

customization

This library is intended to use with customization if needed, just run npm run dev under mui folder and change anything you want.

license

Please do whatever you want to with this library : )