You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
Home > Projects > Embeds > Customizing Embeds
Customizing Embeds
print icon

You can customize a Glitch app embed in the following ways:

  • Show app
  • Show source code
  • Adjust app preview width & height
  • Hide file tree
  • Hide attribution
  • Change code file shown
  • Highlight specific lines of code

 

When embedding an app, keep in mind the following:

  • Only apps that are set to public can be embedded.
  • While you can choose how you want the embed to first appear when loaded, you cannot disable the option to View Source Code.

 

To see your embed customization options, click Settings > Embed this app in the project editor.

 

 

 

Show app

If you'd like to display the app preview, select Show App or append the following parameter to the embed URL: previewSize=100

 

 

Show source code

If you'd like to display the code, select Show Code or append the following parameter to the embed URL: previewSize=0

 

 

Adjust the app preview width

If you'd like to change the width of the app preview to show more or less of it, drag ↔ or append the following parameter to the embed URL: previewSize=X (where 'X' is an integer >0 and <100)

 

Adjust the embed height

You can change the height of the embed by dragging ↕, or changing the height value in the containing DIV tag of the embed code: height: Xpx (where 'X' is the number of pixels high you want the embed to display)

 

Hide the file view

By default when you elect to show the code, the file view is shown. To hide the file view click on the left arrow next to the project name, or append the following parameter to the embed URL: sidebarCollapsed=true

 

 

Hide attribution

By default, the avatar of the project owner is shown in the footer of the embed. To hide attribution, check the Hide Attribution box or append the following parameter to the embed URL: attributionHidden=true

 

 

Change the code file shown

To set a specific code file to be shown in the embed you can select the file in the file tree, or specify the path to the file by adding the following parameter to the embed URL: path=X (where 'X' is path and name of the file e.g. views/index.html)

 

Highlight specific lines of code

You can highlight specific lines of code within the displayed code file by specifying a comma-separated list of lines to highlight in the highlights parameter: highlights=46,49

 

 

Got more questions? Check out our Community Forum!
Open 24/7, the forum is where Glitch makers help each other and show off all the rad apps that they have created. It's the friendliest community of coders on the Web!
Feedback
12 out of 12 found this helpful

scroll to top icon