Skip to content

[Feature Request]: Set border-radius for BrowserView. #33426

Closed

Description

@Shintarot

Preflight Checklist

Problem Description

I am aware that currently the only setting items for BrowserView style are setBounds and setBackgroundColor.
https://www.electronjs.org/docs/latest/api/browser-view

Is there any way to set border-radius (rounded corner) for BrowserView?

If not, I would be very happy to see it implemented.

Proposed Solution

I think it should be implemented in the constructor or instance method of BrowserView.

// in constructor
const view = new BrowserView({
    borderRadius: 12,
});

// instance method
view.setBorderRadius(12);

Alternatives Considered

I have tried editing the HTML within webContents, but adding border-radius to <html /> does not work (children do not fit).

Additional Information

No response

Activity

  1. jordancde commented on Sep 22, 2022

    @jordancde

    Please can we have this 🙏

  2. GGIEnrike commented on Nov 20, 2022

    @GGIEnrike
    Contributor

    I really want this feature implemented!
    (Does commenting on an issue make it so that the devs notice it again? because I'm pretty sure it does, and that's why I'm writing this comment now)

  3. tri2820 commented on Feb 9, 2023

    @tri2820

    Hi team, can we have an update on this?

  4. avayedawadi commented on Oct 9, 2023

    @avayedawadi

    Any update on this?

  5. GGIEnrike commented on Oct 10, 2023

    @GGIEnrike
    Contributor

    We should get this reconsidered by the devs

  6. alexi commented on Dec 20, 2023

    @alexi

    Would love to have this feature + drop shadow. It's hard to see how this could be implemented in a more general styling framework, but these are the two power tools of modern design so adding support for them would be high impact.

  7. jansenderr commented on Jan 20, 2024

    @jansenderr

    this would be an amazing feature. pls

  8. arn4v commented on Feb 27, 2024

    @arn4v

    +1, would like this as well

  9. ivan-magky commented on Mar 13, 2024

    @ivan-magky

    +1 from me. My current solution is to overwrite page css styles and apply border radius by css

  10. ArcherGu commented on May 22, 2024

    @ArcherGu

    This feature is so much needed! 😀

  11. itsnwa commented on Jun 20, 2024

    @itsnwa

    Yes please!

  12. augustdua commented on Apr 8, 2025

    @augustdua

    Please give this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions