port-from-bslib

Port bslib UI components to Py-Shiny with vendored assets and tests.

1.7k|134|Updated Jul 27, 2021
One-click install
npx skills add https://github.com/posit-dev/py-shiny --skill port-from-bslib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: port-from-bslib
Source: https://github.com/posit-dev/py-shiny/tree/main/.claude/skills/port-from-bslib
Command: npx skills add https://github.com/posit-dev/py-shiny --skill port-from-bslib

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured, repeatable workflow for porting UI components from R's bslib to Py-Shiny, preserving feature parity and maintainability.

Core Features & Use Cases

  • Port core API surface from bslib components to py-shiny.
  • Vendor and align TS/SCSS assets to ensure consistent styling.
  • Create tests and docs to support reliable porting and future maintenance.

Quick Start

Begin by reviewing the bslib PR and locating the R, TS, and SCSS sources; then implement Python equivalents under shiny/ui, vendor assets, port tests and docs, and finally update examples and tests.

Frequently Asked Questions about port-from-bslib

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I port bslib UI components from R to Shiny for Python?

Porting bslib components to Shiny for Python involves translating the R API, vendoring SCSS and JavaScript assets, wiring client-side bindings, and integrating tests and examples to preserve feature parity.

What is the best way to translate bslib SCSS and TypeScript assets for a Python Shiny app?

The best way to translate bslib SCSS and TypeScript assets is to vendor the original source files directly into your Python project and wire the client-side bindings to ensure consistent styling.

Can I maintain feature parity when migrating R bslib components to py-shiny?

Yes, you can maintain feature parity when migrating R bslib components to py-shiny by systematically translating the API, vendoring TS and SCSS assets, and porting the original tests and documentation.

How do I port tests and documentation when moving bslib components to Shiny for Python?

Porting tests and documentation when moving bslib components to Shiny for Python involves translating the original R test cases into Python equivalents and updating examples to support reliable maintenance.

Do I need to vendor JavaScript and SCSS files when porting bslib components to Python?

Yes, you need to vendor JavaScript and SCSS files when porting bslib components to Python to ensure consistent styling, preserve client-side interactivity, and maintain feature parity.