Sync web components documentation with source repository attributes#353
Conversation
Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
| | `crop` | Shopify only. The crop of the image. Can be "center", "left", "right", "top", or "bottom". | | ||
| | `layout` | The layout of the image. Can be "fixed", "constrained", or "fullWidth". Defaults to "constrained". | | ||
| | `alt` | Alternative text for the image for accessibility purposes. | | ||
| | `sizes` | The sizes attribute for responsive images to help the browser choose the right image size. | | ||
| | `loading` | The loading behavior of the image. Use "lazy" for lazy loading or "eager" for immediate loading. | | ||
| | `fetch-priority` | Provides a hint to the browser about the priority of this image relative to other images. Can be "high", "low", or "auto". | | ||
| | `breakpoints` | Custom widths (as an array of numbers) for responsive image generation. Default breakpoints are generated based on common screen sizes. | | ||
| | `unstyled` | When present, prevents inline styles from being applied to the image element. | |
There was a problem hiding this comment.
Would be nice to mention the defaults where applicable.
There was a problem hiding this comment.
Done. Added default values for loading (defaults to "lazy"), fetch-priority (defaults to "auto"), and unstyled (defaults to false) in commit 0ad422a.
| | `brand` | Show brand/vendor data. Defaults to `false`. | | ||
| | `discount` | Show discount data. Defaults to `false`. | | ||
| | `rating` | Show product rating. Defaults to `false`. | | ||
| | `variant-id` | The specific variant ID to display. When set, shows this variant's data instead of the default variant. | |
There was a problem hiding this comment.
I think it makes more sense to say what's happening by default, rather than "When a variant id is set, will show this variant"
There was a problem hiding this comment.
Updated to describe the default behavior first: "By default, displays the default variant. When set, shows this variant's data instead." in commit 0ad422a.
| | `handle` | **Required.** The Shopify product handle to fetch data for. | | ||
| | `preselect` | Whether to automatically preselect the options of the first available variant. Defaults to `false`. | | ||
| | `variant-id` | Optional. The ID of the variant to preselect on load. | | ||
| | `mode` | Optional. Display mode: "options" or "compact". Defaults to "options". | |
There was a problem hiding this comment.
"options" or "compact"? Backticks to emphasize these are exact string values.
There was a problem hiding this comment.
Added backticks around "options" and "compact" to emphasize they are exact string values in commit 0ad422a.
…back Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
nav-synced)loading,fetch-priority,breakpoints,unstyled)image-mode,variant-id,mock)mode,max-values,variant-id,placeholder)templatedeprecation notice, addmock)title-selector)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.