DEV Community

Srujana Maddula
Srujana Maddula

Posted on

How to Add New Features with Screenshots in Amp

Explaining code changes with long text prompts can be frustrating. Amp makes it easier: instead of typing out every detail, you can just take a screenshot of the feature you want to edit. Amp reads the screenshot, understands your instruction, and updates the codebase for you.

Example: Changing a button color in Streamlit

Let’s walk through a quick example so you can see how this works in practice.

In my Streamlit app, I have a simple “Click Me” button. I want to change its color to green.

To do that, I take a screenshot of the button and add a simple instruction (Make this button green) directly on the screenshot, as shown in the below image:

Amp screenshot with prompt

Now, I attach the above screenshot to the Amp thread and add this simple prompt: “Read the screenshot and take action.”

Amp chat pane

That’s it. Amp automatically modified my code and updated the button color to green, as shown below:

Amp added the new functionality to codebase

Final Thought

Using screenshots with Amp is faster, clearer, and less error-prone than writing lengthy instructions. It’s perfect for small UI tweaks, quick bug fixes, or experimenting with design changes. Sign up for Amp to explore how it simplifies your coding tasks.

Top comments (0)