![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@marketplace-co/card
Advanced tools
src/Card.js
:Card
, mpc-card
Name | Module | Package |
---|---|---|
LitElement | lit |
Name | Privacy | Type | Default | Description | Inherited From |
---|---|---|---|---|---|
title | public | string | '' | Title of the card | |
subtitle | public | string | '' | Subtitle of the card, shown above the title if present | |
href | public | string | '' | When present, clicking the card will route to this string | |
images | public | array | [] | Array of image urls, only the first image will be shown | |
loading | public | boolean | false | Show the loading state | |
buttonText | public | string | '' | When present, a button is shown at the buttom of the card | |
currency | public | string | '' | When present, a currency is shown next to the price | |
currencySymbol | public | string | '$' | The symbol to show before price string. Only used when price is set. | |
currencyFormat | public | string | '0,0[.]00' | The format string to display the price in, see <a href="http://numeraljs.com" target="_blank">numeraljs.com</a> for a full list of options | |
darkMode | public | string | 'disabled' | The theme of the card, valid options are `disabled`, `auto` & `active`. The auto strategy uses the `prefers-color-scheme` media feature under the hood, it will not listen for color changes when set to auto | |
autoFetch | public | boolean | false | When true, autofetch data from the MPC API and apply it. See `autoFetchConfig` for more info. | |
autoFetchConfig | public | object | {} | Auto fetch data for the card when required params are supplied<br/> `{`<br/> `entityId,`<br/> `entityType,`<br/> `marketplaceId,`<br/> `marketplaceBaseUrl,`<br/> `apiKey,`<br/> `apiBaseUrl,`<br/> `}` <br/><br/> `entityType` options are `listing` | |
target | public | Tells the browser where to open the link. Only used when href is set. | |||
price | public | When present, a price is shown. Formatted by numeral.js |
Name | Privacy | Description | Parameters | Return | Inherited From |
---|---|---|---|---|---|
_handleAutoFetch | autoFetch | ||||
_handleAutoFetchResponse | data, entityType | ||||
_handleSetPropertiesForListing | data | ||||
mediaTemplate | |||||
loadingTemplate | |||||
contentTemplate |
Name | Field | Inherited From |
---|---|---|
title | title | |
subtitle | subtitle | |
images | images | |
loading | loading | |
href | href | |
target | target | |
buttonText | buttonText | |
price | price | |
currency | currency | |
currencySymbol | currencySymbol | |
currencyFormat | currencyFormat | |
darkMode | darkMode | |
autoFetch | autoFetch | |
autoFetchConfig | autoFetchConfig |
Kind | Name | Declaration | Module | Package |
---|---|---|---|---|
js | Card | Card | src/Card.js |
mpc-card.js
:Kind | Name | Declaration | Module | Package |
---|---|---|---|---|
custom-element-definition | mpc-card | Card | /src/Card.js |
FAQs
Webcomponent card following open-wc recommendations
The npm package @marketplace-co/card receives a total of 1 weekly downloads. As such, @marketplace-co/card popularity was classified as not popular.
We found that @marketplace-co/card demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.