Tabs for source code in multiple languages

Is there any way to include source code in multiple languages and get Hugo to render it as a single block with tabs for each language, similar to how Slate renders source code (see screenshot). I’m guessing this probably needs to be handled by the theme, but if someone could point me in the right direction I’d appreciate it.

There is an example in Front Matter | Hugo (and several other pages in the docs) created by a shortcode that generates the code blocks which switch between formats (YAML, TOML, JSON).

The shortcode is called code-toggle, and is at: