Value only custom components

How to use streamlit as a python-js bridge? make custom components only return value but no need to render html elements.

Just like value widget in ipywidget .