# Streaming text\_area / text\_input

**URL:** <https://discuss.streamlit.io/t/streaming-text-area-text-input/5276>\
**Category:** Custom Components\
**Tags:** text-input\
**Created:** [August 31, 2020, 12:11am UTC](https://discuss.streamlit.io/t/streaming-text-area-text-input/5276 "2020-08-31T00:11:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidHolz](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/davidholz/32/2993_2.png) [@DavidHolz](https://discuss.streamlit.io/u/DavidHolz)\
**Post date:** [August 31, 2020, 12:11am UTC](https://discuss.streamlit.io/t/streaming-text-area-text-input/5276/1 "2020-08-31T00:11:16Z")

</div>

I’d love to do projects involving visualizations that change dynamically as you type.

Is there any way to get the text\_area or text\_input widgets to stream their text to Python as they’re being modified without requiring the user to explicitly press enter or ctrl+enter?

---

<div class="post-metadata">

**Author:** ![Marc](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/marc/32/602_2.png) [@Marc](https://discuss.streamlit.io/u/Marc)\
**Post date:** [August 31, 2020, 4:55am UTC](https://discuss.streamlit.io/t/streaming-text-area-text-input/5276/2 "2020-08-31T04:55:22Z")

</div>

I would also like to know this.

I see this as one of the fundamental challenges of the Streamlit architecture of running the script top to bottom. I believe this architecture would make it too slow in practice compared to other analytics apps frameworks that use callbacks and updates small parts of the application.

Would love to learn and be proved wrong.

@DavidHolz. I belive the way to currently go is a creating a Custom Streamlit Compont and see if that would work satisfactorily.

---

<div class="post-metadata">

**Author:** ![andfanilo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/andfanilo/32/1040_2.png) [@andfanilo](https://discuss.streamlit.io/u/andfanilo)\
**Post date:** [August 31, 2020, 6:27am UTC](https://discuss.streamlit.io/t/streaming-text-area-text-input/5276/3 "2020-08-31T06:27:08Z")

</div>

Welcome to the community @DavidHolz

> [@DavidHolz](#):
>
> Is there any way to get the text\_area or text\_input widgets to stream their text to Python as they’re being modified without requiring the user to explicitly press enter or ctrl+enter?

I second @Marc on this, a Streamlit component bringing a text input with a `onchange` event handler should do. I tried to condense all of component creation in [this tutorial](https://streamlit-components-tutorial.netlify.app/) if you want to have a try poking with frontend, or [the template](https://github.com/streamlit/component-template) if you already have small experience with JS/Node.

> [@Marc](#):
>
> I see this as one of the fundamental challenges of the Streamlit architecture of running the script top to bottom. I believe this architecture would make it too slow in practice compared to other analytics apps frameworks that use callbacks and updates small parts of the application.
> 
> Would love to learn and be proved wrong.

Could not find a post about this in the forum, but I regularly see this on Twitter so I think it would deserve its own thread 🙂

---

<div class="post-metadata">

**Author:** ![okld](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/okld/32/1829_2.png) [@okld](https://discuss.streamlit.io/u/okld)\
**Post date:** [September 1, 2020, 11:15pm UTC](https://discuss.streamlit.io/t/streaming-text-area-text-input/5276/4 "2020-09-01T23:15:02Z")

</div>

Hello @DavidHolz,

If you want to test this _refresh as you type_ workflow with an already existing solution, you could try to use my [Ace Editor](https://discuss.streamlit.io/t/ace-editor/3657) component. It updates the app every 200ms as you type (this value is hardcoded in my component code for now though).

If results are good, I suggest you follow @andfanilo’s [tutorial](https://streamlit-components-tutorial.netlify.app/) to build a simpler/lighter component for your purpose.

---

<div class="post-metadata">

**Author:** ![randyzwitch](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/randyzwitch/32/58772_2.png) [@randyzwitch](https://discuss.streamlit.io/u/randyzwitch)\
**Post date:** [January 12, 2022, 9:49pm UTC](https://discuss.streamlit.io/t/streaming-text-area-text-input/5276/5 "2022-01-12T21:49:05Z")

</div>


