Label and size in Angular Radio Button

25 Sep 20263 minutes to read

This section explains the different sizes and labels.

Label

Angular Radio Button caption can be defined by using the label property. This reduces the manual addition
of label for Angular Radio Button. You can customize the label position before or after the Angular Radio Button through the labelPosition property.

import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { RadioButtonModule } from '@syncfusion/ej2-angular-buttons'
import { enableRipple } from '@syncfusion/ej2-base'




import { Component } from '@angular/core';

@Component({
imports: [
        
        RadioButtonModule
    ],


standalone: true,
    selector: 'app-root',
    template: `<div class="e-section-control">
                <ul>
               <!-- Label position - Left. -->
               <li><ejs-radiobutton label="Left Side Label" name="position" labelPosition="Before"></ejs-radiobutton></li>

               <!-- Label position - Right. -->
               <li><ejs-radiobutton label="Right Side Label" name="position" checked="true"></ejs-radiobutton></li>
               </ul>
               </div>`
})

export class AppComponent { }
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
bootstrapApplication(AppComponent).catch((err) => console.error(err));

Size

The different Angular Radio Button size are default and small. To reduce the size of the default RadioButton to small, set the cssClass property to e-small.

import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { RadioButtonModule } from '@syncfusion/ej2-angular-buttons'
import { enableRipple } from '@syncfusion/ej2-base'




import { Component } from '@angular/core';

@Component({
imports: [
        
        RadioButtonModule
    ],


standalone: true,
    selector: 'app-root',
    template: `<div class="e-section-control">
                <ul>
               <!-- Small RadioButton. -->
               <li><ejs-radiobutton label="Small" name="small" checked="true" cssClass="e-small"></ejs-radiobutton></li>

               <!-- Default RadioButton. -->
               <li><ejs-radiobutton label="Default" name="small"></ejs-radiobutton></li>
               </ul>
               </div>`
})

export class AppComponent { }
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
bootstrapApplication(AppComponent).catch((err) => console.error(err));

See Also