Version:
1.0-previewDate:
2025-06-27Author:
Sciux Community <https://sciux.dev>
Sciux is a markup language for creating interactive document with XML-like syntax, which is designed to the generation of user-friendly graphs of the LLM (Large Language Model)
Sciux is a standard syntax, not a renderer, exclude any components, animations and function tools.
The most basic sciux node is the text node.
Hello world!
A element node has three elements: tag, attributes ,children.
tag
<name></name> A common tag should use <xxx> to start and </xxx> to end up.<name/> A self-closing tag should use <xxx/> to define<xxx> is not allowed.attributes
key="value" to define, and write in the start symbol: <name attr="xxx"/> ): <name attr1="xxx" attr2="xxx"/>: is a JavaScript expression: <name :attr="1 + 2"/># is a statement@ is an event with JavaScript handler: <name @click="x++"/>$ is an animationchildren
<name>children</name>A value node should start with ``
The value is a JavaScript expression, it could be string, boolean, number, object or more data type, but the JavaScript statement is not supported.
1
Statement #for can be used to iterate over a list of data.
<element #for="i in [1, 2, 3]"></element>
value structure: [name] in [value]
[name] could use in the children of the node’s everywhere supported JavaScript expression[value] should be iterable in JavaScript StandardStatement #if can be used to conditionally render a node.
<element #if="x > 10"></element>
value structure: [condition]
[condition] should be a JavaScript expression, and the result should be a boolean valueStatement #elif can be used to conditionally render a node.
<element #if="x < 10"><element/>
<element #elif="x > 10"></element>
[condition] should be a JavaScript expression, and the result should be a boolean value#elif should be used after #if or #elifStatement #else can be used to conditionally render a node.
<element #if="x < 10"><element/>
<element #else></element>
#else should be used after #if or #elifState @event can be used to define an event handler.
<element @click="clickHandler"></element>
value structure: [event]
[event] should be a JavaScript expression, and the result should be a boolean valueState $animation can be used to define an animation.
<element $=""></element>
value structure: [animation]
[name],[duration],[easing]?: A animation [name] excute complete in [duration] with [easing], the default [easing] is linear (JavaScript expression: (x) => x)[name],[duration] [name],[duration]: Mutiple animation should be separated by space ( ), this animation will be executed in orderparallel([name],[duration] [name],[duration]): Parallel animation should be contained in the parallel([aniamtions]), this animation will be executed in parallel[duration] is not supported[easing] is a one-to-result function, with a number input and a number outputkey structure: $[event]?
$ without any other text means the animation will be execute immediately$[event] means the animation will be execute when the event is triggeredA the nodes are reactive, which means it will be updated when the data is changed.
You can use a special built-in element node <let> to define reactive data:
<let :x="10" :y="20"/>
And you can use this variable in everywhere supported JavaScript expression.
<let :x="10" :y="20"/>
<element :attr1="x" :attr2="y" :attr3="x - y"></element>
This documentation is just for a preview, and the final syntax is not determined.