Is there a Likert control?

avatar
(anonymous user)

I know that I can do radio buttons, but is there an option to do a Likert type control? Like a grid containing radio buttons.

Thanks in advance.

Product: PowerShell Universal
Version: 1.4.6


All Comments (4)

avatar

I mean you could just use the New-UDRadioGroup wrapper for New-UDRadio:

New-UDRadioGroup -Label "Day" -Content {
    New-UDRadio -Label Monday -Value 'monday'
    New-UDRadio -Label Tuesday -Value 'tuesday'
    New-UDRadio -Label Wednesday -Value 'wednesday'
    New-UDRadio -Label Thursday -Value 'thursday'
    New-UDRadio -Label Friday  -Value 'friday'
    New-UDRadio -Label Saturday -Value 'saturday'
    New-UDRadio -Label Sunday -Value 'sunday'
}


Example:
0228eae5fef16a24edbc91611d0507ce9b5dff06


See:

docs.powershelluniversal.com
If you wanted horizontal, I’m sure there’s ways to modify the css/style otherwise you could just code it using New-UDGrid and then some onchange handlers of New-UDRadio but the latter probably isnt a very efficient way of doing it although I’m sure it would work.

Alternativly you could follow the guide for creating a custom component and use an existing react likert style package.

0228eae5fef16a24edbc91611d0507ce9b5dff06.gif

avatar

You mean something like this?
https://jasonphillips.github.io/react-likert/
Or this

avatar

Something like this:


af23322f4c9ff7c74494b080ab86b1a14276882d

af23322f4c9ff7c74494b080ab86b1a14276882d.png

avatar

This is as close as I can find in link 2
A React component that renders a Likert scale (reactjsexample.com)

I did recently put that new website together to compliment what is already documented about building a custom component. I would recommend that if this is what you are after

Powershell Universal (powershelluniversalcustomcomponents.netlify.app)