Skip to contents

Get Started.

remotes::install_github("the-y-company/ui5")

All pages are wrapped within page(), there are not specific navbarPage or fluidPage.

You can set compact = TRUE on any element or the page to produce a more compact layout.
page(
  compact = TRUE,
  h1("Hello World!"),
  avatar_group(
    avatar(initials = "JC", size = "M"),
    avatar(initials = "PS", size = "M"),
    avatar(initials = "OP", size = "M")
  )
)

The reason there are no equivalent to navbarPage or fluidPage is because the navigation is totally up to you. Though, you may want to look at bar and/or side_navigation for this.

The way navigation functions is simply by creating nav, equivalent to a tab in vanilla Shiny, assigning it an id and then using as_nav_trigger on any element to make it trigger the navigation for said nav, take a look at the example below.

page(
  button(
    "btnId1",
    "First tab"
  ) |> 
    as_nav_trigger("first"),
  button(
    "btnId2",
    "Second tab"
  ) |> 
    as_nav_trigger("second"),
  nav(
    id = "first",
    visible = TRUE,
    h2("First nav")
  ),
  nav(
    id = "second",
    h2("Second nav")
  )
)