function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sukriti SharmaSukriti Sharma 

LWC radio button to change the UI

On the home page of Sales, I want to have a LWC card. I want to use that LWC card to create either Account or Contact as required by the user.  It should contain two radio button :
1) Create an account
2) Create a contact
Initially 'Create an account' should be pre-selected. It should display the form for user details like Name, Phone, address, etc.
When the user selects 'Create a Contact'  radio button, the card should display details to create contact.

My Question is which LWC component should I use to change the UI when different radio button is selected.

PriyaPriya (Salesforce Developers) 
Hey Sukriti,

Have you tried any code for this requirement? 

The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.



Thanks & Regards,

Priya Ranjan