Skip to content

radio & checkbox components #19

@quinchs

Description

@quinchs

New Components

Radio Group

Attributes

Name Type Description
id? int The optional identifier for the radio group
customId string The custom id of the radio group
options* RadioOption The options for this radio group
required? bool Whether the radio group is required

* can be children

Valid children

  • radio-option
  • interpolation
<radio-group
    id="1"
    customId="my-radio-group"
    required
>
    <radio-option value="opt-1">Option 1</option>
    <radio-option value="opt-2">Option 2</option>
</radio-group>

Radio Option

Aliases

  • option

Attributes

Name Type Description
value string The value of the option
label* string The label displayed for this option
description? string Optional description of this option
default? bool The default state of the option

* can be child of the option

<radio-option
    value="my-opt"
    label="Label text"
    description="Description text"
    default
/>

Checkbox group

Attributes

Name Type Description
id? int The optional identifier for the checkbox group
customId string The custom id of the checkbox group
options* CheckboxOption The options for the checkbox group
min? int The minimum number of items that can be chosen
max? int The maximum number of items that can be chosen
required? bool Whether or not the checkbox group is required

* can be children

<checkbox-group
    customId="my-group"
    required
>
    <checkbox-option value="opt-1" label="option 1"/>
    <checkbox-option value="opt-2" label="option 2"/>
</checkbox-group>

Checkbox Option

Aliases

  • option

Attributes

Name Type Description
value string The value of the option
label* string The label displayed for this option
description? string Optional description of this option
default? bool he default state of the checkbox

* can be child of the option

<checkbox-option
    value="my-opt"
    label="Label text"
    description="Description text"
    default
/>

Checkbox

Attributes

Name Type Description
id? int The optional identifier for the checkbox group
customId string The custom id of the checkbox group
default? bool The default state of the checkbox
<checkbox customId="my-checkbox" />

Waiting for Discord.Net implementation & public release of the feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions