Develop a custom Shiny component with React and TypeScript
mainThis template demonstrates how to structure a Python package that includes a custom JavaScript/React component for Shiny. The project is split into a TypeScript source directory for the component logic and a Python package directory that bundles the compiled JavaScript assets.
Project Structure
srcts/index.ts: Defines the input component using TypeScript.custom_component/custom_component.py: Contains the Python interface for the component.custom_component/__init__.py: Defines the Python package exports.custom_component/distjs/: The destination folder for bundled JavaScript files.example-app/app.py: A sample Shiny application demonstrating the component.