Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ember-radio-button
Advanced tools
This addon provides a radio-button
component.
A radio-button
will be in a checked state when the value
property matches the groupValue
property.
value
should be unique per radio-button, while the same groupValue
should be provided to each
radio-button
in the group.
Clicking on a radio-button
will set groupValue
to its value
.
The block form emits a label wrapping the input element and any elements passed to the block.
Template:
{{#radio-button
value="blue"
groupValue=color
changed="colorChanged"
}}
<span>Blue</span>
{{/radio-button}}
/* results in */
<label id="ember346" class="ember-view ember-radio-button">
<input id="ember347" class="ember-view" type="radio" value="blue">
<span>Blue</span>
</label>
If you want more control over the DOM, the non-block form only emits a single input element
{{radio-button
value="green"
groupValue=color
name="colors"
changed="colorChanged"}}
/* results in */
<input id="ember345" class="ember-view" type="radio" value="green">
More example usage can be seen in the test application.
Required:
name | type | description |
---|---|---|
value | any | the unique value represented by the radio button |
groupValue | any | the value representing a radio group's current value. supply the same groupValue to every radio-button in a group |
Optional:
name | type | description |
---|---|---|
autofocus | boolean | applies the autofocus property to the input element |
classNames | string | applies additional classnames to the label element (block form only) |
disabled | boolean | applies the disabled property to the input element |
name | string | applies the name property to the input element |
radioClass | string | applies additional classnames to the input element |
radioId | string | sets the id of the input element and the for property to the label element |
required | boolean | applies the required property to the input element |
tabindex | number | applies a tabindex property to the input element |
ariaLabelledby | string | applies an aria-labelledby attribute to the input element |
Actions:
name | description |
---|---|
changed | fires when user interaction causes a radio-button to update groupValue |
ember install ember-radio-button
ember-radio-button 1.0.0+ requires using htmlbars.
Applications not using htmlbars should use version 0.1.3 or the pre-htmlbars
branch.
git clone <repository-url>
this repositorycd ember-radio-button
npm install
ember serve
npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.
1.2.1
ariaLabelledby
FAQs
provides a radio-button component
The npm package ember-radio-button receives a total of 13,473 weekly downloads. As such, ember-radio-button popularity was classified as popular.
We found that ember-radio-button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.