Hairgen.ai DocumentationHairgen.ai Documentation
  • API
  • Embedding

    • Widget Embed
    • Studio Embed

Embed Hairgen.ai Studio into Electron

  1. Adjust CSP

    <meta http-equiv="Content-Security-Policy" content="default-src 'self' https://www.hairgen.ai/studio/embed">
    
  2. Add the iframe

    <div style="display: flex; height: 720px; width: 100%; flex-direction: column; overflow: hidden">
    	<iframe src="https://www.hairgen.ai/studio/embed" style="flex-grow: 1; border: none; margin: 0; padding: 0;"></iframe>
    </div>
    
  3. (Optional) Customize the iframe with query string parameters:

    ParameterTypeDescription
    primaryColor3 or 6 digit hexButton hover
    secondaryColor3 or 6 digit hexButtons, input sliders
    textColor3 or 6 digit hexText, loading spinner
    iconColor3 or 6 digit hexIcons
    brushColor3, 6 or 8 digit hex (for alpha)face buttons when cropping
    maskColor3, 6 or 8 digit hex (for alpha)
Last Updated:
Prev
Widget Embed