brisky-focus
v1.2.3
Published
Adds state driven focus property to Brisky
Downloads
2
Readme
brisky-focus
###example
const focusableMenu = {
$: 'menu.items.$any',
focusableMenuItem = {
text: {
$: 'title'
},
focus: {
$: '$parent.$parent.focus' // define focus (usually defined on holder)
autofocus: true // define if dom:focus is applied (defaults to true)
}
}
}
const state = {
menu: {
focus: '$root.menu.items.0',
items: [
{ title: 'one item' },
{ title: 'two item' },
{ title: 'three item' }
]
}
}
document.body.appendchild(render(carousel, state))