Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@exmg/exmg-radio-group

Package Overview
Dependencies
Maintainers
18
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exmg/exmg-radio-group

Paper style radio group element

latest
Source
npmnpm
Version
8.2.4
Version published
Maintainers
18
Created
Source

<exmg-radio-group> Published on npm

@exmg/exmg-radio-group

This package provides radio group functionality.

Components included:

  • exmg-radio-group - parent component
  • exmg-radio-group-item - each children

Components

<exmg-radio-group>

Can contain many exmg-radio-group-item components as it's children. Children of other types are not supported.

API

Slots

NameDescription
defaultSlot to display anything within the item
titleTitle of the description of the exmg-radio-group-item
bodyBody to render additional information within the exmg-radio-group-item

Events

NameDescription
exmg-radio-group-changedwhen selected radio group item changed.

Properties/Attributes

NameTypeDefaultDescription
namestringNoneName of the exmg-radio-group
selectedstringNoneSelected value. Should be value of one of value attributes of children nodes.
requiredbooleanNoneUsed for form validation
verticalstringNoneIf you want to have vertical layout

<exmg-radio-group-item>

Can be used only as children of exmg-radio-group.

Attributes:

  • value - value of particular item.
  • disabled - boolean, should value be selectable or not (still possible to select programmatically, even if disabled)
  • hide-radio-button - boolean, should circle radio buttons be hidden or not

Each exmg-radio-group-item can have defined content in one of following ways:

  • Define slots with names "title" and "body"
  • Just put any content without defining slot.

Usage

With slots

  <exmg-radio-group name="license" selected="${this.selected}" @exmg-radio-group-changed="${this.onPaperRadioGroupChanged}">
    <exmg-radio-group-item value="option1">
        <div slot="title">Option 1</div>
        <div slot="body">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
    </exmg-radio-group-item>
    <exmg-radio-group-item value="option2">
        <div slot="title">Option 2</div>
        <div slot="body">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
    </exmg-radio-group-item>
    <exmg-radio-group-item value="option3" disabled>
        <div slot="title">Option 3</div>
        <div slot="body">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
    </exmg-radio-group-item>
  </exmg-radio-group>

Without slots

  <exmg-radio-group name="license" selected="${this.selected}" @exmg-radio-group-changed="${this.onPaperRadioGroupChanged}">
    <exmg-radio-group-item value="option1">
        Option 1
    </exmg-radio-group-item>
    <exmg-radio-group-item value="option2">
        Option 2
    </exmg-radio-group-item>
  </exmg-radio-group>

Additional references

Keywords

web-components

FAQs

Package last updated on 03 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts