Can I add view dependent action buttons to the AppLayout Navbar?

Hi again,

today I’m trying to get used to the AppLayout. In the docs, I can read:

“When placed to the side, the navbar is often seen as a view header, housing the view’s title, and actions and secondary navigation that relate only to the current view.”

I think this is exactly what I’m searching for, but unfortunately, there seems to be no example … can I add buttons to the navigation bar that change depending on the current view?

Regards

Marcus.

There’s nothing built-in, but you could do something like this nps/src/main/java/app/vaadin/nps/views/MainLayout.java at 4589d5687451a1526b8628e9e5ad5ae001cb343c · marcushellberg/nps · GitHub

PS. Great name!

Hi Marcus,

tried it and it works perfect. Thank you!

PS. In my bubble I’m the only one with a “c”, and I always claim to be the original one :-)

1 Like