@salesforce-ux/sds-input-radio
v0.2.2
Published
The Radio element is a control that allows the user to select one value out of a set. While similar to a Checkbox element, only one Radio element in a particular set can be selected at any given time.
Downloads
6
Readme
Getting Started
About
The input-radio component for the Salesforce Design System.
Installation
npm i @salesforce-ux/sds-input-radio
Usage
Input-radio is only intended to be used as a child of input-radio-group.
Lightning Web Component
Import the CSS
After installation, you need to import the component's CSS into your LWC component module. To do this, use the @import
CSS syntax within the CSS file of your component module.
/* myComponent.css */
@import '@salesforce-ux/sds-input-radio/dist/input-radio.compiled.css'
The *.compiled.css
files in the /dist
folder have all the component's dependencies rolled up into one file. If you choose to import your modules explicitly, you should the *.css
files in the /dist
folder.
Decorate the HTML to match specification
Additionally, you will need to decorate the HTML of your LWC component template to have all the named part
attributes in the component's specification.