| Input | R Documentation |
A single-line text input. See input().
Widget -> Input
paint_statesCursor and selection changes only repaint.
focusableInputs can be focused.
placeholderText shown while the input is empty.
passwordShow bullets instead of the characters?
max_lengthMaximum number of characters, or NULL.
validateNULL or function(value) returning NULL (valid)
or an error message.
valueThe text (reactive). Assigning moves the cursor to the
end and sends "input.changed".
cursor_positionCursor position in characters (0 = start).
selectionThe selected text ("" if none).
validDoes the value pass validate?
errorThe validation message, or NULL.
Widget$add_class()Widget$ancestors()Widget$animate()Widget$arrange_children()Widget$bind()Widget$bind_reactive()Widget$bindings()Widget$blur()Widget$capture_mouse()Widget$child_clip()Widget$computed_style()Widget$content_height()Widget$focus()Widget$format()Widget$get_state()Widget$has_class()Widget$invalidate()Widget$invalidate_paint()Widget$is_displayed()Widget$is_enabled()Widget$layout_descend()Widget$layout_differs()Widget$matches()Widget$mount()Widget$on()Widget$paint()Widget$post_message()Widget$print()Widget$query()Widget$query_one()Widget$refresh()Widget$release_mouse()Widget$remove()Widget$remove_children()Widget$remove_class()Widget$render()Widget$replace()Widget$run_action()Widget$run_process()Widget$run_worker()Widget$set()Widget$set_interval()Widget$set_state()Widget$set_timeout()Widget$toggle_class()Widget$walk()Input$new()Create an input.
Input$new( value = "", placeholder = "", id = NULL, classes = NULL, style = NULL, disabled = FALSE, password = FALSE, max_length = NULL, validate = NULL )
valueInitial text.
placeholderPlaceholder text.
id, classes, style, disabledSee Widget.
passwordMask the characters?
max_lengthMaximum number of characters.
validateValidation function.
Input$default_style()The built-in style.
Input$default_style()
Input$pseudo_states()Active states: focus, hover, disabled and invalid.
Input$pseudo_states()
Input$default_bindings()Editing key bindings.
Input$default_bindings()
Input$on_key()Printable keys replace the selection or are inserted at the cursor. Ctrl+C / Ctrl+X copy / cut when text is selected (otherwise Ctrl+C keeps its app meaning).
Input$on_key(event)
eventA KeyEvent.
Input$on_mouse_down()Clicking places the cursor; shift+click and dragging select.
Input$on_mouse_down(event)
eventA MouseEvent.
Input$on_mouse_move()Dragging with the left button extends the selection.
Input$on_mouse_move(event)
eventA MouseEvent.
Input$on_paste()Pasted text is inserted as one edit. An Input is a single line, so line breaks in the paste become spaces.
Input$on_paste(event)
eventA PasteEvent.
Input$insert()Insert text at the cursor (replacing the selection).
Input$insert(text)
textA string.
Input$clear()Remove all text.
Input$clear()
Input$select_range()Select a range of characters.
Input$select_range(start, end)
start, endPositions (0 = before the first character).
Input$copy()Copy the selection to the app clipboard (and, when
system = TRUE and supported, to the system clipboard via OSC 52).
Input$copy(system = TRUE)
systemAlso write to the system clipboard?
Input$action_cursor_left()Move one character left.
Input$action_cursor_left()
Input$action_cursor_right()Move one character right.
Input$action_cursor_right()
Input$action_cursor_home()Move to the start.
Input$action_cursor_home()
Input$action_cursor_end()Move to the end.
Input$action_cursor_end()
Input$action_word_left()Move to the previous word.
Input$action_word_left()
Input$action_word_right()Move to the next word.
Input$action_word_right()
Input$action_select_left()Extend the selection left.
Input$action_select_left()
Input$action_select_right()Extend the selection right.
Input$action_select_right()
Input$action_select_home()Select to the start.
Input$action_select_home()
Input$action_select_end()Select to the end.
Input$action_select_end()
Input$action_select_word_left()Select to the previous word.
Input$action_select_word_left()
Input$action_select_word_right()Select to the next word.
Input$action_select_word_right()
Input$action_select_all()Select everything.
Input$action_select_all()
Input$action_delete_left()Delete the selection or the character before the cursor.
Input$action_delete_left()
Input$action_delete_right()Delete the selection or the character at the cursor.
Input$action_delete_right()
Input$action_delete_word_left()Delete the word before the cursor.
Input$action_delete_word_left()
Input$action_delete_word_right()Delete the word after the cursor.
Input$action_delete_word_right()
Input$action_delete_to_start()Delete everything before the cursor.
Input$action_delete_to_start()
Input$action_delete_to_end()Delete everything after the cursor.
Input$action_delete_to_end()
Input$action_paste()Insert the app clipboard.
Input$action_paste()
Input$action_submit()Send an "input.submitted" message (Enter).
Input$action_submit()
Input$content_width()Natural content width.
Input$content_width()
Input$render_lines()The visible part of the text, scrolled so the cursor is visible, with the cursor drawn in reverse video and the selection highlighted when focused.
Input$render_lines(width = NA_integer_)
widthContent width.
Input$clone()The objects of this class are cloneable with this method.
Input$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.