Skip to main content

This component allows you to have a joystick in streamlit

Project description

streamlit-joystick

This component allows you to have a joystick in streamlit

Installation instructions

pip install streamlit-joystick

Usage instructions

Single Joystick

import streamlit as st

from st_joystick import st_joystick

value = st_joystick()
st.write(value)

Multiple Joysticks

import streamlit as st

from st_joystick import st_joystick

@st.fragment
def left_joystick():
    value = st_joystick(options={'size': 200}) # default joystick id for the zone element = 0
    st.write(value)

@st.fragment
def right_joystick():
    value = st_joystick(options={'size': 200}, id=1) #remember to set the zone element id for subsequent joysticks
    st.write(value)

def main():
    cols = st.columns(2)
    with cols[0]:
        left_joystick()
    with cols[1]:
        right_joystick()


if __name__ == "__main__":
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_joystick-0.1.1.tar.gz (461.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_joystick-0.1.1-py3-none-any.whl (468.4 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_joystick-0.1.1.tar.gz.

File metadata

  • Download URL: streamlit_joystick-0.1.1.tar.gz
  • Upload date:
  • Size: 461.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for streamlit_joystick-0.1.1.tar.gz
Algorithm Hash digest
SHA256 67a6e83e02bdd3830b3905b7f4938d084e3fd66ee68bd387876ec02be7c07f1f
MD5 821b4c4f1b9a54c8533cd77d226c1866
BLAKE2b-256 0b27abccd45daa53bb38c394b6ea675dcbd5d2a99804c1b83c6ca82428b59929

See more details on using hashes here.

File details

Details for the file streamlit_joystick-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_joystick-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04997ff886cc58024bdb7381c7a93ba0f3fde6147f94ed264becd552dc1a1c66
MD5 615ca984bf52f2782f898f687dcc1d7a
BLAKE2b-256 32bdf4d53d29d749d9c029ded9d54253dd0973186383e64100547e7a976711de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page