twilight.json file is the main configuration file for Theme Raed. It defines theme metadata, supported features, customizable settings, and available components for the Salla e-commerce platform.
File location
The configuration file is located at the root of the theme directory:Structure overview
Thetwilight.json file contains the following main sections:
- name - Theme name in multiple languages
- repository - GitHub repository URL
- author_email - Theme author contact
- features - List of supported theme features
- settings - Customizable theme settings
- components - Custom page builder components
- support_url - Support website URL
- description - Theme description in multiple languages
Theme metadata
Basic information
Theme name in multiple languages
GitHub repository URL for the theme
Contact email for theme support
Theme description in multiple languages
Features
Thefeatures array lists all supported theme capabilities:
Available features
Navigation features
Navigation features
Styling features
Styling features
- fonts - Custom font support
- color - Color customization options
- unite-cards-height - Uniform height for product cards
Component features
Component features
- component-featured-products - Featured products display
- component-fixed-banner - Static banner component
- component-fixed-products - Fixed products section
- component-products-slider - Product carousel slider
- component-photos-slider - Image carousel slider
- component-parallax-background - Parallax scrolling effects
- component-testimonials - Customer testimonials display
- component-square-photos - Square image gallery
- component-store-features - Store features highlights
- component-youtube - YouTube video embed
Other features
Other features
- filters - Product filtering capabilities
Settings
Thesettings array defines customizable options available in the theme dashboard:
Header settings
Fix the main menu at the top of the page when scrolling down
It is recommended to disable this if there are many items in the dropdown menu
Enable dark mode for the top navigation bar
Display important page links in the top bar (landing pages, blog, info pages)
Enable “More” menu in the main navigationWhen enabled, additional links will appear in a dropdown menu labeled “More” when there is not enough space
Footer settings
Enable dark mode for the footer section
Product page settings
Enable enhanced add to cart notification
Fix the add to cart button and quantity selector at the bottom of mobile screens
Display product tags
Image display method in product image sliderOptions:
cover- Cover the entire area while maintaining aspect ratiocontain- Show the full image centered
Enable image zoom in product sliderThis feature allows customers to zoom in on images to see more details
Home page settings
Vertical layout for products in the fixed products box on the home page
Show “View All” button on the home page
Image display method in the square items list sectionOptions:
cover- Cover the entire area while maintaining aspect ratiocontain- Show the full image centered
Components
Thecomponents array defines custom page builder elements available in the theme:
Enhanced animated images
Quick links
Animated products with background
Enhanced square images
Images are cropped from the edges to fit different screen sizes. Consider the cropped areas when designing to ensure the image appears complete as much as possible.
Brands
Custom testimonials
Setting field types
The theme supports various field types for settings:Boolean (switch)
Boolean (switch)
Toggle switches for on/off options
Dropdown list
Dropdown list
Single or multiple selection from predefined options
Text input
Text input
Single-line text input with optional multi-language support
Textarea
Textarea
Multi-line text input
Image upload
Image upload
Image file upload with recommended dimensions
Collection
Collection
Repeatable groups of fields
Validation
Ensure yourtwilight.json file is valid JSON and follows the Salla theme schema. Common validation rules:
- All component
keyvalues must be unique UUIDs - Required fields must have the
"required": trueproperty - Multilanguage fields should include
"multilanguage": true - Collection fields must specify
minLengthandmaxLength - Image fields should include recommended dimensions in the description
Best practices
- Use descriptive IDs - Setting IDs should be clear and self-explanatory
- Provide descriptions - Help users understand what each setting does
- Set appropriate defaults - Choose sensible default values for settings
- Limit collection sizes - Don’t allow unlimited items in collections to maintain performance
- Include preview images - Add static description fields with preview images for components
- Support multiple languages - Use multilanguage fields for user-facing text
- Document image sizes - Always specify recommended image dimensions