Add a "Made with Replit" badge to your Webview
Learn how to add, customize, and embed a Made with Replit badge in your Replit App’s webview to showcase your project and link back to your cover page.
You can add a “Made with Replit” badge in your public Replit App’s webview. It will link back to your Replit App’s cover page so that visitors can learn more about your creations.
What is the Webview?
The webview is the view of your Replit App that visitors to your Replit App see when they click “Open website.”
The webview appears full-screen in its own browser window, and has the following URL format:
https://{unique-token}.${clusterName}.replit.dev
(Or at your custom domain if you’ve set one up)
Please refer to these docs to ensure that you are using the correct repl.co domain format.
Adding the Badge
The badge can be added to any Replit App with an index page serving HTML. Any website created with the official HTML template will have this badge added by default.
- Go to your Replit App’s file browser and find
index.html
- Add the following code before the closing
</body>
tag:
Testing your Badge
- Run your Replit App, then click “Open in a new tab”
- Your badge should appear in the lower right. This is what visitors to your page would see
- Click your badge to get back to the Replit App’s cover page
Changing the Color Theme
You can change the color of your badge by replacing theme="blue"
with any color including dark, light, red, orange, yellow, lime, green, teal, blue, blurple, purple, magenta and pink.
Changing the Position
You can change the position of your badge by adding a position attribute with a value of top-left
, top-right
, bottom-left
, or bottom-right
. If the position isn’t changing, check the console for more information - you may have specified an invalid position.
Removing the Badge
If the badge was already a part of your template and you would like to remove it, simply delete the script from index.html
:
Advanced: Custom Badges
If the default configurations aren’t enough for you, you can create your own custom badges with standard HTML and CSS.
Badges are hosted on https://replit.com/badge
, meaning you can embed an image to further style your badges with CSS. This also means you can embed badges in your GitHub repositories and other Markdown files!
You can also supply additional options not available in the script. For example, you can set the caption (maximum limit of 30 characters)
or even switch the badge variant to something smaller.
Advanced: Embedding into Markdown
You can share off your Replit flare by embedding a badge into your repository README. The following Markdown snippet combines a link and image, allowing you to redirect users directly to your Replit App.
Try clicking this:
Please let us know in the community what you think of this feature. Replit App on!