# Enum command::object::Component

> One component. The variant is the wire `type` number.

`zaun_community_protocol::command::object::Component` · Enum

```rust
pub enum Component { … }
```

One component. The variant is the wire `type` number.

## Variants

### `ActionRow(ActionRow)`

1: a row of up to five buttons or one select.

### `Button(Button)`

2.

### `StringSelect(StringSelect)`

3.

### `TextInput(TextInput)`

4: modal only, inside a label.

### `UserSelect(EntitySelect)`

5.

### `RoleSelect(EntitySelect)`

6.

### `MentionableSelect(EntitySelect)`

7: members and roles.

### `ChannelSelect(EntitySelect)`

8.

### `Section(Section)`

9: text with a button or thumbnail beside it (V2).

### `TextDisplay(TextDisplay)`

10: markdown text (V2, modal).

### `Thumbnail(Thumbnail)`

11: a small picture, only as a section's accessory.

### `MediaGallery(MediaGallery)`

12: up to ten pictures (V2).

### `File(FileComponent)`

13: one attached file (V2).

### `Separator(Separator)`

14: space or a line between components (V2).

### `Container(Container)`

17: a box around other components (V2).

### `Label(Label)`

18: a modal field's label around one input.

### `FileUpload(FileUpload)`

19: files the invoker uploads in a modal.

### `RadioGroup(RadioGroup)`

21: one choice among options, in a modal.

### `CheckboxGroup(CheckboxGroup)`

22: several choices, in a modal.

### `Checkbox(Checkbox)`

23: one yes/no box, in a modal.

## Methods

### `kind`

```rust
pub const fn kind(&self) -> u8
```

The wire `type` number.

### `custom_id`

```rust
pub fn custom_id(&self) -> Option<&str>
```

The component's `custom_id`, for the kinds that send interactions or carry input.

### `children`

```rust
pub fn children(&self) -> Vec<&Self>
```

The nested components, in order (children, then a section's accessory, then a
label's input).

## Trait implementations

`Clone`, `Debug`, `Deserialize<'de>`, `Eq`, `PartialEq`, `Serialize`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/command/object/component/enum.Component.html)
