Skip to content

Commit 1bb9e46

Browse files
Raise limits for components in messages (#7534)
* Raise the roof * Container opened
1 parent 7f99239 commit 1bb9e46

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Raised Component Limits"
3+
date: "2025-04-29"
4+
topics:
5+
- "User Apps"
6+
- "HTTP API"
7+
- "Interactions"
8+
---
9+
10+
We're removing the top level component limit and raising the limit on number of components in a message to 40 when using the [`IS_COMPONENTS_V2` message flag](/docs/resources/message#message-object-message-flags)! We're also removing the limit on the number of components in a [Container Component](/docs/components/reference#container). Legacy messages have not changed and continue to allow up to 5 action rows.
11+
12+
#### What's New
13+
14+
- **Total components**: The limit for total components in a message has been increased to 40.
15+
- **Top-level components**: There is no longer a limit on top level components in a message (previously it was 10).
16+
- **[Container Component](/docs/components/reference#container)**: There is no longer a limit on the number of components in a Container Component (previously it was 10).
17+
18+
#### Developer Resources
19+
20+
- Check out our [Component Reference](/docs/components/reference) for detailed specifications on all available components.
21+
- Learn how to build rich message layouts with components with [Using Message Components](/docs/components/using-message-components).

docs/components/reference.mdx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use these components, you need to send the [message flag](/docs/resources/mes
1515
- The `content` and `embeds` fields will no longer work but you'll be able to use [Text Display](/docs/components/reference#text-display) and [Container](/docs/components/reference#container) as replacements
1616
- Attachments won't show by default - they must be exposed through components
1717
- The `poll` and `stickers` fields are disabled
18-
- Messages currently allow up to 10 top-level components and 30 total components
18+
- Messages allow up to 40 total components
1919

2020
:::info
2121
[Legacy component behavior](/docs/components/reference#legacy-message-component-behavior) will continue to work but provide less flexibility and control over the message layout.
@@ -1080,7 +1080,7 @@ To use this component, you need to send the [message flag](/docs/resources/messa
10801080

10811081
## Container
10821082

1083-
A Container is a top-level layout component that holds up to 10 components. Containers are visually distinct from surrounding components and have an optional customizable color bar.
1083+
A Container is a top-level layout component. Containers are visually distinct from surrounding components and have an optional customizable color bar.
10841084

10851085
Containers are only available in messages.
10861086

@@ -1090,13 +1090,13 @@ To use this component, you need to send the [message flag](/docs/resources/messa
10901090

10911091
###### Container Structure
10921092

1093-
| Field | Type | Description |
1094-
|---------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1095-
| type | integer | `17` for container component |
1096-
| id? | integer | Optional identifier for component |
1097-
| components | array of components | Up to 10 components of the type [action row](/docs/components/reference#action-row), [text display](/docs/components/reference#text-display), [section](/docs/components/reference#section), [media gallery](/docs/components/reference#media-gallery), [separator](/docs/components/reference#separator), or [file](/docs/components/reference#file) |
1098-
| accent_color? | ?integer | Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF` |
1099-
| spoiler? | boolean | Whether the container should be a spoiler (or blurred out). Defaults to `false`. |
1093+
| Field | Type | Description |
1094+
|---------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1095+
| type | integer | `17` for container component |
1096+
| id? | integer | Optional identifier for component |
1097+
| components | array of components | Components of the type [action row](/docs/components/reference#action-row), [text display](/docs/components/reference#text-display), [section](/docs/components/reference#section), [media gallery](/docs/components/reference#media-gallery), [separator](/docs/components/reference#separator), or [file](/docs/components/reference#file) |
1098+
| accent_color? | ?integer | Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF` |
1099+
| spoiler? | boolean | Whether the container should be a spoiler (or blurred out). Defaults to `false`. |
11001100

11011101
###### Example
11021102

@@ -1172,6 +1172,10 @@ Before the introduction of the `IS_COMPONENTS_V2` flag ([see changelog](/docs/ch
11721172

11731173
Apps using this Legacy Message Component behavior will continue to work as expected, but it is recommended to use the new `IS_COMPONENTS_V2` flag for new apps or features as they offer more options for layout and customization.
11741174

1175+
:::info
1176+
Legacy messages allow up to 5 action rows as top-level components
1177+
:::
1178+
11751179
Legacy Message Component Example
11761180

11771181
```json

0 commit comments

Comments
 (0)