Textarea

Description

Create a multiline text input with an optional label.

Usage

bc_textarea(
  ...,
  label = NULL,
  id = NULL,
  placeholder = NULL,
  value = NULL,
  rows = NULL,
  description = NULL,
  name = id,
  required = FALSE,
  disabled = FALSE,
  invalid = FALSE,
  aria_label = NULL
)

Arguments

Argument Description
... Extra tag attributes for the text area.
label String or tag. The label.
id String. The input ID. Required when label is set.
placeholder String. Placeholder text.
value String. The starting value.
rows Whole number or NULL. The number of visible rows.
description String or tag. Helper text shown under the input. Needs a label.
name String. The input name. Defaults to id.
required Bool. Whether the input is required. Defaults to FALSE.
disabled Bool. Whether the input is disabled. Defaults to FALSE.
invalid Bool. Whether to show the invalid state. Defaults to FALSE.
aria_label String. Accessible name for the input. Set it when there is no label, since a placeholder doesn't count.

Value

An htmltools tag.

Examples

bc_textarea(placeholder = "Type your message here", aria_label = "Message")

bc_textarea(
  id = "message",
  label = "Message",
  placeholder = "Type your message here",
  description = "Write a short message."
)

Write a short message.