Data Entry

Radio

Basic


Requirement

This component requires the Tailwind Forms Plugin to be installed.
Please refer to the Installation guide for instructions.

In your tailwind.config.js:

module.exports = {
  // ...
  plugins: [
    // ...
    require('@tailwindcss/forms'),
  ],
}

Description

This component is used to create a radio button. It can be used alone or in a group.


API

Supports global configuration

View the default configuration for this component. Learn more about global configuration.

import { LuiRadioModule } from '@lqvrent-workspace/lqvrent-ui/radio';
<lui-radio-group [(ngModel)]="value">
  <label lui-radio luiValue="A">A</label>
  <label lui-radio luiValue="B">B</label>
</lui-radio-group>

[lui-radio]

component Standalone
PropertyDescriptionTypeDefault
[luiValue]Value of the radio buttonany-
[luiDisabled]Disable the radio buttonbooleanfalse
[luiAutofocus]Autofocus the radio buttonbooleanfalse
[luiRadioClass]Styling classstringdefined in config

lui-radio-group

component Standalone
PropertyDescriptionTypeDefault
[luiMode]Mode of the group'default' | 'card' | 'tabs'default
[luiDisabled]Disable the groupbooleanfalse
[luiName]Name of the groupstring-
[luiTabsVertical]If luiMode is tabs, display the tabs verticallybooleanfalse

More examples

Radio group

Vertical radio group

Radio group inline label

Dynamic radio group

Radio group name

The luiName attribute allows the browser to see the group as a "real" radio group. This is useful for accessibility purposes.

Radio group card

To customize the style of the card, you must edit the card property in the global configuration.

Radio group card responsive

Radio group tabs

To customize the style of the tabs, you must edit the tabs property in the global configuration.

Radio group tabs vertical

Previous
Input