BlockBox.BlockElements (blockbox v1.2.1)

Defines generator functions for all block elements.

Link to this section Summary

Link to this section Types

Link to this type

multi_select_menu_type()

@type multi_select_menu_type() ::
  :multi_static_select
  | :multi_external_select
  | :multi_users_select
  | :multi_conversations_select
  | :multi_channels_select
Link to this type

select_menu_type()

@type select_menu_type() ::
  :static_select
  | :external_select
  | :users_select
  | :conversations_select
  | :channels_select

Link to this section Functions

Link to this function

button(text, action_id, opts \\ [])

Creates a button element.

options

Options

Options are not included by default.

Link to this function

checkboxes(action_id, options, opts \\ [])

@spec checkboxes(
  String.t(),
  [BlockBox.CompositionObjects.option_object()],
  keyword()
) :: map()

Creates a checkbox group element.

options

Options

Options are not included by default.

Link to this function

datepicker(action_id, opts \\ [])

@spec datepicker(
  String.t(),
  keyword()
) :: map()

Creates a datepicker element.

options

Options

Options are not included by default.

Link to this function

image(image_url, alt_text)

@spec image(String.t(), String.t()) :: map()

Creates an image element.

Link to this function

multi_select_menu(placeholder, type, action_id, opts \\ [])

Creates a multi-select menu element.

ONLY ONE of the following k/v pairs must be included in the options:

options

Options

Options are not included by default.

Link to this function

overflow_menu(action_id, options, opts \\ [])

@spec overflow_menu(
  String.t(),
  [BlockBox.CompositionObjects.option_object()],
  keyword()
) :: map()

Creates an overflow menu element.

options

Options

Options are not included by default.

Link to this function

plain_text_input(action_id, opts \\ [])

@spec plain_text_input(
  String.t(),
  keyword()
) :: map()

Creates a plain text input element.

options

Options

Options are not included by default.

Link to this function

radio_buttons(action_id, options, opts \\ [])

@spec radio_buttons(
  String.t(),
  [BlockBox.CompositionObjects.option_object()],
  keyword()
) :: map()

Creates a radio button group element.

options

Options

Options are not included by default.

Link to this function

select_menu(placeholder, type, action_id, opts \\ [])

Creates a select menu element.

ONLY ONE of the following k/v pairs must be included in the options:

options

Options

Options are not included by default.