Lowcoder Documentation
  • Lowcoder overview
    • The "Hello World" walk
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Google Cloud Platform
      • Easypanel
      • Heroku
      • Raspberry Pi
      • Access local database or API
      • Update MongoDB Versions
      • Lowcoder Version Update
      • Traefik loadbalancer
      • SMTP Server
      • Migration from Openblocks
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
      • SAAS Mode
      • Enterprise Mode
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • Lowcoder Marketplace
  • ✨Build Applications
    • Create a new App
      • App(s) Navigation
      • Modules
      • Version and Release Management
    • App Editor
      • Query & Editing Roundtrips
      • Bulk Editing
      • Keyboard shortcuts
      • Data selection & Javascript
      • Layers
      • Visual Components
        • Common Component Settings
        • Messages / Toast
        • Dashboard & Reporting
          • Table
          • Charts and graphs
            • Bar Chart
            • Line Chart
            • Pie Chart
            • Scatter Chart
            • CandleStick Chart
            • Funnel Chart
            • Gauge Chart
            • Graph Chart
            • Heatmap Chart
            • Radar Chart
            • Sankey Chart
            • Suburst Chart
            • Theme River Chart
            • Tree Chart
            • Treemap Chart
            • Mermaid Chart
          • Google Maps
        • Layout & Navigation
          • List View
          • Drawer
          • Modal
          • Navigation
          • Cascader
          • Tree / Tree Select
          • Link
          • Floating Button
          • Text
          • Step Control
          • Page Layout
          • Content Card
          • Tabbed Container
        • Data Collection & Forms
          • Form
          • Input Field Types
          • JSON Schema Form
        • Meeting & Collaboration
        • Project Management
        • Calendar & Scheduling
          • Calendar
          • Date & Date Range
          • Time & Time Range
        • Document & File Management
          • File upload
        • Item & Signature Handling
        • Multimedia & Animation
          • Image
        • Integration & Extension
        • Legacy & Deprecated
      • Option lists
      • Date handling
      • Use Markdown
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
    • Video Calls in Lowcoder
  • 🚀Connect your Data
    • Data source basics
      • Configure IP allowlists
    • Data sources in Lowcoder
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • Supabase
          • Supabase PostgreSQL
          • Supabase Assets API
          • Supabase RealTime
          • Supabase OAuth
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embed an App
      • Embed App in HTML Pages
      • Embed App in WordPress Pages
      • Embed Apps in React
      • Embed Apps in NEXT.JS
      • Native embed SDK
        • Build the SDK from Source
  • 🔥Lowcoder Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • Lowcoder Open REST API
  • Lowcoder for Enterprise
    • Custom branding
Powered by GitBook
LogoLogo

More to try...

  • Lowcoder Website
  • Free Cloud Platform
  • Github
  • Discord

© Lowcoder Software LTD

On this page
  • Layout
  • Position
  • Resize
  • Events
  • Trigger openDrawer
  • Trigger closeDrawer
  • Component Playground
  • Component Auto-Docs
  • Properties of the Drawer component
  • Methods

Was this helpful?

  1. Build Applications
  2. App Editor
  3. Visual Components
  4. Layout & Navigation

Drawer

In Lowcoder, Drawer is an overlay sidebar to display information or perform operations, without interrupting the workflow on the main window.

The following example builds a shopping cart using a drawer.

Layout

When inserted by drag-and-drop operation, a Drawer floats on the right side (by default) of the main window. Then, you can add components onto the Drawer according to your needs. In the editing mode of a Drawer, other components on the canvas are not editable.

When a drawer is closed, you can re-open it by clicking the corresponding label in the Modals tab in the left pane.

Position

In the Properties tab, you can set the position of the drawer. The default position is the right side of the main window.

Resize

In Properties tab, you can set the width of the drawer by pixels or percentage. Note that the height of a drawer is the same as the main window and is not customizable.

Events

You can reference a drawer in JS code anywhere in your app or call it through a "control component" action in Properties > Interaction > Event handlers.

The following sections guide you through how to open and close a drawer by clicking a button in an online shopping app.

Trigger openDrawer

  1. Add a button and rename it as gotoCart.

  2. Set the event handler of the button. Select "Control component" as the Action and select the component "cart" and method "openDrawer". All these settings are auto-saved.

  3. Click the button gotoCart and the binded drawer "cart" is open.

// Some code
drawer1.openDrawer();

Trigger closeDrawer

  1. Add a button and rename it as gobackShopping.

  2. Set the event handler of the button. Select "Control component" as the Action and select the component "cart" and method "closeDrawer". All these settings are auto-saved.

  3. Click the "Continue Shopping" button and the binded drawer "cart" is closed.

// Some code
drawer1.closeDrawer();

Component Playground

On Component Playground, you can interact with the Drawer component and explore it's Properties, Events and Methods. Play with different Styling properties to see the effect on the Drawer component.

Component Auto-Docs

In the Auto-Docs of Drawer component, we have shown how to use different properties of the Drawer component. It also includes the Styling properties of the Drawer component.

Properties of the Drawer component

Property Name
Description

visibile

Returns True or False based on whether the Drawer component is visible or not

Methods

You have the capability to engage with components via their respective methods, which can be accessed by their designated names within any segment where JavaScript is utilized. Additionally, these components can be activated through the 'Control Component' action, which is triggered in response to specific events.

setVisible() :

drawer1.setVisible() method sets the Drawer's Visible property, due to which Drawer component is shown or not.

drawer1.setVisible(true);

clearVisible() :

drawer1.clearVisible() clears the Drawer's Visible property and empties the already set value in the Drawer component.

drawer1.clearVisible();

resetVisible() :

drawer1.resetVisible() method resets the drawer's visible property to the default value of the drawer component.

drawer1.resetValue();
PreviousList ViewNextModal

Last updated 25 days ago

Was this helpful?

Usually, in an app, you trigger opening a drawer by an event such as clicking a button. For example, in the , opening a drawer to display the shopping cart is implemented in the following steps.

Triggerring "closeDrawer" is similar to triggering "openDrawer". When setting up the event handler, select the method "closeDrawer". For example, in the , closing a drawer that displays the shopping cart is implemented in the following steps.

✨
Online Shopping demo
Online Shopping demo
Lowcoder | rapid App & VideoMeeting builder for everyone.
Lowcoder | rapid App & VideoMeeting builder for everyone.