view_object: View Object

View source: R/views.R

view_objectR Documentation

View Object

Description

Views are app-customized visual areas within modals and Home tabs.

Usage

view_object(
  type,
  title,
  blocks,
  close = NULL,
  submit = NULL,
  private_metadata = NULL,
  callback_id = NULL,
  clear_on_close = NULL,
  notify_on_close = NULL,
  external_id = NULL
)

Arguments

type

The type of view. Set to modal for modals and home for Home tabs. Used for Modals and Home Tabs.

title

The title that appears in the top-left of the modal. Must be a plain_text text element with a max length of 24 characters. Used for Modals.

blocks

A list of blocks that defines the content of the view. Max of 100 blocks. Used for Modals and Home tabs.

close

An optional text_object that defines the text displayed in the close button at the bottom-right of the view. Max length of 24 characters. Used for Modals.

submit

An optional text_object that defines the text displayed in the submit button at the bottom-right of the view. submit is required when an input block is within the blocks array. Max length of 24 characters. Used for Modals.

private_metadata

An optional string that will be sent to your app in view_submission and block_actions events. Max length of 3000 characters. Used for Modals Home tabs.

callback_id

An identifier to recognize interactions and submissions of this particular view. Don't use this to store sensitive information (use private_metadata instead). Max length of 255 characters. Used for Modals Home tabs.

clear_on_close

When set to true, clicking on the close button will clear all views in a modal and close it. Defaults to false. Used for Modals.

notify_on_close

Indicates whether Slack will send your request URL a view_closed event when a user clicks the close button. Defaults to false. Used for Modals.

external_id

A custom identifier that must be unique for all views on a per-team basis. Used for Modals Home tabs.

Value

A View Object

See Also

https://api.slack.com/reference/surfaces/views

Other Views: views_open(), views_publish(), views_push(), views_update()


samterfa/slackme documentation built on April 11, 2022, 3:29 a.m.