Skip to main content

react-web-components

Guides React integration with web components, including fig-* and toolkit-* elements. Use whenever creating, editing, reviewing, or debugging JSX that contains custom elements or web-component APIs.

소스 정보

저장소
rogie/figma-webgpu-shader-studio
최근 소스 활동
2026년 9월 22일 11:57
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
react-web-components
description
Guides React integration with web components, including fig-* and toolkit-* elements. Use whenever creating, editing, reviewing, or debugging JSX that contains custom elements or web-component APIs.
# React Web Components ## Project rule any web component, such as fig-* or toolkit-* cannot use className terminology in react. it needs class attribute. - Use `class` on every custom element whose tag contains a hyphen. - Continue using `className` on native HTML elements and React components. - Preserve the web component's documented attribute names, including hyphenated names such as `aspect-ratio` and `fig-menu-trigger`. ```jsx <fig-button class="toolbar-button" variant="ghost" icon="true"> <fig-icon name="more" /> </fig-button> <div className="toolbar">...</div> ``` ## React integration - This project uses React 18. For non-string object or function properties, assign the property through a ref in an effect unless the component API explicitly supports an attribute. - JSX handlers are appropriate for standard DOM events such as `click`. Subscribe to web-component custom events with `addEventListener` on a ref and remove the listener during effect cleanup. - Treat presence-based boolean attributes carefully. When false should remove the attribute, use `condition ? "" : undefined` unless the component documents another format. - Before finishing a JSX edit, check all `fig-*`, `toolkit-*`, `tk-*`, and other hyphenated tags for accidental `className` usage. ## Styling FigUI3 and ToolKit components already include their visual design. Do not add custom CSS, extra `class` values, or appearance overrides for `fig-*` / `toolkit-*` unless the user asked. Follow `.cursor/skills/figui3-styling/SKILL.md` and ask first.
GitHub에서 보기