The base interface for defining a Streamlit custom component's state shape.
Component state is a persistent key-value store of state and trigger values. You can extend this type or define your own interface to add type-safe state and trigger key-value pairs. Each key corresponds to an on_<key>_change callback parameter in Python.
| (TypeScript) Type alias description[source] | |
|---|---|
ComponentState = Record<string, unknown> |
Still have questions?
Our forums are full of helpful information and Streamlit experts.
