Skip to content

Commit

Permalink
Merge pull request #43 from posit-dev/component-gallery-links
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert authored Dec 5, 2023
2 parents bafecca + 2851f0f commit 95f1f86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
10 changes: 7 additions & 3 deletions docs/inputs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
title: "Input controls"
---

:::{.callout-note}
## Input gallery

In this article, we only cover the most common inputs.
To see more, checkout [the input components gallery](../components/#inputs).
:::

Each input control on a page is created by calling a Python function. All such functions take the same first two string arguments:

* `id`: an identifier used to refer to input's value in the server code. For example, `id="x1"` corresponds with `input.x1()` in the server function. `id` values must be unique across all input and output objects on a page, and should follow Python variable/function naming rules (lowercase with underscores, alphanumeric characters allowed, cannot start with a number).
Expand All @@ -10,9 +17,6 @@ Each input control on a page is created by calling a Python function. All such f
Note that many inputs take additional arguments.
For example, an `input_checkbox` lets you indicate if it should start checked or not.

In the section below we'll show the most common input objects.
If you're curious to learn more, see the [API Reference on UI Inputs](../api/#ui-inputs) (for example, here's the page for [`input_checkbox()`](../api/reference/shiny.ui.input_checkbox.html))

## Input examples

:::{.callout-note}
Expand Down
7 changes: 7 additions & 0 deletions docs/outputs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
title: "Output controls"
---

:::{.callout-note}
## Output gallery

In this article, we only cover the most common outputs.
To see more, checkout [the output components gallery](../components/#outputs).
:::

Outputs create a spot on the webpage to put results from the server.

At a minimum, all UI outputs require an `id` argument, which corresponds to the server's output ID.
Expand Down
7 changes: 6 additions & 1 deletion docs/ui-feedback.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
title: User feedback
---

:::{.callout-note}
## Component gallery

See [this section of the component gallery](../components/#display-messages) for more examples and options for displaying messages.
:::

When a user initiates some action on the server, it's often helpful to provide feedback
on its progress, or additional information about what's happening.
This page will cover three different ways to give user's feedback with shiny:
Expand Down Expand Up @@ -121,4 +127,3 @@ def server(input, output, session):
app = App(app_ui, server)
```

0 comments on commit 95f1f86

Please sign in to comment.