Skip to contents

A panel that slides in from an edge. input$<inputId> is the open state.

Usage

shad_sheet(
  inputId,
  ...,
  side = c("right", "left", "top", "bottom"),
  title = NULL,
  description = NULL,
  footer = NULL,
  trigger = NULL,
  class = NULL
)

Arguments

inputId

Input id.

...

Body content.

side

Which edge: "right" (default), "left", "top", "bottom".

title, description

Optional header text.

Optional footer content.

trigger

Optional tag whose click opens the sheet.

class

Extra CSS classes.

Value

A sheet tag.

Examples

shad_sheet("s", trigger = shad_button("Open"), title = "Edit", "Body")
#> <div data-shad="sheet" data-side="right" id="s">
#>   <button class="shad-btn shad-btn--default shad-sheet__trigger" type="button">Open</button>
#>   <div class="shad-sheet__overlay shad-anim-overlay" hidden></div>
#>   <div class="shad-sheet__content shad-anim-sheet" hidden>
#>     <button type="button" class="shad-sheet__close" data-shad-sheet-close aria-label="Close"><svg class="shad-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button>
#>     <div class="shad-sheet__header">
#>       <div class="shad-sheet__title">Edit</div>
#>     </div>
#>     Body
#>   </div>
#> </div>