Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Codes authored Nov 17, 2017
1 parent 882c748 commit a180b82
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
# kanban
Pure JavaScript KanBan: [Live Demo](https://sean-codes.github.io/kanban/example/basic.html)
> Pure JavaScript KanBan:
## Demo
![example](https://github.com/sean-codes/kanban/blob/master/image.gif?raw=true)
Try out the [demo](https://sean-codes.github.io/kanban/example/basic.html)

## Setup
```js
var kanban = new Kanban({
selector: '#myKanBan',
lanes: [
{ title: 'Lane 1', name: 'lane1' }
],
title: (title) => { return title },
content: (content) => { content },
cards: [
{
lane: 'lane1',
content: 'Test Card 1'
},
{
lane: 'lane2',
content: 'Test Card 2'
}
]
})
```

The options are detailed below.

#### `lanes [array]`

An array of lanes. A lane has title and id. The title value is passed to the title callback

#### `cards [array]`

An array of cards. A card requires a lane and content. The content value is passed to the content callback

#### `title [function`

Called when creating a lane. return the html to be placed within lane title

#### `content [function]`

Called when creating a card. return the html to be placed within a cards content

0 comments on commit a180b82

Please sign in to comment.