Align button to right on top of main layout?

I am trying to add a button on the top part of the main layout so that its on the top far right o the page.

I tried margin-right: 80% but that doesn’t scale well

Using the start.vaadin.com example site

Version 24


    private void addHeaderContent() {
        DrawerToggle toggle = new DrawerToggle();
        toggle.getElement().setAttribute("aria-label", "Menu toggle");

        viewTitle = new H2();

        var newIncidentButton = new Button("Create Incident");
        newIncidentButton.addClassNames(JustifyContent.END);
        
        viewTitle.addClassNames(LumoUtility.FontSize.LARGE, LumoUtility.Margin.NONE);

        addToNavbar(true, toggle, viewTitle, newIncidentButton);
    }

Any suggestions welcomed! Thanks
image.png

It might be dirty, but it should work.

newIncidentButton.getStyle().set("margin-left", "auto").set("margin-right", "2em");