# Polaris Admin Extensions (part 2 of 2) This guide is split so each part fits in a single read. The other parts sit in this same directory — `polaris-admin-extensions.md` — and you should read the ones relevant to your task. --- ```html ProductPriceBlue T-Shirt$29.99 Styled text Helpful tooltip text Item AItem B ``` ## Web component imports (all versions except 2025-07) For versions other than `2025-07`, use the Preact entry point: ```ts import "@shopify/ui-extensions/preact"; import { render } from "preact"; ``` ### Polaris web components (`s-admin-action`, `s-badge`, etc.) Polaris web components are custom HTML elements with an `s-` prefix. These are globally registered and require **no import statement**. Use them directly as JSX tags. Do not use these `s-*` web components for `2025-07`: ```tsx // No import needed — s-admin-action, s-badge, s-button, etc. are globally available Submit Cancel ``` For versions other than `2025-07`, when the user asks for Polaris web components (e.g. `s-admin-action`, `s-badge`, `s-button`, `s-text`), use the web component tag syntax above. **Web component attribute rules:** - Use **camelCase** attribute names: `alignItems`, `paddingBlock`, `borderRadius` — NOT kebab-case (`align-items`, `padding-block`) - **Boolean attributes** (`disabled`, `loading`, `dismissible`, `hidden`, `required`, `checked`, `defaultChecked`) accept shorthand or `{expression}`: - ✅ ``, ``, `` - **String keyword attributes** (`padding`, `gap`, `direction`, `tone`, `variant`, `size`, `background`, `alignItems`) must be string values — never shorthand or `{true}`: - ✅ ``, ``, `` - ❌ ``, `` — boolean shorthand on string props fails TypeScript