88from pathlib import Path
99from typing import TYPE_CHECKING , ClassVar , Iterable , Optional , Sequence , Tuple
1010
11+ from rich .console import RenderableType
1112from rich .style import Style
1213from rich .text import Text
1314from typing_extensions import Literal
@@ -374,6 +375,7 @@ def __init__(
374375 id : str | None = None ,
375376 classes : str | None = None ,
376377 disabled : bool = False ,
378+ tooltip : RenderableType | None = None ,
377379 ) -> None :
378380 """Construct a new `TextArea`.
379381
@@ -390,6 +392,7 @@ def __init__(
390392 id: The ID of the widget, used to refer to it from Textual CSS.
391393 classes: One or more Textual CSS compatible class names separated by spaces.
392394 disabled: True if the widget is disabled.
395+ tooltip: Optional tooltip.
393396 """
394397 super ().__init__ (name = name , id = id , classes = classes , disabled = disabled )
395398
@@ -458,6 +461,9 @@ def __init__(
458461 # When `app.dark` is toggled, reset the theme (since it caches values).
459462 self .watch (self .app , "dark" , self ._app_dark_toggled , init = False )
460463
464+ if tooltip is not None :
465+ self .tooltip = tooltip
466+
461467 @classmethod
462468 def code_editor (
463469 cls ,
0 commit comments