CnObjectCard
Schema-driven card for displaying an object's key information. Uses schema configuration to determine which fields to show as title, description, image, and metadata.
Wraps: NcCheckboxRadioSwitch, CnCellRenderer
Try it
Loading CnObjectCard playground…

Props
| Prop | Type | Default | Description |
|---|---|---|---|
object | Object | (required) | Object data |
schema | Object | (required) | Schema with properties and configuration |
selected | Boolean | false | Selection state |
selectable | Boolean | false | Show selection checkbox |
maxMetadata | Number | 4 | Max metadata fields shown |
Schema Configuration Keys
The schema's configuration object controls card layout:
| Key | Description |
|---|---|
objectNameField | Field used as card title |
objectDescriptionField | Field used as description text |
objectImageField | Field containing image URL |
objectSummaryField | Field used as summary |
Events
| Event | Payload | Description |
|---|---|---|
click | object | Card clicked |
select | object | Selection checkbox toggled |
Slots
| Slot | Scope | Description |
|---|---|---|
#badges | \{ object \} | Badge section |
#actions | \{ object \} | Actions section |
#metadata | \{ object, fields \} | Metadata section override |
Usage
<CnObjectCard
:object="contact"
:schema="contactSchema"
:selectable="true"
@click="onCardClick"
@select="onSelect" />
Reference (auto-generated)
The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnObjectCard.vue and update automatically whenever the component changes.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
object | object | ✓ | — | The object data |
schema | object | ✓ | — | Schema definition with properties and configuration |
selected | boolean | false | Whether this card is selected | |
selectable | boolean | false | Whether to show selection checkbox | |
maxMetadata | number | 4 | Maximum number of metadata fields to show |
Events
| Name | Payload | Description |
|---|---|---|
click | — | |
select | — |
Slots
| Name | Bindings | Description |
|---|---|---|
badges | object | |
metadata | object, fields | |
actions | object |