Switch widget vertical alignment change?

At some point between self-hosted 3.14 and 3.33, the switch widget vertical alignment style changed when the label caption has multiple lines of text. Previously the switch was vertically aligned to the top, which meant it stayed aligned with the label, and the caption sat beneath it. Like this:

Screenshot 2024-04-19 at 10.23.40

But somewhere along the line it changed to be vertically aligned to the middle, which makes it look misaligned with the label. Like this:

Screenshot 2024-04-19 at 10.23.52

Wondering if this is intentional or an accidental change? If possible, would love to be able to choose how to vertically align it with an option in the inspector. For now I've resolved it with custom CSS, but that's not optimal.

._retool-SwitchWidget2 div {
  align-items: flex-start !important;
}

Hi @mkh, we currently have a Feature Request internally to allow full control of the placement of the switch in relationship to the label. I added your feedback to it. On the meantime, using a "Switch Group" component instead should do the trick. Just enable "Allow wrapping."

1 Like