# `ExGram.Dsl.Keyboard`
[🔗](https://github.com/rockneurotiko/ex_gram/blob/0.65.0/lib/ex_gram/dsl/keyboard.ex#L1)

Keyboard DSL to create inline and reply keyboards easily.

This DSL provides a clean syntax for building `ExGram.Model.InlineKeyboardMarkup`
and `ExGram.Model.ReplyKeyboardMarkup` structures without manually constructing
nested button arrays.

## Example

``` elixir
keyb = keyboard :inline do
  row do
    button "A", callback_data: "a", style: "success"
    button "B", switch_inline_query_current_chat: "b"
  end

  row do
    button "C", callback_data: "C", style: "danger"
    button "D", copy_text: "D"
  end
end
```

See the [Sending Messages guide](sending-messages.md) for more examples.

# `build_keyboard`

```elixir
@spec build_keyboard(
  :inline,
  [[ExGram.Model.InlineKeyboardButton.t()] | nil],
  keyword()
) ::
  ExGram.Model.InlineKeyboardMarkup.t()
@spec build_keyboard(:reply, [[ExGram.Model.KeyboardButton.t()] | nil], keyword()) ::
  ExGram.Model.ReplyKeyboardMarkup.t()
```

# `button`

```elixir
@spec button(
  String.t(),
  keyword()
) :: ExGram.Model.InlineKeyboardButton.t()
```

# `inline_button`

```elixir
@spec inline_button(
  String.t(),
  keyword()
) :: ExGram.Model.InlineKeyboardButton.t()
```

# `keyboard`
*macro* 

```elixir
@spec keyboard(:inline, keyword(), [{:do, any()}]) :: Macro.t()
@spec keyboard(:reply, keyword(), [{:do, any()}]) :: Macro.t()
```

# `remove_keyboard`

```elixir
@spec remove_keyboard(:reply, boolean() | nil) :: ExGram.Model.ReplyKeyboardRemove.t()
```

# `reply_button`

```elixir
@spec reply_button(
  String.t(),
  keyword()
) :: ExGram.Model.KeyboardButton.t()
```

# `row`
*macro* 

```elixir
@spec row([{:do, any()}]) :: Macro.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
