Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vtex-io-react-apps

БесплатноБез исполняемых скриптовНе проверен

Apply when building React components under react/ or configuring store blocks in store/ for VTEX IO apps. Covers interfaces.json, contentSchemas.json for Site…

vtexот vtex★ 47 звёзд на GitHub

Об этом скилле

Frontend React Components & Hooks

When this skill applies

Use this skill when building VTEX IO frontend apps using the react builder — creating React components that integrate with Store Framework as theme blocks, configuring interfaces.json, setting up contentSchemas.json for Site Editor, and applying styling patterns.

  • Creating custom storefront components (product displays, forms, banners)
  • Building admin panel interfaces with VTEX Styleguide
  • Registering components as Store Framework blocks
  • Exposing component props in Site Editor via contentSchemas.json
  • Applying css-handles for safe storefront styling

Do not use this skill for:

  • Backend service implementation (use vtex-io-service-apps instead)
  • GraphQL schema and resolver development (use vtex-io-graphql-api instead)
  • Manifest and builder configuration (use vtex-io-app-structure instead)

Decision rules

  • Every visible storefront element is a block. Blocks are declared in theme JSON and map to React components via interfaces.
  • interfaces.json (in /store) maps block names to React component files: "component" is the file name in /react (without extension), "allowed" lists child blocks, "composition" controls how children work ("children" or "blocks").
  • Each exported component MUST have a root-level file in /react that re-exports it. The builder resolves "component": "ProductReviews" to react/ProductReviews.tsx.
  • For storefront components, use vtex.css-handles for styling (not inline styles, not global CSS).
  • For admin components, use vtex.styleguide — the official VTEX Admin component library. No third-party UI libraries.
  • Use contentSchemas.json in /store to make component props editable in Site Editor (JSON Schema format). Merchant edits are stored by vtex.pages-graphql under a key that includes the declaring app's MAJOR version ([email protected]:template). A major version bump on the declaring app makes those edits invisible to the resolver until they are migrated to the new major with the updateThemeIds mutation in [email protected] — see vtex-io-storefront-theme-versioning.
  • Use react-intl and the messages builder for i18n — never hardcode user-facing strings.
  • Fetch data via GraphQL queries (useQuery from react-apollo), never via direct API calls from the browser.

Architecture:

Store Theme (JSON blocks)
  └── declares "product-reviews" block with props
        │
        ▼
interfaces.json → maps "product-reviews" to "ProductReviews" component
        │
        ▼
react/ProductReviews.tsx → React component renders
        │
        ├── useCssHandles() → CSS classes for styling
        ├── useQuery() → GraphQL data fetching
        └── useProduct() / useOrderForm() → Store Framework context hooks

Hard constraints

Constraint: Declare Interfaces for All Storefront Blocks

Every React component that should be usable as a Store Framework block MUST have a corresponding entry in store/interfaces.json. Without the interface declaration, the block cannot be referenced in theme JSON files.

Why this matters

The store builder resolves block names to React components through interfaces.json. If a component has no interface, it is invisible to Store Framework and will not render on the storefront.

Detection

If a React component in /react is intended for storefront use but has no matching entry in store/interfaces.json, warn the developer. The component will compile but never render.

Correct

{
  "product-reviews": {
    "component": "ProductReviews",
    "composition": "children",
    "allowed": ["product-review-item"]
  },
  "product-review-item": {
    "component": "ReviewItem"
  }
}
// react/ProductReviews.tsx
import ProductReviews from './components/ProductReviews'

export default ProductReviews

Wrong

// react/ProductReviews.tsx exists but NO store/interfaces.json entry
// The component compiles fine but cannot be used in any theme.
// Adding <product-reviews /> in a theme JSON will produce:
// "Block 'product-reviews' not found"
import ProductReviews from './components/ProductReviews'

export default ProductReviews

Constraint: Use VTEX Styleguide for Admin UIs

Admin panel components (apps using the admin builder) MUST use VTEX Styleguide (vtex.styleguide) for UI elements. You MUST NOT use third-party UI libraries like Material UI, Chakra UI, or Ant Design in admin apps.

Why this matters

VTEX Admin has a consistent design language enforced by Styleguide. Third-party UI libraries produce inconsistent visuals, may conflict with the Admin's global CSS, and add unnecessary bundle size. Apps submitted to the VTEX App Store with non-Styleguide admin UIs will fail review.

Detection

If you see imports from @material-ui, @chakra-ui/react, @chakra-ui, antd, or @ant-design in an admin app, warn the developer to use `vtex.stylegu

Полный SKILL.md на GitHub

Установить vtex-io-react-apps в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл vtex-io-react-apps?

Apply when building React components under react/ or configuring store blocks in store/ for VTEX IO apps. Covers interfaces.json, contentSchemas.json for Site Editor, VTEX Styleguide for admin apps, and css-handles for storefront styling. Use for creating custom storefront components, admin panels, pixel apps, or any frontend development within the VTEX IO react builder ecosystem.

Как установить скилл vtex-io-react-apps?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vtex-io-react-apps запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить vtex-io-react-apps с