Saleor Attributes
Before writing code
Fetch live docs:
- Fetch
https://docs.saleor.io/docs/developer/products for product and attribute overview
- Web-search
site:docs.saleor.io attribute types DROPDOWN MULTISELECT NUMERIC for attribute type reference
- Web-search
site:docs.saleor.io product type attributes variant selection for product type configuration
- Web-search
site:docs.saleor.io attribute filtering products for attribute-based filtering
- Web-search
site:docs.saleor.io page types attributes for content page attributes
Attribute System Overview
Saleor uses a typed attribute system to define flexible product schemas without database migrations. Attributes are attached to product types and page types, providing structured metadata for products, variants, and content pages.
| Concept |
Purpose |
| Attribute |
A named, typed field (e.g., "Color", "Size", "Material") |
| Attribute value |
A specific value for an attribute (e.g., "Red", "XL", "Cotton") |
| Product type |
A template that defines which attributes a product has |
| Page type |
A template that defines which attributes a content page has |
| Variant selection attribute |
An attribute used to distinguish product variants |
Attribute Types
| Type |
Input |
Storage |
Use Case |
DROPDOWN |
Single select from predefined values |
String reference |
Color, brand, material |
MULTISELECT |
Multiple select from predefined values |
String references |
Features, tags, certifications |
RICH_TEXT |
Rich text editor (JSON) |
JSON (EditorJS) |
Long descriptions, care instructions |
PLAIN_TEXT |
Simple text input |
String |
Short notes, SKU prefix |
NUMERIC |
Number input with optional unit |
Decimal |
Weight, dimensions, capacity |
BOOLEAN |
True/false toggle |
Boolean |
Is organic, is fragile |
DATE |
Date picker |
Date |
Expiry date, release date |
DATE_TIME |
Date and time picker |
DateTime |
Event time, availability window |
FILE |
File upload |
File reference |
Spec sheets, certificates |
REFERENCE |
Reference to another entity |
Entity ID |
Related product, linked page |
SWATCH |
Color swatch (hex or image) |
String + optional image |
Visual color selection |
Product Types
A product type defines the schema for a group of products:
| Product Type Field |
Purpose |
name |
Product type name (e.g., "T-Shirt", "Laptop") |
productAttributes |
Attributes shown on the product level |
variantAttributes |
Attributes that define variant differences |
isShippingRequired |
Whether products of this type need shipping |
isDigital |
Whether products are digital downloads |
taxClass |
Tax classification for products of this type |
weight |
Default weight for products of this type |
Product Attributes vs Variant Selection Attributes
| Category |
Scope |
Example |
| Product attributes |
Same for all variants of a product |
Brand, material, care instructions |
| Variant attributes (non-selection) |
Per variant, but not for customer selection |
Internal SKU code |
| Variant selection attributes |
Per variant, presented to the customer for selection |
Size, color |
Variant selection attributes generate the variant picker on the storefront (e.g., size/color dropdowns).
Attribute Values
| Value Aspect |
Detail |
| Predefined |
Created in advance for DROPDOWN, MULTISELECT, SWATCH types |
| Dynamic |
Entered per product for PLAIN_TEXT, RICH_TEXT, NUMERIC, DATE types |
| Sortable |
Values can be reordered within an attribute |
| Translatable |
Values support multi-language translations |
| Slug |
URL-safe identifier auto-generated from the value name |
Rich Text Values
Rich text attributes use the EditorJS JSON format:
| Block Type |
Purpose |
paragraph |
Text paragraph |
header |
Heading (h1-h6) |
list |
Ordered or unordered list |
image |
Embedded image |
Page Types
Page types work like product types but for content pages (CMS):
| Page Type Field |
Purpose |
name |
Page type name (e.g., "Blog Post", "FAQ") |
attributes |
Attributes attached to pages of this type |
Content pages use the same attribute types as products, enabling structured content management without a separate CMS.
Attribute Input Types
The inputType field controls how an attribute is presented in the Dashboard:
| Input Type |
Attribute Types |
Dashboard UI |
DROPDOWN |
DROPDOWN |
Single-select dropdown |
MULTISELECT |
MULTISELECT |
Multi-select chips |
PLAIN_TEXT |
PLAIN_TEXT |
Simple text field |
RICH_TEXT |
RICH_TEXT |
EditorJS rich text editor |
NUMERIC |
NUMERIC |
Number input with unit selector |
BOOLEAN |
BOOLEAN |
Toggle switch |
DATE |
DATE |
Date picker |
DATE_TIME |
DATE_TIME |
Date and time picker |
FILE |
FILE |
File upload widget |
REFERENCE |
REFERENCE |
Entity search and select |
SWATCH |
SWATCH |
Color picker or image upload |
Filtering Products by Attributes
Attributes enable faceted navigation on the storefront:
| Filter Parameter |
Type |
Purpose |
attributes |
list |
Filter by attribute slug and values |
attributes.slug |
string |
Attribute identifier |
attributes.values |
string[] |
Attribute value slugs to match |
attributes.valuesRange |
object |
Numeric range filter (min/max) |
attributes.date |
object |
Date range filter |
attributes.dateTime |
object |
DateTime range filter |
attributes.boolean |
boolean |
Boolean attribute filter |
Faceted Navigation Pattern
| Step |
Action |
| 1 |
Query available attributes for the product type or category |
| 2 |
Display attribute values as filter options (checkboxes, sliders) |
| 3 |
Build attributes filter from user selections |
| 4 |
Pass filter to products query |
| 5 |
Update available filter values based on current selection (count-aware) |
Creating Attributes via GraphQL
| Mutation |
Purpose |
attributeCreate |
Create a new attribute with type and values |
attributeUpdate |
Modify attribute settings |
attributeDelete |
Remove an attribute |
attributeValueCreate |
Add a new value to an attribute |
attributeValueUpdate |
Modify an attribute value |
attributeValueDelete |
Remove an attribute value |
attributeReorderValues |
Change the sort order of values |
productTypeCreate |
Create a product type with attribute assignments |
productTypeUpdate |
Modify product type attribute assignments |
Attribute Creation Fields
| Input Field |
Required |
Purpose |
name |
Yes |
Display name |
slug |
No |
Auto-generated from name if omitted |
type |
Yes |
PRODUCT_TYPE or PAGE_TYPE |
inputType |
Yes |
One of the attribute input types |
values |
No |
Initial predefined values (for DROPDOWN, MULTISELECT) |
valueRequired |
No |
Whether the attribute must have a value |
isVariantOnly |
No |
Restrict to variant-level only |
visibleInStorefront |
No |
Whether the attribute is public |
filterableInStorefront |
No |
Whether the attribute appears in storefront filters |
filterableInDashboard |
No |
Whether the attribute appears in Dashboard filters |
availableInGrid |
No |
Whether the attribute appears in Dashboard product grid |
unit |
No |
Measurement unit for NUMERIC type |
Best Practices
- Use DROPDOWN for attributes with a fixed set of values (colors, sizes, brands)
- Use variant selection attributes only for attributes that the customer chooses (size, color)
- Keep product attributes for shared information that does not vary per variant (brand, material)
- Enable
filterableInStorefront only for attributes that make sense as customer-facing filters
- Use NUMERIC type with units for measurable properties (weight, length) to enable range filtering
- Create separate product types for structurally different products (clothing vs electronics)
- Use page types to model structured content (blog posts, FAQs) without a separate CMS
- Translate attribute names and values for multi-language storefronts
Fetch the Saleor attributes documentation for exact attribute type behaviors, product type configuration patterns, and filtering query syntax before implementing.
1---2name: saleor-attributes3description: Work with Saleor's typed attribute system — attribute types, product types, page types, variant selection attributes, and attribute-based filtering. Use when defining product schemas.4---56# Saleor Attributes78## Before writing code910**Fetch live docs**:111. Fetch `https://docs.saleor.io/docs/developer/products` for product and attribute overview122. Web-search `site:docs.saleor.io attribute types DROPDOWN MULTISELECT NUMERIC` for attribute type reference133. Web-search `site:docs.saleor.io product type attributes variant selection` for product type configuration144. Web-search `site:docs.saleor.io attribute filtering products` for attribute-based filtering155. Web-search `site:docs.saleor.io page types attributes` for content page attributes1617## Attribute System Overview1819Saleor uses a typed attribute system to define flexible product schemas without database migrations. Attributes are attached to product types and page types, providing structured metadata for products, variants, and content pages.2021| Concept | Purpose |22|---------|---------|23| Attribute | A named, typed field (e.g., "Color", "Size", "Material") |24| Attribute value | A specific value for an attribute (e.g., "Red", "XL", "Cotton") |25| Product type | A template that defines which attributes a product has |26| Page type | A template that defines which attributes a content page has |27| Variant selection attribute | An attribute used to distinguish product variants |2829## Attribute Types3031| Type | Input | Storage | Use Case |32|------|-------|---------|----------|33| `DROPDOWN` | Single select from predefined values | String reference | Color, brand, material |34| `MULTISELECT` | Multiple select from predefined values | String references | Features, tags, certifications |35| `RICH_TEXT` | Rich text editor (JSON) | JSON (EditorJS) | Long descriptions, care instructions |36| `PLAIN_TEXT` | Simple text input | String | Short notes, SKU prefix |37| `NUMERIC` | Number input with optional unit | Decimal | Weight, dimensions, capacity |38| `BOOLEAN` | True/false toggle | Boolean | Is organic, is fragile |39| `DATE` | Date picker | Date | Expiry date, release date |40| `DATE_TIME` | Date and time picker | DateTime | Event time, availability window |41| `FILE` | File upload | File reference | Spec sheets, certificates |42| `REFERENCE` | Reference to another entity | Entity ID | Related product, linked page |43| `SWATCH` | Color swatch (hex or image) | String + optional image | Visual color selection |4445## Product Types4647A product type defines the schema for a group of products:4849| Product Type Field | Purpose |50|-------------------|---------|51| `name` | Product type name (e.g., "T-Shirt", "Laptop") |52| `productAttributes` | Attributes shown on the product level |53| `variantAttributes` | Attributes that define variant differences |54| `isShippingRequired` | Whether products of this type need shipping |55| `isDigital` | Whether products are digital downloads |56| `taxClass` | Tax classification for products of this type |57| `weight` | Default weight for products of this type |5859### Product Attributes vs Variant Selection Attributes6061| Category | Scope | Example |62|----------|-------|---------|63| Product attributes | Same for all variants of a product | Brand, material, care instructions |64| Variant attributes (non-selection) | Per variant, but not for customer selection | Internal SKU code |65| Variant selection attributes | Per variant, presented to the customer for selection | Size, color |6667Variant selection attributes generate the variant picker on the storefront (e.g., size/color dropdowns).6869## Attribute Values7071| Value Aspect | Detail |72|-------------|--------|73| Predefined | Created in advance for DROPDOWN, MULTISELECT, SWATCH types |74| Dynamic | Entered per product for PLAIN_TEXT, RICH_TEXT, NUMERIC, DATE types |75| Sortable | Values can be reordered within an attribute |76| Translatable | Values support multi-language translations |77| Slug | URL-safe identifier auto-generated from the value name |7879### Rich Text Values8081Rich text attributes use the EditorJS JSON format:8283| Block Type | Purpose |84|-----------|---------|85| `paragraph` | Text paragraph |86| `header` | Heading (h1-h6) |87| `list` | Ordered or unordered list |88| `image` | Embedded image |8990## Page Types9192Page types work like product types but for content pages (CMS):9394| Page Type Field | Purpose |95|----------------|---------|96| `name` | Page type name (e.g., "Blog Post", "FAQ") |97| `attributes` | Attributes attached to pages of this type |9899Content pages use the same attribute types as products, enabling structured content management without a separate CMS.100101## Attribute Input Types102103The `inputType` field controls how an attribute is presented in the Dashboard:104105| Input Type | Attribute Types | Dashboard UI |106|-----------|----------------|-------------|107| `DROPDOWN` | DROPDOWN | Single-select dropdown |108| `MULTISELECT` | MULTISELECT | Multi-select chips |109| `PLAIN_TEXT` | PLAIN_TEXT | Simple text field |110| `RICH_TEXT` | RICH_TEXT | EditorJS rich text editor |111| `NUMERIC` | NUMERIC | Number input with unit selector |112| `BOOLEAN` | BOOLEAN | Toggle switch |113| `DATE` | DATE | Date picker |114| `DATE_TIME` | DATE_TIME | Date and time picker |115| `FILE` | FILE | File upload widget |116| `REFERENCE` | REFERENCE | Entity search and select |117| `SWATCH` | SWATCH | Color picker or image upload |118119## Filtering Products by Attributes120121Attributes enable faceted navigation on the storefront:122123| Filter Parameter | Type | Purpose |124|-----------------|------|---------|125| `attributes` | list | Filter by attribute slug and values |126| `attributes.slug` | string | Attribute identifier |127| `attributes.values` | string[] | Attribute value slugs to match |128| `attributes.valuesRange` | object | Numeric range filter (min/max) |129| `attributes.date` | object | Date range filter |130| `attributes.dateTime` | object | DateTime range filter |131| `attributes.boolean` | boolean | Boolean attribute filter |132133### Faceted Navigation Pattern134135| Step | Action |136|------|--------|137| 1 | Query available attributes for the product type or category |138| 2 | Display attribute values as filter options (checkboxes, sliders) |139| 3 | Build `attributes` filter from user selections |140| 4 | Pass filter to `products` query |141| 5 | Update available filter values based on current selection (count-aware) |142143## Creating Attributes via GraphQL144145| Mutation | Purpose |146|----------|---------|147| `attributeCreate` | Create a new attribute with type and values |148| `attributeUpdate` | Modify attribute settings |149| `attributeDelete` | Remove an attribute |150| `attributeValueCreate` | Add a new value to an attribute |151| `attributeValueUpdate` | Modify an attribute value |152| `attributeValueDelete` | Remove an attribute value |153| `attributeReorderValues` | Change the sort order of values |154| `productTypeCreate` | Create a product type with attribute assignments |155| `productTypeUpdate` | Modify product type attribute assignments |156157### Attribute Creation Fields158159| Input Field | Required | Purpose |160|-------------|----------|---------|161| `name` | Yes | Display name |162| `slug` | No | Auto-generated from name if omitted |163| `type` | Yes | `PRODUCT_TYPE` or `PAGE_TYPE` |164| `inputType` | Yes | One of the attribute input types |165| `values` | No | Initial predefined values (for DROPDOWN, MULTISELECT) |166| `valueRequired` | No | Whether the attribute must have a value |167| `isVariantOnly` | No | Restrict to variant-level only |168| `visibleInStorefront` | No | Whether the attribute is public |169| `filterableInStorefront` | No | Whether the attribute appears in storefront filters |170| `filterableInDashboard` | No | Whether the attribute appears in Dashboard filters |171| `availableInGrid` | No | Whether the attribute appears in Dashboard product grid |172| `unit` | No | Measurement unit for NUMERIC type |173174## Best Practices175176- Use DROPDOWN for attributes with a fixed set of values (colors, sizes, brands)177- Use variant selection attributes only for attributes that the customer chooses (size, color)178- Keep product attributes for shared information that does not vary per variant (brand, material)179- Enable `filterableInStorefront` only for attributes that make sense as customer-facing filters180- Use NUMERIC type with units for measurable properties (weight, length) to enable range filtering181- Create separate product types for structurally different products (clothing vs electronics)182- Use page types to model structured content (blog posts, FAQs) without a separate CMS183- Translate attribute names and values for multi-language storefronts184185Fetch the Saleor attributes documentation for exact attribute type behaviors, product type configuration patterns, and filtering query syntax before implementing.