<template><divid="app"><banshee-toggle><divslot-scope="{ toggle, on }"><buttonv-on="toggle">Toggle Me</button> {{ on }}
</div></banshee-toggle></div></template>
We can use v-bind object syntax to receive the attrs parameter from the render prop. The attrs object contains a tabIndex and aria-expanded property to give your toggle element better accessibility. It is recommended you always set this.
<template><divid="app"><banshee-toggle><divslot-scope="{ attrs, toggle, on }"><buttonv-bind="attrs"v-on="toggle">Toggle Me</button><br/>
{{ on }}
</div></banshee-toggle></div></template>