Design kit command
inspect.code
Code for layer
Answers code for a layer in CSS, HTML, React, Vue, Tailwind, SwiftUI, Compose and more, with unit options.
- Kit
- Design 0.1.0 (.kdesign)
- Changes the document
- no
- Acts on
id(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | string | no | |
language | "css" | "html" | "react" | "leptos" | "vue" | "tailwind" | "swiftui" | "compose" | "arkui" | no | default css; html, react, leptos and vue are the whole layer tree; components take their properties as parameters, instances pass their values; a component connected to code (codeConnect.set) gives its import and snippet instead; tailwind is React with Tailwind CSS v4 utilities for pages: fluid auto layout boxes, instances inlined with their overrides, bound variables as theme utilities |
mobile | boolean | no | |
rootFontSize | number | no | |
unit | "px" | "rem" | no |
Call through design_run
text
design_run {
"path": "<file>.kdesign",
"steps": [{ "command": "inspect.code" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: id, language, mobile, rootFontSize, unit. design_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
code | string | no | |
connected | boolean | no | |
language | string | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"code": {
"type": "string"
},
"connected": {
"type": "boolean"
},
"language": {
"type": "string"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"id": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-types": [
"Node"
]
},
"language": {
"description": "default css; html, react, leptos and vue are the whole layer tree; components take their properties as parameters, instances pass their values; a component connected to code (codeConnect.set) gives its import and snippet instead; tailwind is React with Tailwind CSS v4 utilities for pages: fluid auto layout boxes, instances inlined with their overrides, bound variables as theme utilities",
"enum": [
"css",
"html",
"react",
"leptos",
"vue",
"tailwind",
"swiftui",
"compose",
"arkui"
],
"type": "string"
},
"mobile": {
"type": "boolean"
},
"rootFontSize": {
"type": "number"
},
"unit": {
"enum": [
"px",
"rem"
],
"type": "string"
}
},
"returns": "{code, language, connected}",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (design_commands through @kition/[email protected], built from KitionAI/kition-design@abc7e16). As data: commands.jsonl.