I think we need to move this out of util into the widget. We don't use this approach anywhere else so no need for an API utility (yet).