Skip to content

Conversation

@tobiasbueschel
Copy link
Contributor

@tobiasbueschel tobiasbueschel commented Oct 20, 2025

Before

Adding <PromptInputAttachments /> to the <PromptInputBody /> looked a bit out of place given we now have the <PromptInputHeader /> component for all context attachments:
Screenshot 2025-10-20 at 11 50 10 PM

If one tried to render these attachments inside the header, you would have gotten something like the following screenshot where the order is mixed up and the square image preview doesn't fit well with the remaining rectangular attachment buttons.
Screenshot 2025-10-20 at 11 50 27 PM

After
This PR draws inspiration from how it looks in Cursor and improves the attachment previews by (1) ensuring the chips have an similar rectangular design, (2) have a hover preview if available for the file type and (3) automatically wrap to a new line if one adds a lot of attachments.

image

Hover preview for images

image

Hover preview for non-image media types

image

Handles multiple attachments nicely

image

Here is an animation of how it works:

prompt-input-attachments

@vercel
Copy link
Contributor

vercel bot commented Oct 20, 2025

@tobiasbueschel is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

variant="ghost"
>
<XIcon />
<span className="sr-only">Remove</span>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that v0 has the remove button on the right side instead, happy to also implement that if you prefer:

Image

@haydenbleasel
Copy link
Collaborator

Thanks @tobiasbueschel 💪

@haydenbleasel haydenbleasel merged commit 8a4be13 into vercel:main Oct 28, 2025
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants