Metadata-Version: 2.1
Name: streamlit_custom_input
Version: 0.1.0
Summary: Streamlit component for taking user input
Home-page: 
Author: Farah S
Author-email: 
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit >=0.63
Provides-Extra: devel
Requires-Dist: wheel ; extra == 'devel'
Requires-Dist: pytest ==7.4.0 ; extra == 'devel'
Requires-Dist: playwright ==1.39.0 ; extra == 'devel'
Requires-Dist: requests ==2.31.0 ; extra == 'devel'
Requires-Dist: pytest-playwright-snapshot ==1.0 ; extra == 'devel'
Requires-Dist: pytest-rerunfailures ==12.0 ; extra == 'devel'

# streamlit_custom_input

![input_example](https://github.com/Farah-S/streamlit_custom_chat/blob/master/streamlit_custom_chat/frontend/public/container_example.png)

Streamlit custom chat input box, it returns the value entered by the user on enter or by clicking on the button. To add a new line the user can press shift+enter. The parameters are as follow:

Args:
    initialValue (string, optional): 
        The initial value that will be displayed in the input box
    
    key (string, optional): 
        Uniquely identifies the input instance. Defaults to "ChatInput".
    
    inputStyle (dict, optional): 
        Allows the customization of the input box style with CSS. 
        The values that can be changed and their default values are 
        {
            paddingLeft: "10px", 
            paddingRight: "10px",
            whiteSpace: "pre-line", 
            resize: "none", 
            marginLeft: "0", 
            marginRight: "10px",
            paddingBottom: "3px", 
            width: "75%", 
            borderRadius: "1rem", 
            maxBlockSize: "75px", 
            borderColor: "#f4efff", 
            backgroundColor: "#fcf9ff"
        }.
        
    buttonStyle (dict, optional): 
        Allows the customization of the input button style with CSS. 
        The values that can be changed and their default values are 
        {    
            width: "55px", 
            borderRadius: "3rem", 
            paddingRight: "5px", 
            paddingTop: "3px", 
            paddingLeft: "9px", 
            display: "flex", 
            justifyContent: "center", 
            backgroundColor: "#edf1ff", 
            color: "#5b5b5c",
            height: "33px"
        }.

Returns:
    string

## Installation instructions

```sh
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps streamlit_custom_input
```

## Usage instructions
Example of how to use without customization

```python
import streamlit as st

from streamlit_custom_input import ChatInput

value = ChatInput(initialValue="",key="input")
```

Example of how to use with customization

```python
import streamlit as st

from streamlit_custom_input import ChatInput

value = ChatInput(initialValue="",key="input", inputStyle={"backgroundColor":"black"}, buttonStyle={"height":"50px"})
```

For more example please check the app.py
