Theme Raed is highly customizable, allowing you to modify styles, layouts, components, and behavior to match your brand.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SallaApp/theme-raed/llms.txt
Use this file to discover all available pages before exploring further.
Customization overview
You can customize Theme Raed at multiple levels:- Styles: Modify colors, fonts, spacing using Tailwind CSS and SCSS
- Templates: Edit Twig templates for layouts and pages
- Components: Customize or create new theme components
- JavaScript: Add custom functionality and interactions
- Settings: Configure theme options via twilight.json
Styling customization
Tailwind CSS configuration
The primary way to customize styles is throughtailwind.config.js:
Custom colors
Add your brand colors to the theme configuration:Custom fonts
The theme uses CSS variables for font management:fonts feature in twilight.json.
Custom spacing
Extend Tailwind’s spacing scale:Box shadows
Custom shadow utilities are defined in the theme:SCSS customization
For advanced styling, edit SCSS files insrc/assets/styles/:
When using custom SCSS, ensure you rebuild your assets with
pnpm watch or pnpm production.Template customization
Page templates
Page templates are located insrc/views/pages/. Common pages to customize:
index.twig- Homepagepages/product/single.twig- Product detail pagepages/cart.twig- Shopping cartpages/thank-you.twig- Order confirmationpages/blog/index.twig- Blog listing
Layout customization
The master layout is insrc/views/layouts/master.twig. This controls:
- HTML structure
- Header and footer inclusion
- Meta tags and SEO
- Global scripts and styles
Component templates
Components are insrc/views/components/. Customize existing components:
header/- Header and navigation componentsfooter/- Footer componentshome/- Homepage componentsproduct/- Product-related components
Creating custom components
To create a new component:Create component file
Create a new Twig file in
src/views/components/:src/views/components/my-component.twig
JavaScript customization
Entry points
JavaScript is organized by page and component:src/assets/js/app.js- Main application logicsrc/assets/js/home.js- Homepage functionalitysrc/assets/js/product.js- Product page featuressrc/assets/js/partials/- Reusable component scripts
Adding custom JavaScript
Create a new JavaScript file:src/assets/js/custom-feature.js
webpack.config.js
Using Salla JavaScript SDK
The theme includes access to Salla’s JavaScript SDK for e-commerce functionality:Theme settings
twilight.json settings
Thesettings array in twilight.json defines options exposed in the Partners Portal:
Available setting types
- boolean: Toggle switches
- string: Text inputs, textareas
- items: Dropdown lists
- number: Numeric inputs
- collection: Repeatable field groups
- static: Informational content
Accessing settings in templates
Settings are available in Twig templates:Theme features
Enabled features
Thefeatures array in twilight.json enables specific functionality:
Feature components
Pre-defined features include:- mega-menu: Enhanced navigation menus
- fonts: Custom font selection
- color: Color scheme customization
- breadcrumb: Breadcrumb navigation
- component-featured-products: Featured product displays
- component-testimonials: Customer testimonials
- component-youtube: YouTube video embeds
Custom components
Example: Enhanced slider
Theme Raed includes custom components like the enhanced slider:twilight.json
Example: Brands component
Display brand logos:twilight.json
Localization
Translation files
Translations are stored insrc/locales/:
ar.json- Arabic translationsen.json- English translations
src/locales/en.json
Using translations in templates
Best practices
Use Tailwind utilities first
Prefer Tailwind CSS utilities over custom CSS for consistency and maintainability.
Test in preview mode
Always test customizations using
salla theme preview before building for production.Next steps
Preview mode
Test your customizations in real-time
Build process
Build optimized assets for production