---
schema_version: "1"
id: dbcf0b9ad6a03ea08ef247e257e1b4e973ff979130ec64f2f452b02256fb80c1
title: Container Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_Container.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 52f5a6b67ff19efbfa1151f2596b58d60c083cc4696f2b9244214a41692bf548
description: Represents a location and style in which to display more than one custom console component in the sidebars of the console.The height of the component’s container. The unit property determines the unit of measurement, in pixels or percent.If set to true, stacked console components in the sidebars autosize vertically.The location of the component’s container (right, left, bottom, top).Represents a specific custom console component to display in the components’ container. The style of the container in which to display multiple components (stack, tab, accordion).The unit of measurement, in pixels or percent, for the height or width of the components’ container.The width of the component’s container. The unit property determines the unit of measurement, in pixels or percent.Makes a duplicate copy of the Metadata.Container.
---
# Container Class

Represents a location and style in which to display more than one custom console component in the sidebars of the console.

## Namespace

[Metadata](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Metadata.htm "The Metadata namespace provides classes and methods for working with custom metadata in Salesforce")

## Usage

Use this class when accessing [Metadata.Layout](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Layout.htm#apex_class_Metadata_Layout "Represents the metadata associated with a page layout.") metadata components. For more information, see “Container” in the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_intro.htm).

- **[Container Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_properties)**
- **[Container Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_methods)**

## Container Properties

The following are properties for Container.

- **[height](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_height)**  
    The height of the component’s container. The unit property determines the unit of measurement, in pixels or percent.
- **[isContainerAutoSizeEnabled](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_isContainerAutoSizeEnabled)**  
    If set to true, stacked console components in the sidebars autosize vertically.
- **[region](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_region)**  
    The location of the component’s container (right, left, bottom, top).
- **[sidebarComponents](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_sidebarComponents)**  
    Represents a specific custom console component to display in the components’ container.
- **[style](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_style)**  
    The style of the container in which to display multiple components (stack, tab, accordion).
- **[unit](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_unit)**  
    The unit of measurement, in pixels or percent, for the height or width of the components’ container.
- **[width](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_width)**  
    The width of the component’s container. The unit property determines the unit of measurement, in pixels or percent.

### height

The height of the component’s container. The unit property determines the unit of measurement, in pixels or percent.

#### Signature

public Integer height {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### isContainerAutoSizeEnabled

If set to true, stacked console components in the sidebars autosize vertically.

#### Signature

public Boolean isContainerAutoSizeEnabled {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### region

The location of the component’s container (right, left, bottom, top).

#### Signature

public String region {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### sidebarComponents

Represents a specific custom console component to display in the components’ container.

#### Signature

public List<Metadata.SidebarComponent> sidebarComponents {get; set;}

#### Property Value

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[Metadata.SidebarComponent](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_class_Metadata_SidebarComponent "Represents a specific custom console component to display in a container that hosts multiple components in one of the sidebars of the Salesforce console.")\>

### style

The style of the container in which to display multiple components (stack, tab, accordion).

#### Signature

public String style {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### unit

The unit of measurement, in pixels or percent, for the height or width of the components’ container.

#### Signature

public String unit {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### width

The width of the component’s container. The unit property determines the unit of measurement, in pixels or percent.

#### Signature

public Integer width {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

## Container Methods

The following are methods for Container.

- **[clone()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Container.htm#apex_Metadata_Container_clone)**  
    Makes a duplicate copy of the Metadata.Container.

### clone()

Makes a duplicate copy of the Metadata.Container.

#### Signature

public Object clone()

#### Return Value

Type: Object