Skip to main content
3 of 6
Fixed non-quote in quote formatting, and placeholder alt text (don't be lazy - consider your non-visual audience!)

Boolean switch with a third state

I have a query creator form that helps the user to create a SQL query. All the possible variations of the query are listed and the user has to pick their required variations and run the query.

Problem

For an individual, the user can choose the Gender. From the outside it seems like a Boolean operation (Male or Female) but it has one more variations.

  1. Individual is MALE
  2. Individual is FEMALE
  3. Individual's gender should not be considered (Can be MALE or FEMALE)

I have replaced radio buttons with a Switch like this:

Screenshot of widget

How do I represent the 3rd state?

Shreyas Tripathy
  • 6.8k
  • 6
  • 28
  • 45