Skip to main content

textarea

Textarea

from dara.components.common.textarea import Textarea

class Textarea(FormComponent)

Textarea

A component that creates an area for entering text. Takes the text variable that can be given a value that will be displayed as the default value when the textarea is empty. The variable will update when the user enters text. Optional autofocus boolean, which when true will start the cursor in the textarea.

A Textarea component is created via:


from dara.core import Variable
from dara.components.common import Textarea

Textarea(value=Variable('initial textarea content'))

Arguments:

  • autofocus: Boolean, if True then then initially render with the cursor in the component
  • value: A Variable instance recording the component's state
  • onchange: Action triggered when the textarea value has changed.
  • id: the key to be used if this component is within a form
  • resize: sets whether the textarea is resizable, and if so, in which directions

Attributes

  • autofocus: bool
  • value:
  • onchange: Optional[Action]
  • id: Optional[str]
  • resize: