Ship faster with goilerplate templUI Pro

Radio

Control for selecting a single option from a list of choices.

Source Tailwind CSS

Unlock advanced features and priority support.

Installation

templui add radio

Examples

Form

You can change your preferences at any time.

We will send you an email when new products are available.

API Reference

Required parameter
Hover for description

Radio

Radio button input for selecting a single option from multiple choices.

Name Type Default
ID

Unique identifier for the radio input element.

string
-
Class

Additional CSS classes to apply to the radio input.

string
-
Attributes

Additional HTML attributes to apply to the radio input element.

templ.Attributes
-
Name

Name attribute for grouping radio buttons together.

string
-
Value

Value attribute for the radio input element.

string
-
Disabled

Whether the radio button is disabled and non-interactive.

bool
false
Checked

Whether the radio button is checked.

bool
false