You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add slider, lightbox, inverse references, and design sidebar updates for 0.4.0
New pages for the Slider element (Swiper-powered carousels with
autoplay, loop, effects, pagination) and Lightbox element (fullscreen
image galleries with thumbnails, grouped galleries, zoom). Document
inverse references for collection lists, update design controls with
visual box-model editor, image text backgrounds, addable effects
(dividers, aspect ratio, blur, shadow), and list all element types
in the layers page.
Made-with: Cursor
Copy file name to clipboardExpand all lines: content/cms/collections.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,14 @@ You add custom fields to define the structure of your content. Field types are g
65
65
|**reference**| Link to a single item in another collection |
66
66
|**multi_reference**| Link to multiple items in another collection |
67
67
68
+
#### Inverse References
69
+
70
+
Inverse references let you display related items from the opposite direction of an existing reference field. Instead of following a reference forward (e.g., a Book's author field pointing to an Author), inverse references look backward to find all items whose reference field points to the current item (e.g., showing all Books that reference the current Author).
71
+
72
+
You do not create a separate field for inverse references. They are configured as a data source on collection list layers. When a collection has reference fields pointing to another collection, those relationships automatically appear as inverse reference options in the source dropdown.
73
+
74
+
See [Dynamic Pages](/docs/cms/dynamic-pages#inverse-references) for how to use inverse references in collection lists.
Copy file name to clipboardExpand all lines: content/cms/dynamic-pages.mdx
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,20 @@ For large collections, enable pagination to split items across pages:
65
65
66
66
Set the items per page count to control batch size. Pagination respects filters — only matching items are counted.
67
67
68
+
### Inverse References
69
+
70
+
Inverse references let you show related items from the opposite direction of a reference field. For example, if a "Books" collection has an `author` reference field pointing to "Authors", you can place a collection list on an Author's dynamic page that automatically shows all books by that author.
71
+
72
+
To set up an inverse reference:
73
+
74
+
1. Add a **Collection** element inside a dynamic page or within another collection list
75
+
2. In the **Source** dropdown, look for options labeled with the pattern: `Collection Name (via field name)`
76
+
3. Select the inverse reference source
77
+
78
+
Ycode automatically discovers these relationships based on existing reference and multi-reference fields in your collections. You do not need to create any additional fields.
79
+
80
+
Inverse references work with both single reference and multi-reference fields. They also support nesting — a collection list using an inverse reference can itself contain nested collection lists.
81
+
68
82
<Callouttype="info"title="Tip">
69
-
Combine collection lists with filters, sorting, and pagination to build complete listing pages like blogs, product catalogs, team directories, and event calendars.
83
+
Combine collection lists with filters, sorting, pagination, and inverse references to build complete listing pages like blogs, product catalogs, team directories, and event calendars.
-**textDecoration** — Add via the "+" menu: underline with configurable color, thickness, and offset
35
+
36
+
For text layers, the color picker includes an **Image** tab where you can set a background image that clips to the text shape. Choose an image from the file manager, enter a custom URL, or bind to a CMS field. Configure size, position, and repeat settings for the image.
35
37
36
38
## Spacing
37
39
38
-
Set margin and padding:
40
+
Set margin and padding using the visual box-model editor. The diagram shows margin (outer ring) and padding (inner ring), with inline inputs for each side.
39
41
40
42
-**margin** — All sides or individual top, right, bottom, left
41
43
-**padding** — All sides or individual sides
44
+
-**Shift + drag** — Update all sides at once
45
+
-**Alt + drag** — Update opposite sides together (top/bottom or left/right)
-**borderRadius** — Corner radius (all or per corner)
64
-
-**divideX** / **divideY** — Dividers between children with border styling
68
+
69
+
**Dividers** — Add via the "+" menu in the Borders section. Dividers create lines between child elements. Configure direction (vertical or horizontal), style (solid, dashed, dotted, double), and color. Remove dividers with the X button.
65
70
66
71
## Backgrounds
67
72
@@ -75,12 +80,12 @@ Set element backgrounds:
75
80
76
81
## Effects
77
82
78
-
Apply visual effects:
83
+
Effects are addable and removable. Use the "+" menu in the Effects section header to add individual effects, and the X button to remove them.
79
84
80
85
-**opacity** — 0 to 1
81
-
-**boxShadow** — Single or multiple shadows
82
-
-**blur** — Blur filter
83
-
-**backdropBlur** — Blur behind the element
86
+
-**boxShadow** — Add via "+" menu; configure shadow offset, blur, spread, and color
87
+
-**blur** — Add via "+" menu; blur filter on the element
88
+
-**backdropBlur** — Add via "+" menu; blur behind the element
Copy file name to clipboardExpand all lines: content/editor/layers.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,15 @@ The layers tree mirrors the DOM structure of your page. Parent elements contain
14
14
15
15
Add elements from the **Element Library**. Open the library from the toolbar or via the Layers panel, then drag an element onto the canvas or into the tree. The element is inserted at the drop position.
16
16
17
+
The Element Library organizes elements into categories:
The lightbox element opens images in a fullscreen gallery overlay. Visitors click a trigger (typically an image or thumbnail) and view images in an immersive, navigable gallery powered by [Swiper](https://swiperjs.com).
10
+
11
+
## Adding a Lightbox
12
+
13
+
1. Open the **Element Library** in the editor
14
+
2. Under **Utilities**, drag the **Lightbox** element onto the canvas
15
+
3. The lightbox is created with a default image as the trigger
16
+
17
+
The visible element on the page acts as the click trigger. When clicked, it opens the fullscreen gallery with the configured images.
18
+
19
+
## Image Sources
20
+
21
+
You can populate the lightbox gallery from two sources:
22
+
23
+
### File Manager
24
+
25
+
Select images from your project's asset library. Add, remove, and reorder images using the file manager in the lightbox settings. This is ideal for static galleries, portfolios, and image showcases.
26
+
27
+
### CMS Field
28
+
29
+
Bind the lightbox to a CMS image field (including multi-image fields). The gallery dynamically populates with images from the current collection item. This is useful for product galleries, property listings, and other data-driven image sets.
30
+
31
+
## Lightbox Settings
32
+
33
+
Select the lightbox element and open the **Settings** tab:
34
+
35
+
### Display
36
+
37
+
| Setting | Description |
38
+
|---------|-------------|
39
+
|**Overlay**| Light or Dark background for the fullscreen modal |
40
+
|**Show thumbnails**| Display a thumbnail strip below the main image for quick navigation |
|**Show pagination**| Display a fraction indicator (e.g. 1/5) |
43
+
44
+
### Animation
45
+
46
+
| Setting | Description |
47
+
|---------|-------------|
48
+
|**Effect**| Transition between images: Slide, Fade, Cube, Flip, Coverflow, or Cards |
49
+
|**Easing**| Animation curve: Linear, Ease in, Ease in out, or Ease out |
50
+
|**Duration**| Transition speed in seconds |
51
+
52
+
### Interaction
53
+
54
+
| Setting | Description |
55
+
|---------|-------------|
56
+
|**Pinch to zoom**| Allow pinch-to-zoom on touch devices |
57
+
|**Double-tap zoom**| Zoom in/out by double-tapping or double-clicking (up to 3x) |
58
+
|**Mousewheel**| Navigate between images with the scroll wheel |
59
+
60
+
## Grouped Galleries
61
+
62
+
You can link multiple lightbox elements into a single shared gallery by setting the same **Group ID** on each lightbox. When a visitor clicks any lightbox in the group, all images from every lightbox in that group are merged into one gallery.
63
+
64
+
This is useful for:
65
+
66
+
- Grid layouts where each cell is a separate lightbox but all images should be browsable together
67
+
- Product pages with multiple image sections that should form one continuous gallery
68
+
69
+
<Callouttype="info"title="Tip">
70
+
Combine grouped lightboxes with CMS collection lists to create dynamic image galleries. Each collection item's lightbox contributes its images to a shared browsable gallery.
71
+
</Callout>
72
+
73
+
## Keyboard Navigation
74
+
75
+
The lightbox gallery supports keyboard navigation:
The slider element creates carousels and slideshows powered by [Swiper](https://swiperjs.com). You can build image carousels, hero sliders, testimonial rotators, and other sliding content.
10
+
11
+
## Adding a Slider
12
+
13
+
1. Open the **Element Library** in the editor
14
+
2. Under **Utilities**, drag the **Slider** element onto the canvas
15
+
3. The slider is created with default slides, navigation arrows, and pagination
16
+
17
+
## Structure
18
+
19
+
A slider has a fixed internal structure:
20
+
21
+
-**Slider** — The outer container
22
+
-**Slides** — The wrapper that holds all slides
23
+
-**Slide** — Individual slide (add as many as you need)
-**Pagination** — Bullet or fraction indicators (optional)
26
+
27
+
You design each slide's content by adding elements inside it (text, images, buttons, etc.). The slide content repeats the same layout structure but you can customize each slide individually.
28
+
29
+
## Slider Settings
30
+
31
+
Select the slider element and open the **Settings** tab in the right panel to configure behavior:
0 commit comments