Create interactive blocks
Add interactivity to custom blocks in GitBook integrations using inputs, buttons, and more
Buttons and actions
<button
label="Click me"
onPress={{
action: 'update-state',
anotherProperty: 'something'
}}
/>const helloWorldBlock = createComponent({
...
async action(previous, action) {
switch (action.action) {
case 'update-state':
return { state: { content: action.anotherProperty } };
default:
}
},
...
});Text and other inputs
Dynamic binding
Editable blocks
Webframes and actions
Modals
Opening urls
Last updated
Was this helpful?