| sidebar_label | cardShape |
|---|---|
| title | cardShape |
| description | You can learn about the cardShape config in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking. |
@short: Optional. An object with settings for managing information displayed on the left side of each card
cardShape?: {
category?: boolean,
details?: boolean,
preview?: boolean,
price?: boolean,
review?: boolean,
subtitle?: boolean,
title?: boolean
};In the cardShape object you can specify the following parameters (fields):
category- (optional) shows/hides a category namedetails- (optional) shows/hides detailspreview- (optional) shows/hides a preview imageprice- (optional) shows/hides pricereview- (optional) shows/hides rating informationsubtitle- (optional) shows/hides a card's subtitletitle- (optional) shows/hides a card's title
const defaultCardShape = {
category: true,
details: true,
preview: true,
price: true,
review: true,
subtitle: true,
title: true
};const cardShape = {
review: false,
subtitle: false,
price: false
};
new booking.Booking("#root", {
cardShape,
// other parameters
});The snippet below demonstrates how to configure what fields to display on the left side of cards:
<iframe src="https://snippet.dhtmlx.com/6mxd7918?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>:::info
You can also configure the appearance of a card using the cardTemplate property. If both cardTemplate and cardShape are applied, cardTemplate will override the cardShape settings.
:::
Related articles: