Slackblocks.Blocks.Container (slackblocks v2.8.0)
View SourceA titled group of blocks that can optionally collapse.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/container-block
Fields
child_blocks— Adds the blocks grouped inside the container, in display order. Required.title— Sets the container title. Provide either a title or a rich text title. Optional;nilomits the field.rich_text_title— Sets a rich text block used as the title in place of a plain-text title. Optional;nilomits the field.subtitle— Sets the supporting text shown below the title. Optional;nilomits the field.width— Sets the horizontal width of the container. Optional;nilomits the field.icon— Sets the image displayed beside the title. Optional;nilomits the field.is_collapsible— Sets whether users can collapse and expand the container. Optional;nilomits the field.default_collapsed— Sets whether a collapsible container starts collapsed. Requires the container to be collapsible. Optional;nilomits the field.has_header_divider— Sets whether Slack draws a divider below the container header. Only valid for non-collapsible containers. Optional;nilomits the field.block_id— Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again. Optional;nilomits the field.
Summary
Functions
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.
Types
@type t() :: %Slackblocks.Blocks.Container{ block_id: binary() | nil, child_blocks: [Slackblocks.Types.block()], default_collapsed: boolean() | nil, has_header_divider: boolean() | nil, icon: Slackblocks.Elements.Image.t() | nil, is_collapsible: boolean() | nil, rich_text_title: Slackblocks.Blocks.RichText.t() | nil, subtitle: Slackblocks.Types.text() | nil, title: Slackblocks.Objects.PlainText.t() | nil, width: Slackblocks.Types.container_width() | nil }
Functions
@spec change( t(), keyword() ) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.