API Reference
Common Attributes
Reference for shared declarative attributes used across built-in modules.
Common Attributes
This page is for attributes that are shared by the core runtime or by multiple built-in modules.
Module-specific inputs such as string-parallax, string-radius, or string-input still belong on their own module pages.
Reading Model
The runtime reads both of these forms:
string-*data-string-*
Examples:
HTML
<section string="progress"></section>
<section data-string="progress"></section>
For token lists, the runtime uses | as the separator.
Examples:
HTML
<div string="progress|parallax"></div>
<div string-copy-from="hero|sidebar-progress"></div>
Identity And Routing
| Attribute | Target | Default | Real runtime effect |
|---|---|---|---|
string | managed element | required for element modules | Declares which element modules can connect to the element. The value is split by ` |
string-id | managed element | auto-generated string-N | Gives the object a stable runtime ID. Object-scoped events use this ID. |
string-copy-from | mirror element | none | Links the element to one or more source objects. Mirror outputs are copied from those source IDs. |
string-key | modules that expose named CSS output | global setting key, default --progress | Routes a module output into a custom CSS variable name. Most commonly used by StringProgress. |
Important behavior:
string-idis written back to the DOM when the runtime auto-generates one.string-copy-fromis also split by|, so one mirror element can follow multiple source IDs.- Mirrors are separate elements. They do not become managed source objects by themselves.
Shared Geometry
These attributes come from StringModule and affect the shared object timeline used by modules such as StringProgress and StringParallax.
| Attribute | Default | Real runtime effect |
|---|---|---|
string-offset-top | 0% | Moves the effective end of the object timeline. |
string-offset-bottom | 0% | Moves the effective start of the object timeline. |
string-inview-top | 0% | Shifts the in-view start boundary used for object:inview:<id> and -inview. |
string-inview-bottom | 0% | Shifts the in-view end boundary used for object:inview:<id> and -inview. |
string-enter-el | top | Selects the object edge used for timeline start. |
string-enter-vp | bottom | Selects the viewport edge paired with string-enter-el. |
string-exit-el | bottom | Selects the object edge used for timeline end. |
string-exit-vp | top | Selects the viewport edge paired with string-exit-el. |
These values are parsed once into numeric positions during object initialization and rebuilds. They do not directly write styles.
Shared Behavior Flags
| Attribute | Default | Real runtime effect |
|---|---|---|
string-self-disable | false | Prevents module style and variable writes on the source element. Mirrors can still receive mirrored output. |
string-repeat | false | Allows -inview class removal when the object leaves its in-view window. |
string-outside-container | false | Forces the object activation observer to use the window root instead of the current custom scroll container. |
string-fixed | not set | Marks the element as fixed for object-manager mutation handling. This is an advanced runtime flag, not a normal animation setting. |
Practical Notes
string-idmatters whenever you consumeobject:*events.string-copy-frommatters only for modules that actually mirror output.StringProgress,StringLerp,StringGlide,StringAnchor, and cursor target variables are examples.string-keydoes not invent new output by itself. It only renames module output that already exists.string-fixedis easy to overuse. Most normal module elements should not need it.
Where To Go Next
- For module-specific inputs, go to the relevant module page in Built-in Modules.
- For outputs written by those attributes, see CSS Variables.
- For ID-driven integration, see Object IDs.