Skip to content

Vertical content alignment in containers #134

Closed
@andrewleader

Description

@andrewleader

Implementation status

Problem

Currently, it's not possible to vertical align content within a column (or within a fixed height container like Timeline). Without vertical alignment on the body and containers itself, you won't be able to achieve things like this...

image

Instead it would look like...

image

Design

Add a new verticalContentAlignment property to Container, Column, and AdaptiveCard:

Property name Type Description
verticalContentAlignment string. Allowed values are "top" (default), "center", and "bottom". Defines how the content should be aligned vertically within the container. "top" indicates that content should be placed at the top. "center" and "bottom" function the same other than simply placing at center or at bottom.

Because we are introducing a "height" property, it makes sense to also rename the "size" property of a Column to "width"

Example

Card payload

{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.1",
	"verticalContentAlignment": "center",
	"body": [
		{
			"type": "TextBlock",
			"text": "Hi,"
		},
		{
			"type": "TextBlock",
			"text": "MasterHip",
			"isSubtle": true
		}
	]
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions