LogoLogo
Build appsContact API support
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
  • Introduction to Instant Site development
  • Site templates glossary
  • Develop Site templates
    • Quickstart guide to a working Site template
    • Ecwid (Lightspeed E-Series) Crane CLI tool
    • Build Site templates: project structure
      • template-name.ts
      • section-name.vue
      • content.ts
      • design.ts
      • showcases/1.ts
      • translations.ts
      • layout.ts
  • Launch Site templates
    • Step-by-step publishing guide for Site templates
    • Monetize Site templates
    • Requirements for public Site templates
    • Recommendations for building public Site templates
  • Develop custom sections
    • How to use sections without templates
    • Quickstart with custom sections without building a template

Lightspeed® 2025

On this page

Was this helpful?

  1. Develop Site templates
  2. Build Site templates: project structure

showcases/1.ts

Last updated 7 months ago

Was this helpful?

Showcase files are displayed as section previews in the Instant Site Editor. With showcases, you can explain and promote specific features of your template to users.

You can create several showcases for the same section by adding more than one file to the /showcases/ folder. These showcases can also be used in template-name.ts files.

Different showcases for the same section are defined by their ID. It starts and iterates by 1. Showcases also have their own translations.ts file for text labels with the same logic. For example, if you want to add three showcases, your folder will contain four files:

section-name/  
  showcases/  
    1.ts  
    2.ts  
    3.ts  
    translations.ts

Each showcase file includes the following fields:

Setting
Type
Description

showcaseId

string

Numeric showcase ID converted to string type. Defines the order in which showcases are displayed in the Editor. Starts with '1'.

previewImage

obj

Showcase preview image for section browser in the Editor.

blockName

string

Text label for the section name displayed in the left menu.

content

obj

Default settings for the section elements declared in the 'content.ts' file.

design

obj

Default settings for types declared in the 'design.ts' file.

Showcase files don't have to cover all declared content and design settings. Additionally, you can add several images for one IMAGE element type depending on the user's device and screen size.

Code example for 'showcase/1.ts' file:

showcaseId: '1',
previewImage: {
	set: {
		ORIGINAL: {
			url: 'preview_image.jpg',
		},
	},
},
blockName: '$label.showcase_1_name',
content: {
	text_input_1: {
		type: 'INPUTBOX',
		text: '$label.showcase_1_input_1',
	},
	text_input_2: {
		type: 'TEXTAREA',
		text: '$label.showcase_1_input_2',
  },
  image_content_1: {
		type: 'IMAGE',
		imageData: {
			set: {
				ORIGINAL: {
					url: 'new_arrivals_pc_high.jpeg',
				},
				MOBILE_WEBP_LOW_RES: {
					url: 'new_arrivals_mobile_low.jpeg',
				},
				MOBILE_WEBP_HI_RES: {
					url: 'new_arrivals_mobile_high.jpeg',
				},
				WEBP_LOW_RES: {
					url: 'new_arrivals_pc_low.jpeg',
				},
				WEBP_HI_2X_RES: {
					url: 'new_arrivals_pc_high.jpeg',
				},
			},
			borderInfo: {},
		},
	},
design: {
	text_input_1: {
		type: 'TEXT',
		font: 'global.fontFamily.body',
		size: 44,
		bold: true,
		italic: false,
		color: '#333',
	},
	background: {
		type: 'BACKGROUND',
		style: 'COLOR',
		color: 'global.color.background',
	}
}