Skip to main content

The Sidebar frame

A container that renders on the left-side of the viewport.

The Sidebar frame is a container that appears as next to the Main frame. Sidebar can automatically configure an optimized mobile layout when viewing web apps on devices with smaller screens. Only one instance of Sidebar can be used.

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

enableFullBleed

Whether to expand the contents to fill available space.

Type boolean
Format True/False
Configurability Inspector > Appearance > Expand contents to fit
Default
false
Examples
true

footerPadding

The amount of padding used within the footer.

Type string
Format Plain Text
Configurability Inspector > Content > Add-ons > Footer > Padding
Allowed Values
ValueUI OptionDescription
8px 12pxNormal

8px top and bottom, 12px left and right.

0None

No padding.

Default
8px 12px
Examples
"8px 12px"

headerPadding

The amount of padding used within the header.

Type string
Format Plain Text
Configurability Inspector > Content > Add-ons > Header > Padding
Allowed Values
ValueUI OptionDescription
8px 12pxNormal

8px top and bottom, 12px left and right.

0None

No padding.

Default
8px 12px
Examples
"8px 12px"

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Configurability Inspector > Appearance > Hidden
Default
false
Examples
true

loading

Whether to display a loading indicator.

Type boolean
Format True/False
Configurability Inspector > Interaction > Loading
Default
false
Examples
true

padding

The amount of padding to render inside.

Type string
Format Plain Text
Configurability Inspector > Spacing > Padding
Allowed Values
ValueDescription
4px 8px

Normal padding.

0

No padding.

Default
4px 8px
Examples
4px 8px

showBorder

Whether to show a border.

Type boolean
Format True/False
Configurability Inspector > Appearance > Show border
Default
false
Examples
true

showFooter

Whether to show the footer area.

Type boolean
Configurability Inspector

Examples
true


Examples
true

tooltipText

The tooltip text to display next to the label on hover.

Type string
Format Markdown
Configurability Inspector > Content > Add-ons > Helper text
Default
null
Examples
Submit

width

The width.

Type number
Format Integer
Configurability Inspector
Examples
1280

Methods

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

sidebar.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
sidebar.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide sidebar.

sidebar.setHidden(true);

Unhide sidebar.

sidebar.setHidden(false);

sidebar.showFooter()

Set the showFooter value to toggle whether the component footer is visible.

Definition
sidebar.showFooter(showFooter)
Parameters

showFooter

Whether to show the footer area.

Type boolean

Examples

Show the footer of sidebar.

sidebar.setShowFooter(true);

Hide the footer of sidebar.

sidebar.setShowFooter(false);

sidebar.showHeader()

Set the showHeader value to toggle whether the component header is visible.

Definition
sidebar.showHeader(showHeader)
Parameters

showHeader

Whether to show the header area.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Show the header of sidebar.

sidebar.setShowHeader(true);

Hide the header of sidebar.

sidebar.setShowHeader(false);