About design tokens

With this document, merchants can learn the design tokens for F&B (food and beverage) D-store template source code.

Overview

Alipay+ D-store multiplies merchants' sales channels by selling across platforms with just one single store. By providing a suite of toolkits to digitalize merchants' business, operations, and marketing, Alipay+ D-store helps unlock potential opportunities for merchants to better serve and engage with consumers in a cost-efficient way.

This document provides basic design tokens of UI components and elements that are used in F&B D-store template source code. It helps you understand design logic and customize your design token values.

For the design tokens, there are two parts you can expect:

Part A: Color Tokens

1. Brand Primary

image

Scenarios

This token is widely used for the background color in primary buttons.

Note: The usage of the Brand Primary token is closely related to the usage of the Content on Button token, which should be taken into consideration together. Therefore, for brand colors that are too light, we suggest that you use the same color value as the Content Primary token when designing the Content on Button token.

image

2. Brand Rewards

image

Scenarios

This token is widely used in promotional scenarios, such as the content, arrow, or background color of the promotional content or vouchers.

image

3. Content Primary

image

Scenarios

This token is widely used for the primary headings, the pop-up window titles, or important titles on a page. If you do not have a systematic color system for text, this default token is recommended.

image

4. Content Secondary

image

Scenarios

This token is mainly used for secondary headings in primary pages or primary headings in secondary pages. It conveys the primary textual information to which you must pay the most attention.

image

5. Content Tertiaryimage

Scenarios

This token is typically used for the body that contains description text or content text.

image

6. Content Weakimage

Scenarios

This token is widely used in scenarios such as all unselected icons and options as well as the UI components that contain the secondary description text or secondary information of secondary titles. This section does not offer an exhaustive list of use scenarios. Instead, the following examples are provided for your reference.

image

7. Content Default

imageScenarios

This token is widely used in scenarios such as unavailable icons and options as well as the UI components that contain the default text or information text in the unavailable state.

image

8. Content Link

image

Scenarios

This token is typically used for the text that indicates actions or contains links and checkboxes that contain specific agreements.

image

9. Content On Button

image

Scenarios

This token is typically used for the text of buttons.

image

10. Content White

image

Scenarios

This token is mainly used for text in white, such as the tag text in white.

image

11. Content Highlight

image

Scenarios

This token is widely used in scenarios such as price-related text, the text of important titles, or the text of non-clickable icons or tags for decoration or highlighting.

image

12. Content Action

image

Scenarios

This token is typically used for clickable and unique icons.

image

13. Content Selection

image

Scenarios

This token is typically used for clickable icons that indicate selection.

image

14. Border Enabled

image

Scenarios

This token is used for borders or dividers in the available state.

image

15. Border Disabled

image

Scenarios

This token is mainly used for borders in the unavailable state.

image

16. Border Active

image

Scenarios

This token is typically used for borders in the activated state, for example, the input component border in the Typing state.

image

17. Border Brand

image

Scenarios

This token is used for borders in the selected state.

image

18. Background Primary

image

Scenarios

This token is mainly used in scenarios such as the background of important brand-specific content, highlighted content, or tags.

image

19. Background Secondary

image

Scenarios

This token is mainly used for the background of tabs or tags in the unselected state.

image

20. Background Tertiary

image

Scenarios

This token is widely used in the background of the following UI components: titles on custom item pages and input components.

image

21. Background Card

image

Scenarios

This token is typically used for the background of cards.

image

22. Light

image

Scenarios

This token is typically used for the background of all pages in light mode.

image

23. Dark

image

Scenarios

This token is typically used for the background of all pages in dark mode. It is left unused in the D-store template. The Dark token works as an alternate configuration item because it is used differently in different UI systems.

Part B: Typography Tokens

The following sections provide three typography styles, including bold, medium, and regular, and their usage scenarios. To configure fonts, you need to provide the corresponding font files in the ./src/app.less file of the D-store template source code. For more information, see Customize fonts.

1. Bold

Scenarios

This token is used for the following UI components: the headings of primary pages, primary titles of composite modules on secondary pages, important text, feature-related text, all titles on floating panels, and most prices or numbers.

image

2. Medium

Scenarios

This token is used for the following UI components: the text of buttons, the action text, the titles of secondary pages, descriptive subtitles, the body text, and the most inputted text.

image

3. Regular

Scenarios

This token is used for the following UI components: the body of secondary pages, the body of status pages, description text, and tag text.

image