Drawer
areas: content
A panel which slides in from the edge of the screen.
The Drawer has a single area, content
.
To open the drawer, invoke a drawer method.
Block
Methods
onClick:
- id: toggleOpen
type: CallMethod
params:
blockId: block_id
method: toggleOpen
onClick:
- id: setOpen
type: CallMethod
params:
blockId: block_id
method: setOpen
args:
- open: true
Block Setup
id: block_id
type: Drawer
Settings
Drawer JSON Schema Definition
type: object
properties:
events:
additionalProperties: false
properties:
onClose:
description: Trigger actions when drawer is closed.
type: array
onOpen:
description: Trigger actions when drawer is opened.
type: array
onToggle:
description: Trigger actions when drawer is toggled.
type: array
type: object
properties:
additionalProperties: false
properties:
bodyStyle:
description: Css style to applied to drawer body.
type: object
closable:
default: true
description: >-
Whether a close (x) button is visible on top right of the Drawer dialog
or not.
type: boolean
drawerStyle:
description: Css style to applied to drawer.
type: object
headerStyle:
description: Css style to applied to drawer header.
type: object
height:
default: 256px
description: When placement is top or bottom, height of the Drawer dialog.
type:
- string
- number
keyboard:
default: true
description: Whether support press esc to close.
type: boolean
mask:
default: true
description: Whether to show mask or not.
type: boolean
maskClosable:
default: true
description: >-
Clicking on the mask (area outside the Drawer) to close the Drawer or
not.
type: boolean
maskStyle:
description: Css style to applied to drawer mask.
type: object
placement:
default: right
description: The placement of the Drawer.
enum:
- top
- right
- bottom
- left
type: string
title:
description: The title of the Drawer.
type: string
width:
default: 256px
description: Width of the Drawer dialog.
type:
- string
- number
zIndex:
default: 1000
description: The z-index of the Drawer.
type: integer
type: object