@molecule/app-vendor-card-vue
Feature · vendor-card · App (browser) · v1.1.2 · Apache-2.0
Seller / vendor / agent profile card with logo, description, rating, badges
npm install @molecule/app-vendor-card-vueHow it works
@molecule/app-vendor-card-vue is a ready-made vendor-card feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { createApp, defineComponent, h } from 'vue'
import { VendorCard } from '@molecule/app-vendor-card-vue'
import { Button } from '@molecule/app-ui-vue'
const App = defineComponent({
setup() {
return () =>
h(VendorCard, {
name: 'Acme Supplies',
logoSrc: '/logos/acme.png',
description: 'Industrial parts, fast shipping',
rating: 4.7,
reviewCount: 312,
memberSince: 'Jan 2021',
actions: h(Button, { size: 'sm', onClick: () => console.log('follow') }, () => 'Follow'),
onClick: () => console.log('open vendor page'),
})
},
})
createApp(App).mount('#app')Works with: @molecule/app-ui, @molecule/app-ui-vue, @molecule/app-vue
Reference
Vendor / seller / agent profile card.
Exports VendorCard — Avatar/logo + name + tagline + rating/review count
- member-since + badges + actions row, on the shared Card. It is the Vue
counterpart of
@molecule/app-vendor-card-react: same props and the same DOM for the same input.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { createApp, defineComponent, h } from 'vue'
import { VendorCard } from '@molecule/app-vendor-card-vue'
import { Button } from '@molecule/app-ui-vue'
const App = defineComponent({
setup() {
return () =>
h(VendorCard, {
name: 'Acme Supplies',
logoSrc: '/logos/acme.png',
description: 'Industrial parts, fast shipping',
rating: 4.7,
reviewCount: 312,
memberSince: 'Jan 2021',
actions: h(Button, { size: 'sm', onClick: () => console.log('follow') }, () => 'Follow'),
onClick: () => console.log('open vendor page'),
})
},
})
createApp(App).mount('#app')
Type
feature
Installation
npm install @molecule/app-vendor-card-vue @molecule/app-ui @molecule/app-ui-vue @molecule/app-vue vue
API
Interfaces
VendorCardProps
Props accepted by the VendorCard component.
interface VendorCardProps {
/** Vendor / seller display name. */
name: VNodeChild
/** Optional logo URL — falls back to Avatar text initials. */
logoSrc?: string
/** Tagline / one-liner. */
description?: VNodeChild
/** 0-5 average rating. */
rating?: number
/** Total review count. */
reviewCount?: number
/** Member-since date display. */
memberSince?: VNodeChild
/** Optional badges row (Verified, Top seller, etc.). */
badges?: VNodeChild
/** Right-side actions (Follow, Message, Visit shop). */
actions?: VNodeChild
/** Optional click handler on the body. */
onClick?: () => void
/** Extra classes. */
className?: string
}
Constants
VendorCard
Vendor / seller / agent profile card. Used in marketplaces, agent directories, multi-tenant catalogs.
Composes Card + Avatar from @molecule/app-ui-vue. onClick makes the
whole card clickable but adds no keyboard handler or role — put primary
navigation in actions buttons for accessibility. Node-valued props
(name, description, memberSince, badges, actions) arrive as a
prop AND a same-named slot; the component accepts either.
const VendorCard: DefineComponent<
ExtractPropTypes<{
name: null
logoSrc: { type: StringConstructor; default: undefined }
description: null
rating: { type: NumberConstructor; default: undefined }
reviewCount: { type: NumberConstructor; default: undefined }
memberSince: null
badges: null
actions: null
className: { type: StringConstructor; default: undefined }
}>,
() => VNode,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
'click'[],
'click',
PublicProps,
Readonly<
ExtractPropTypes<{
name: null
logoSrc: { type: StringConstructor; default: undefined }
description: null
rating: { type: NumberConstructor; default: undefined }
reviewCount: { type: NumberConstructor; default: undefined }
memberSince: null
badges: null
actions: null
className: { type: StringConstructor; default: undefined }
}>
> &
Readonly<{ onClick?: ((...args: any[]) => any) | undefined }>,
{ logoSrc: string; rating: number; reviewCount: number; className: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
props— Component props (seeVendorCardProps).
Returns: The vendor card component.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-ui^1.0.1@molecule/app-ui-vue^1.1.0@molecule/app-vue^3.13.0 || ^4.0.0vue^3.4.0
Runtime Dependencies
@molecule/app-ui@molecule/app-ui-vue@molecule/app-vuevue
Composes Card + Avatar from @molecule/app-ui-vue. onClick makes the
whole card clickable but adds no keyboard handler or role — put primary
navigation in actions buttons for accessibility. rating renders a
single ★ plus the number (toFixed(1)), not a five-star row;
reviewCount renders only when rating is also set. When name is not a
plain string the Avatar alt falls back to hardcoded 'Vendor'. All text
slots (description, memberSince, badges, actions) are pre-translated — no
locale bond. Node-valued props arrive as a prop AND a same-named slot;
the component accepts either. Props (documented on the exported
VendorCardProps interface): name, logoSrc, description, rating,
reviewCount, memberSince, badges, actions, onClick, className.