npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@exmg/exmg-radio-group

v8.2.3

Published

Paper style radio group element

Downloads

186

Readme

<exmg-radio-group> Published on npm

@exmg/exmg-radio-group

This package provides radio group functionality.

Components included:

  1. exmg-radio-group - parent component
  2. 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

| Name | Description | | --------- | ------------------------------------------------------------------------ | | default | Slot to display anything within the item | | title | Title of the description of the exmg-radio-group-item | | body | Body to render additional information within the exmg-radio-group-item |

Events

| Name | Description | | -------------------------- | --------------------------------------- | | exmg-radio-group-changed | when selected radio group item changed. |

Properties/Attributes

| Name | Type | Default | Description | | ---------- | --------- | ------- | --------------------------------------------------------------------------------- | | name | string | None | Name of the exmg-radio-group | | selected | string | None | Selected value. Should be value of one of value attributes of children nodes. | | required | boolean | None | Used for form validation | | vertical | string | None | If you want to have vertical layout |

<exmg-radio-group-item>

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

Attributes:

  1. value - value of particular item.
  2. disabled - boolean, should value be selectable or not (still possible to select programmatically, even if disabled)
  3. 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:

  1. Define slots with names "title" and "body"
  2. 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