# Counterblocks > Polaris 2.0 web component primitives and editable Shopify App Home workflow blocks, installed as TypeScript source via the shadcn CLI registry. ## Polaris 2.0 Rules - Use Shopify Polaris 2.0 web components (``, ``, ``, ``, ``, ``, etc.), NOT legacy `@shopify/polaris` React v12 components. - Set `polarisUrl` to `https://cdn.shopify.com/shopifycloud/polaris-2.0.js` in both `AppProvider` and `shopifyApp` server config. - Install `@shopify/polaris-types@2.0.0` as a devDependency for JSX types for Polaris web components. ## shadcn Registry Endpoints - Public discovery & free blocks: `@counterblocks` -> `https://counterblocks.site/r/{name}.json` - Paid blocks (requires `Authorization: Bearer ${COUNTERBLOCKS_TOKEN}`): `@counterblocks-paid` -> `https://counterblocks.site/r/{name}.json` - Registry index: https://counterblocks.site/r/registry.json ## Quick Install - Free block (no account required): `npx -y shadcn@latest add https://counterblocks.site/r/resource-index.json` - Always inspect changes first with `--dry-run` or compare local edits with `--diff `. ## Catalog Items - Blocks catalog: https://counterblocks.site/blocks - Searchable resource index (Free, 0.4.0): https://counterblocks.site/blocks/resource-index | `@counterblocks/resource-index` | Bring status tabs, search, sortable columns, row quick actions, pagination, and empty states into one responsive table. - Saved views and filter controls (Pro, 0.5.0): https://counterblocks.site/blocks/filter-controls | `@counterblocks-paid/filter-controls` | Save pinned views, filter chips, multi-select/range filters, sort order, and visible columns with SavedViewControls. - Bulk actions (Pro, 0.3.0): https://counterblocks.site/blocks/bulk-actions | `@counterblocks-paid/bulk-actions` | Select across pages, preview before-and-after changes, handle stale snapshots, and filter or retry run results. - Setup guide (Pro, 0.3.0): https://counterblocks.site/blocks/setup-guide | `@counterblocks-paid/setup-guide` | Guide merchants through setup one task at a time with Polaris progress, collapse, and dismissal. - Theme app embed activation (Pro, 0.3.0): https://counterblocks.site/blocks/theme-app-embed-activation | `@counterblocks-paid/theme-app-embed-activation` | Guide merchants to the theme editor and verify the embed status for the selected theme. - Inventory restock queue (Pro, 0.3.0): https://counterblocks.site/blocks/restock-queue | `@counterblocks-paid/restock-queue` | Triage out-of-stock and low-stock products, surface incoming units, and start purchase orders or receiving flows. - Product targeting (Pro, 0.3.0): https://counterblocks.site/blocks/product-targeting | `@counterblocks-paid/product-targeting` | Choose which products, variants, or collections a promotion or pickup rule applies to. - Import column mapper (Pro, 0.3.0): https://counterblocks.site/blocks/import-column-mapper | `@counterblocks-paid/import-column-mapper` | Match CSV or spreadsheet columns to import fields with auto-matching and sample previews. ## Primitives - Primitives catalog: https://counterblocks.site/primitives - Button (``, Actions): https://counterblocks.site/primitives/button | Triggers actions and declarative overlay commands with primary, secondary, tertiary, critical, icon, loading, and disabled states. - Menu (``, Actions): https://counterblocks.site/primitives/menu | Groups contextual actions in a menu opened by a button. - Button group (``, Actions): https://counterblocks.site/primitives/button-group | Keeps related actions together and identifies the primary action. - Clickable (``, Actions): https://counterblocks.site/primitives/clickable | Turns a custom layout into a single interactive target. - Clickable chip (``, Actions): https://counterblocks.site/primitives/clickable-chip | Displays an interactive label for a selection, tag, or filter. - Link (``, Actions): https://counterblocks.site/primitives/link | Adds text navigation to a related page or resource. - Page (``, Layout): https://counterblocks.site/primitives/page | Provides the heading, action slots, and content area for a Shopify App Home page. - Section (``, Layout): https://counterblocks.site/primitives/section | Groups related content under a heading and supports nested sections. - Stack (``, Layout): https://counterblocks.site/primitives/stack | Arranges items in a row or column with consistent spacing and alignment. - Grid (``, Layout): https://counterblocks.site/primitives/grid | Arranges content in rows and columns that can adapt to the available width. - Box (``, Layout): https://counterblocks.site/primitives/box | Adds spacing, backgrounds, and borders to a flexible container. - Divider (``, Layout): https://counterblocks.site/primitives/divider | Draws a rule between related pieces of content. - Ordered list (``, Layout): https://counterblocks.site/primitives/ordered-list | Presents steps or other items in a numbered sequence. - Query container (``, Layout): https://counterblocks.site/primitives/query-container | Lets child layouts respond to the space available inside a container. - Unordered list (``, Layout): https://counterblocks.site/primitives/unordered-list | Groups related items in a bulleted list. - Text field (``, Forms): https://counterblocks.site/primitives/text-field | Collect single-line text with a visible label, field guidance, and inline validation. - Select (``, Forms): https://counterblocks.site/primitives/select | Choose one option from a list and use the current selection to filter results. - Checkbox (``, Forms): https://counterblocks.site/primitives/checkbox | Collect a selection or confirmation with supporting text and an inline error. - Switch (``, Forms): https://counterblocks.site/primitives/switch | Turn a setting on or off and reflect the change immediately. - Choice list (``, Forms): https://counterblocks.site/primitives/choice-list | Lets merchants choose one or several options from a named group. - Color field (``, Forms): https://counterblocks.site/primitives/color-field | Accepts a color value through text input and a built-in picker. - Color picker (``, Forms): https://counterblocks.site/primitives/color-picker | Shows a color palette for choosing a hue and saturation. - Date field (``, Forms): https://counterblocks.site/primitives/date-field | Accepts a calendar date in a form field. - Date picker (``, Forms): https://counterblocks.site/primitives/date-picker | Shows a calendar for choosing a date or a range. - Drop zone (``, Forms): https://counterblocks.site/primitives/drop-zone | Accepts local files by drag and drop or through a file picker. - Email field (``, Forms): https://counterblocks.site/primitives/email-field | Collects email addresses with email validation and keyboard support. - Money field (``, Forms): https://counterblocks.site/primitives/money-field | Collects a monetary amount with currency-aware formatting. - Number field (``, Forms): https://counterblocks.site/primitives/number-field | Collects a number with optional limits and stepper controls. - Password field (``, Forms): https://counterblocks.site/primitives/password-field | Collects a password with masked input and autocomplete support. - Search field (``, Forms): https://counterblocks.site/primitives/search-field | Collects a search query and supports clearing the field. - Text area (``, Forms): https://counterblocks.site/primitives/text-area | Collects multiline text such as notes, comments, and descriptions. - URL field (``, Forms): https://counterblocks.site/primitives/url-field | Collects website addresses with URL validation and keyboard support. - Banner (``, Feedback & Overlays): https://counterblocks.site/primitives/banner | Communicate updates, confirmations, and issues that need a merchant’s attention. - Badge (``, Feedback & Overlays): https://counterblocks.site/primitives/badge | Show a concise status for products, orders, and other records. - Modal (``, Feedback & Overlays): https://counterblocks.site/primitives/modal | Focus the merchant on a confirmation, short form, or important detail. - Popover (``, Feedback & Overlays): https://counterblocks.site/primitives/popover | Reveal related controls or quick actions next to the button that opens them. - Empty state (``, Feedback & Overlays): https://counterblocks.site/primitives/empty-state | Explains why a view is empty and points merchants to the next action. - Progress (``, Feedback & Overlays): https://counterblocks.site/primitives/progress | Displays how much of a measurable task has been completed. - Spinner (``, Feedback & Overlays): https://counterblocks.site/primitives/spinner | Signals that content is loading or an action is in progress. - Table (``, Data): https://counterblocks.site/primitives/table | Present records in columns, adapt them to a list on narrow screens, and paginate results. - Avatar (``, Media & Visuals): https://counterblocks.site/primitives/avatar | Represents a person with a profile image or initials. - Icon (``, Media & Visuals): https://counterblocks.site/primitives/icon | Displays a Polaris symbol alongside information or an action. - Image (``, Media & Visuals): https://counterblocks.site/primitives/image | Displays a full image with control over its aspect ratio and fit. - Thumbnail (``, Media & Visuals): https://counterblocks.site/primitives/thumbnail | Adds a compact image that helps identify an item in a list or table. - Chip (``, Typography & Content): https://counterblocks.site/primitives/chip | Displays a keyword or tag as a compact, static label. - Heading (``, Typography & Content): https://counterblocks.site/primitives/heading | Provides a semantic title that follows the surrounding section hierarchy. - Number (``, Typography & Content): https://counterblocks.site/primitives/number | Presents numeric figures in tabular numerals so they align cleanly. - Paragraph (``, Typography & Content): https://counterblocks.site/primitives/paragraph | Displays a block of readable text with optional inline emphasis. - Text (``, Typography & Content): https://counterblocks.site/primitives/text | Styles an inline phrase with emphasis, color, or a semantic tone. - Tooltip (``, Typography & Content): https://counterblocks.site/primitives/tooltip | Reveals short supplementary help when a trigger is hovered or focused. ## Links - Setup guide: https://counterblocks.site/setup - Pricing: https://counterblocks.site/pricing - Account & registry tokens: https://counterblocks.site/account