View source: R/dashCoreComponents.R
dccTextarea | R Documentation |
A basic HTML textarea for entering multiline text.
dccTextarea(id=NULL, value=NULL, autoFocus=NULL, cols=NULL,
disabled=NULL, form=NULL, maxLength=NULL, minLength=NULL,
name=NULL, placeholder=NULL, readOnly=NULL, required=NULL,
rows=NULL, wrap=NULL, accessKey=NULL, className=NULL,
contentEditable=NULL, contextMenu=NULL, dir=NULL,
draggable=NULL, hidden=NULL, lang=NULL, spellCheck=NULL,
style=NULL, tabIndex=NULL, title=NULL, n_blur=NULL,
n_blur_timestamp=NULL, n_clicks=NULL,
n_clicks_timestamp=NULL, loading_state=NULL,
persistence=NULL, persisted_props=NULL,
persistence_type=NULL)
id |
Character. The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app. |
value |
Character. The value of the textarea |
autoFocus |
Character. The element should be automatically focused after the page loaded. |
cols |
Character | numeric. Defines the number of columns in a textarea. |
disabled |
Character | logical. Indicates whether the user can interact with the element. |
form |
Character. Indicates the form that is the owner of the element. |
maxLength |
Character | numeric. Defines the maximum number of characters allowed in the element. |
minLength |
Character | numeric. Defines the minimum number of characters allowed in the element. |
name |
Character. Name of the element. For example used by the server to identify the fields in form submits. |
placeholder |
Character. Provides a hint to the user of what can be entered in the field. |
readOnly |
Logical | a value equal to: 'readonly', 'readonly', 'readonly'. Indicates whether the element can be edited. readOnly is an HTML boolean attribute - it is enabled by a boolean or 'readOnly'. Alternative capitalizations 'readonly' & 'READONLY' are also acccepted. |
required |
A value equal to: 'required', 'required' | logical. Indicates whether this element is required to fill out or not. required is an HTML boolean attribute - it is enabled by a boolean or 'required'. Alternative capitalizations 'REQUIRED' are also acccepted. |
rows |
Character | numeric. Defines the number of rows in a text area. |
wrap |
Character. Indicates whether the text should be wrapped. |
accessKey |
Character. Defines a keyboard shortcut to activate or add focus to the element. |
className |
Character. Often used with CSS to style elements with common properties. |
contentEditable |
Character | logical. Indicates whether the element's content is editable. |
contextMenu |
Character. Defines the ID of a <menu> element which will serve as the element's context menu. |
dir |
Character. Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) |
draggable |
A value equal to: 'true', 'false' | logical. Defines whether the element can be dragged. |
Character. Prevents rendering of given element, while keeping child elements, e.g. script elements, active. | |
lang |
Character. Defines the language used in the element. |
spellCheck |
A value equal to: 'true', 'false' | logical. Indicates whether spell checking is allowed for the element. |
style |
Named list. Defines CSS styles which will override styles previously set. |
tabIndex |
Character | numeric. Overrides the browser's default tab order and follows the one specified instead. |
title |
Character. Text to be displayed in a tooltip when hovering over the element. |
n_blur |
Numeric. Number of times the textarea lost focus. |
n_blur_timestamp |
Numeric. Last time the textarea lost focus. |
n_clicks |
Numeric. Number of times the textarea has been clicked. |
n_clicks_timestamp |
Numeric. Last time the textarea was clicked. |
loading_state |
Lists containing elements 'is_loading', 'prop_name', 'component_name'. those elements have the following types: - is_loading (logical; optional): determines if the component is loading or not - prop_name (character; optional): holds which property is loading - component_name (character; optional): holds the name of the component that is loading. Object that holds the loading state object coming from dash-renderer |
persistence |
Logical | character | numeric. Used to allow user interactions in this component to be persisted when the component - or the page - is refreshed. If 'persisted' is truthy and hasn't changed from its previous value, a 'value' that the user has changed while using the app will keep that change, as long as the new 'value' also matches what was given originally. Used in conjunction with 'persistence_type'. |
persisted_props |
List of a value equal to: 'value's. Properties whose user interactions will persist after refreshing the component or the page. Since only 'value' is allowed this prop can normally be ignored. |
persistence_type |
A value equal to: 'local', 'session', 'memory'. Where persisted user changes will be stored: memory: only kept in memory, reset on page refresh. local: window.localStorage, data is kept after the browser quit. session: window.sessionStorage, data is cleared once the browser quit. |
named list of JSON elements corresponding to React.js properties and their values
if (interactive()) {
library(dash)
app <- Dash$new()
app$layout(
htmlDiv(
dccTextarea(
placeholder = 'Enter a value...',
value = 'This is a TextArea component'
)
)
)
app$run_server()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.