How would I make a button selection like this?
Application Type

How would I make a button selection like this?

Screen Shot 2022-05-07 at 5.44.57 PM.png

Hi Charles Greenlaw :)

You can use the button group pattern.

What I did there was push the button group pattern and I created a static to hold the value of the answers, in this case, you don't have hardcoded values being pulled.

Then you just need a variable that will hold the id of the type of answer selected

Then for each button group item, you just need to assign the respective value

For the style, I need to add this CSS to the theme to be exactly as you want.

    border-radius: 32px var(--border-radius-none) var(--border-radius-none) 32px;

border-radius: var(--border-radius-none) 32px 32px var(--border-radius-none);

To adjust the space between them and to be responsive I used the columns pattern

And to align the interface I needed to add this class to make it full height of the parent where it is placed and to align to the center using flex.

Check the OML





Hi Charles Greenlaw ,

Please find the attached oml for sample code.

Hope this helps.


Manish Jawla


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.