How do I show a Garnish hud in the CP
I finally figured this out. I was actually close. 

Here's the HTML that I use

&lt;div class="hud-wrapper hidden"&gt;
    &lt;div id="generate-pdf-form" class="form meta"&gt;
        &lt;form&gt;

            {% import "_includes/forms" as forms %}

            {{ forms.lightswitchField({
                 class: 'docraptorize-prod-lightswitch',
                 name: 'prod-pdf',
                 on: true
            }) }}   

            &lt;input type="submit" class="btn submit" value="{{ "Go!"|t }}"&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;


and this is the corresponding JS

var $btn = $('#generate-pdf-hud'),
$form = $('#generate-pdf-form');

$btn.on('click',function(){
    var hud = new Garnish.HUD($btn, $form, {
        orientations: ['top', 'bottom', 'right', 'left']
    });
   return false;
});