/* @jsxImportSource @diffusionstudio/jsx */ /* `@inspect` variables: annotate a top-level const and the editor's right * sidebar grows a control for it (stage level, under the background picker). * Moving the control moves the composition live — no remount — and the value * it settles on is written back into the initializer below. * * cp examples/09-inspect-variables.tsx ~/Projects/inspect/index.tsx * dapi open ~/Projects/inspect * * See reference/jsx/variables.md for the full annotation grammar. */ /** @inspect text path="Content/Title" */ const title = "Hello world"; /** @inspect font path="Typography/Font" */ const fontFamily = "Inter"; /** @inspect number path="Typography/Size" min=8 max=240 step=1 */ const fontSize = 120; /** @inspect color path="Typography/Color" */ const textColor = "#ffffff"; /** @inspect color */ const backdrop = "#000000"; /** @inspect number min=0 max=200 */ const padding = 64; /** @inspect boolean path="Frame/Show" */ const showFrame = true; /** @inspect select options="left,center,right" path="Typography/Align" */ const align = "center"; export default function InspectVariables() { return ( {showFrame && ( )} {title} ); }