Mithril Custom Checkbox Component
Fully stylable checkbox and radio input components for Mithril.js. Includes TypeScript types.
Try a live demo here.
Install:
npm install mithril-checkbox
(TypeScript types are included.)
You will need to include the css file for some basic working styles.
Using PostCSS with postcss-import allows you to import the stylesheet from node_modules
:
;
If you're using a sass compiler, you can add:
;
to one of your sass files.
Otherwise you can copy the node_modules/mithril-checkbox/index.css
file to your project and add it to your html page.
Example use:
// var mCheckbox = require('mithril-checkbox').default let checked = falselet radioed = false
See the example source in the git repo for more usage examples.
All Component Options:
(see src/index.ts
)
Development Install:
First git clone this repo. Then:
npm install
Build module
npm run build
Serve, compile & watch example app:
npm start
Then go to http://localhost:3000/ in your browser.