Skip to main content

Container component

The properties for the container component in the Method app builder.

The container component is a component that groups and holds other components. Other components can be dragged into a container component.


Container component properties

Selecting the component shows its configurable properties.

Display

Container type

  • Fixed: The container always shows its contents. This is the default for a new container.

  • Collapsible: The container works like an accordion. Users click its header to open or close it. Choosing Collapsible turns Show header on, and turning Show header off makes the container Fixed again.

Show header

Toggle the visibility of the area above the container which holds the Title and icon. The header can show whether Border is on or off.

Title

Text to identify the component. The title will show in the header if the header is visible.

Show icon

Toggle the visibility of an icon. Shown in the header if the header is visible.

Icon

Select an icon from the provided list of icons.

Default state

The default state of the component (Regular/Hidden/Disabled).

Default expansion

Only shown when Container type is Collapsible.

  • Collapsed: The container is closed when the screen loads and shows only its header. This is the default when you first choose Collapsible.

  • Expanded: The container is open when the screen loads.

Layout

Display

  • Grid: Freely place components which snap to a grid.

  • Flex: Placed components will automatically adjust to fit the space (see below for parameters).

Height

  • Auto: The container fits its content. It grows as components are added and shrinks when they are removed, and it resizes on screen when components are shown or hidden. This is the default for a new container.

  • Fixed: Drag the container's bottom edge to set its height. Content that doesn't fit scrolls inside the container.

A container placed inside a Flex container also has a Fill option. Fill isn't available while the parent container's Height is set to Auto.

Styles

Background color

Choose between White | Fog | Silver

Border

Toggle the visibility of a border around the container.

Drop shadow

Toggle the visibility of a drop shadow on the border, if the border is visible.


Collapsible containers

A collapsible container works like an accordion section. Users click its header to open or close it, and a chevron next to the title shows whether it is open or closed.

  • When a container is collapsed, it shrinks to its header and everything below it moves up.

  • Container type and Default expansion can differ between desktop and mobile. Settings you choose for desktop apply to mobile until you change them on mobile, and a change made on mobile is kept when you later change desktop. For example, a container can always be open on desktop and start collapsed on mobile.

  • In the Builder, a collapsible container opens while it is selected and when hidden components are shown, so you can work on its contents.

  • A disabled collapsible container cannot be opened or closed.

  • To open or close a collapsible container from an action set, use the Expand/Collapse Container action.


Layout - Flex

When the container is set to flex, components placed will automatically adjust to fit the container.

Layout

Direction

Sets whether items are laid out in a row (left to right) or a column (top to bottom).

Distribute

Sets where items sit along the direction: at the start, in the center, at the end, or spread out evenly.

Alignment

Sets how items line up with each other across the direction: top, center, bottom, or along their text baseline.

Gap

Sets the space between items, in pixels.

Allow wrapping

Moves items onto a new line when they don't fit in one row or column.

Did this answer your question?