Forms and input

Exhibit Entry Budget Configuration Sheet

Complete the budget setup table in an event check-in scenario: include real content, interactive controls, clear state feedback, and responsive layouts across sizes.

Forms and inputBudget allocation sheetHTMLCSSJavaScript
With JavaScript enabled, you can edit, run, and save this example. The fixed source is as follows:
<!doctype html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Exhibit Entry Budget Configuration Sheet</title>
  <style>
    :root { --ink:#ecf7f3; --paper:#071310; --accent:#af4f45; --secondary:#9eb49f; --line:color-mix(in srgb, var(--ink) 18%, transparent); --shadow:0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); color-scheme:light; }
    * { box-sizing:border-box; }
    html { min-width:320px; background:var(--paper); }
    body { min-height:100vh; margin:0; overflow-x:hidden; color:var(--ink); font-family:ui-monospace,"SFMono-Regular",Consolas,monospace; background:linear-gradient(color-mix(in srgb,var(--secondary) 5%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--secondary) 5%,transparent) 1px,transparent 1px),var(--paper);background-size:24px 24px; }
    button,input,select,textarea { color:inherit; font:inherit; }
    button,[role="button"],input,select,textarea { accent-color:var(--accent); }
    button { cursor:pointer; }
    button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
    [hidden] { display:none !important; }
    @media (max-width:700px) { .mast h1 { line-height:1.08 !important; letter-spacing:-.035em !important; overflow-wrap:anywhere; } }
    @media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
    .page{width:min(1080px,calc(100% - 30px));margin:auto;padding:48px 0}.eyebrow{color:var(--secondary);font:700 12px/1.3 ui-monospace,monospace}.eyebrow::before{content:"> ";color:var(--accent)}.mast{display:grid;grid-template-columns:1fr auto;border:1px solid var(--secondary);padding:18px;gap:24px;align-items:center;margin-bottom:16px}.mast h1{font-family:ui-monospace,"SFMono-Regular",monospace;font-weight:700;font-size:clamp(34px,7vw,72px);letter-spacing:-.055em;margin:12px 0;line-height:1.05}.intro{margin:0;color:color-mix(in srgb,var(--ink) 72%,transparent);font:400 14px/1.7 ui-monospace,monospace}.scenario{padding:7px 10px;border:1px dashed var(--secondary);font:700 11px/1 ui-monospace,monospace}.demo{border-color:var(--secondary);border-radius:8px;box-shadow:0 0 50px color-mix(in srgb,var(--secondary) 15%,transparent);position:relative;min-height:390px;padding:26px;background:color-mix(in srgb,var(--paper) 94%,#000)}@media(max-width:700px){.page{width:calc(100% - 18px);padding:20px 0}.mast{grid-template-columns:1fr}.demo{padding:14px}}
    .panel{padding:30px;border:0;border-radius:42px 12px;background:color-mix(in srgb,var(--secondary) 18%,var(--paper))}.row{display:flex;flex-wrap:wrap;gap:14px;align-items:center}.stack{display:flex;flex-direction:column;gap:20px}.action{min-height:48px;padding:12px 22px;border:0;border-radius:50% 50% 18px 18px;background:color-mix(in srgb,var(--secondary) 42%,transparent);font-weight:800}.action.primary,.action.is-active{color:var(--paper);background:var(--accent)}.muted{color:color-mix(in srgb,var(--ink) 64%,transparent);line-height:1.7}.status{min-height:25px;margin-top:16px;color:var(--accent)}.metric{font-size:clamp(32px,7vw,66px);font-weight:800}.meter{height:11px;border-radius:50%;background:color-mix(in srgb,var(--ink) 10%,transparent)}.meter>i{display:block;height:100%;border-radius:inherit;background:var(--accent)}.chip{padding:8px 12px;border-radius:50%;background:var(--paper)}
    .composition-gallery{margin:0;padding:clamp(8px,2vw,18px);border:1px solid var(--ink);background:color-mix(in srgb,var(--paper) 78%,transparent)}.gallery-caption{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:15px 4px 2px;font-size:12px}.gallery-caption::before,.gallery-caption::after{content:"";height:1px;background:var(--line)}.gallery-caption strong{font:800 11px/1.2 ui-monospace,monospace;letter-spacing:.16em;text-transform:uppercase}.composition-gallery .demo{box-shadow:none}.composition-gallery .demo::before{content:"";position:absolute;inset:10px;border:1px dashed color-mix(in srgb,var(--accent) 36%,transparent);pointer-events:none}
    .budget-studio{display:grid;gap:16px;max-width:940px;margin:auto}.budget-studio header{display:flex;justify-content:space-between;gap:18px;align-items:end}.budget-studio h2{margin:.3em 0}.budget-studio header label{display:grid;gap:8px;font-weight:800}.budget-studio header select{min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}.budget-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.budget-grid article{display:grid;gap:10px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.budget-grid strong{font-size:clamp(32px,6vw,52px)}.budget-inline-field{display:grid;gap:6px;font-weight:800}.budget-inline-field input{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}.budget-grid input[type="range"]{width:100%}.budget-ledger{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px;border-radius:22px;color:var(--paper);background:var(--ink)}.budget-ledger dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-column:1/-1;gap:12px;margin:0}.budget-ledger dl div{display:grid;gap:6px;padding:12px;border:1px solid #ffffff24;border-radius:14px}.budget-ledger dd{margin:0;font-size:28px;font-weight:900}.budget-ledger ol{grid-column:1/-1;display:grid;gap:8px;padding-left:18px;margin:0}@media(max-width:760px){.budget-studio header{align-items:stretch;flex-direction:column}.budget-grid,.budget-ledger dl{grid-template-columns:1fr}.budget-ledger{grid-template-columns:1fr}}.workflow-spatial{display:grid;gap:16px}.workflow-spatial>header{display:grid;grid-template-columns:1fr minmax(170px,.35fr) minmax(170px,.35fr);gap:18px;align-items:end;padding-bottom:16px;border-bottom:5px solid var(--ink)}.workflow-spatial h2{margin:.2em 0}.workflow-spatial header label{display:grid;grid-template-columns:1fr auto;gap:7px}.workflow-spatial header input{grid-column:1/-1;width:100%}.spatial-grid{display:grid;grid-template-columns:minmax(0,var(--spatial-width)) 20px minmax(180px,1fr);gap:0;align-items:stretch}.spatial-core{min-width:0;transform:scale(var(--spatial-zoom));transform-origin:top left;transition:transform .2s}.spatial-handle{display:grid;min-height:300px;place-items:center;border:0;border-inline:1px dashed var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent);cursor:col-resize}.spatial-grid>aside{display:grid;align-content:center;gap:14px;padding:22px;background:color-mix(in srgb,var(--secondary) 14%,var(--paper))}.spatial-grid>aside strong{font-size:clamp(24px,4vw,42px)}@media(max-width:900px){.workflow-spatial>header{grid-template-columns:1fr}.spatial-grid{order:-1;grid-template-columns:1fr}.spatial-handle{min-height:44px;cursor:row-resize}.spatial-core{transform:none}}
  </style>
</head>
<body data-aesthetic="terminal" data-composition="gallery-frame">
  <main class="page">
    <header class="mast"><div><span class="eyebrow">terminal / budget configuration sheet / INTERMEDIATE</span><h1>Exhibit Entry Budget Configuration Sheet</h1><p class="intro">Complete the budget setup table in an event check-in scenario: include real content, interactive controls, clear state feedback, and responsive layouts across sizes.</p></div><span class="scenario">Exhibit Entry Form</span></header>
    <figure class="composition-gallery"><section class="demo" aria-label="Exhibit Entry Budget Configuration Table Interaction Area"><div id="workflowSpatial" class="workflow-spatial" style="--spatial-width:64%;--spatial-zoom:1"><header><div><span class="eyebrow">Exhibit admission form SPATIAL CANVAS</span><h2>Exhibition Entry Form Adjustment Desk</h2></div><label>Processing time share<input id="workflowSpatialWidth" type="range" min="38" max="82" value="64"><output id="workflowSpatialWidthValue">64%</output></label><label>Content Scaling<input id="workflowSpatialZoom" type="range" min="80" max="120" value="100"><output id="workflowSpatialZoomValue">100%</output></label></header><div class="spatial-grid"><section id="workflowCore" class="workflow-core spatial-core"><!-- 11DZ_CORE_START:forms-input-budget-builder --><section class="budget-studio"><header><div><span class="eyebrow">BUDGET BUILDER</span><h2>Exhibit Entry Budget Pool</h2><p>Turn the budget into drag-and-drop quotas, then sync them to the key summary on the right.</p></div><label>Budget tier <select id="budgetPreset"><option value="520">Compact · ¥520</option><option value="760" selected>Standard · ¥760</option><option value="980">Expand · ¥980</option></select></label></header><div class="budget-grid"><article><span>Venue</span><strong id="budgetCardValue0">¥120</strong><label class="budget-inline-field"><span>Direct input</span><input data-budget-line="0" type="number" min="40" max="320" step="10" value="120" aria-label="Venue budget values" data-core-bridge="forms-input-budget-builder"></label><input data-budget-range="0" type="range" min="40" max="320" step="10" value="120" aria-label="Venue budget"><small>Priority Protection</small></article><article><span>Materials</span><strong id="budgetCardValue1">¥160</strong><label class="budget-inline-field"><span>Direct input</span><input data-budget-line="1" type="number" min="40" max="320" step="10" value="160" aria-label="Material budget value"></label><input data-budget-range="1" type="range" min="40" max="320" step="10" value="160" aria-label="Material budget"><small>Flexible adjustment possible</small></article><article><span>Transportation</span><strong id="budgetCardValue2">¥200</strong><label class="budget-inline-field"><span>Direct input</span><input data-budget-line="2" type="number" min="40" max="320" step="10" value="200" aria-label="Transportation Budget Values"></label><input data-budget-range="2" type="range" min="40" max="320" step="10" value="200" aria-label="Transportation Budget"><small>Priority Protection</small></article><article><span>Catering</span><strong id="budgetCardValue3">¥240</strong><label class="budget-inline-field"><span>Direct input</span><input data-budget-line="3" type="number" min="40" max="320" step="10" value="240" aria-label="Catering budget values"></label><input data-budget-range="3" type="range" min="40" max="320" step="10" value="240" aria-label="Catering budget"><small>Flexible adjustment possible</small></article></div><aside class="budget-ledger"><dl><div><dt>Budget cap</dt><dd id="budgetLimit">¥760</dd></div><div><dt>Current total</dt><dd id="budgetTotal">¥0</dd></div><div><dt>Remaining space</dt><dd id="budgetBalance">¥0</dd></div></dl><ol id="budgetHighlights"><li>Waiting to be reassigned</li></ol></aside></section><!-- 11DZ_CORE_END --></section><input id="workflowSpatialHandle" class="spatial-handle" type="button" value="↔" aria-label="Drag to adjust the main case preview width"><aside><strong>Basic information for exhibition access</strong><p>The additional materials for the exhibition entry form and the final confirmation for the exhibition entry form will be rearranged according to the canvas size.</p><output id="workflowSpatialStatus">Width 64%, zoom 100%</output><input id="workflowSpatialApply" class="action primary" type="button" value="Confirm Submission"></aside></div></div><p id="status" class="status" role="status" aria-live="polite"></p></section><figcaption class="gallery-caption"><strong>Exhibit Entry Form / GALLERY 03</strong></figcaption></figure>
  </main>
  <script>
    'use strict';
    const statusOutput = document.querySelector('#status');
    const announce = message => { statusOutput.textContent = message; };
    /* 11DZ_CORE_SCRIPT_START:forms-input-budget-builder */
const budgetRanges=[...document.querySelectorAll('[data-budget-range]')];const budgetNumbers=[...document.querySelectorAll('[data-budget-line]')];const budgetPreset=document.querySelector('#budgetPreset');const budgetNames=["Venue","Materials","Transportation","Catering"];function syncBudgetValue(index,next){const value=Math.min(320,Math.max(40,Math.round((Number(next)||40)/10)*10));budgetRanges[index].value=String(value);budgetNumbers[index].value=String(value);return value;}function renderBudgetStudio(){const limit=Math.max(0,Number(budgetPreset.value)||0);const entries=budgetRanges.map((input,index)=>({name:budgetNames[index],value:syncBudgetValue(index,input.value),index}));const total=entries.reduce((sum,entry)=>sum+entry.value,0);entries.forEach(entry=>{document.querySelector('#budgetCardValue'+entry.index).textContent='¥'+entry.value;});document.querySelector('#budgetLimit').textContent='¥'+limit;document.querySelector('#budgetTotal').textContent='¥'+total;const balance=limit-total;document.querySelector('#budgetBalance').textContent=(balance>=0?'Remaining ':'Over ')+'¥'+Math.abs(balance);const highlights=entries.slice().sort((left,right)=>right.value-left.value).slice(0,3);document.querySelector('#budgetHighlights').replaceChildren(...highlights.map((entry,rank)=>{const item=document.createElement('li');item.textContent='Key focus '+(rank+1)+' · '+entry.name+' · ¥'+entry.value;return item;}));announce('Total Budget '+total+' yuan');}budgetRanges.forEach((input,index)=>input.addEventListener('input',()=>{syncBudgetValue(index,input.value);renderBudgetStudio();}));budgetNumbers.forEach((input,index)=>input.addEventListener('input',()=>{syncBudgetValue(index,input.value);renderBudgetStudio();}));budgetPreset.addEventListener('change',renderBudgetStudio);renderBudgetStudio();
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"forms-input-budget-builder","selector":"[data-core-bridge=\"forms-input-budget-builder\"]","mode":"number","key":"ArrowUp"};const workflowBridgeCore=document.querySelector('#workflowCore');const workflowBridgeControl=workflowBridgeCore.querySelector(workflowBridgeSpec.selector);if(!workflowBridgeControl)throw new Error('Missing core bridge: '+workflowBridgeSpec.name);const workflowBridgeControlledId=workflowBridgeControl.getAttribute('aria-controls');const workflowBridgeControlled=workflowBridgeControlledId?document.getElementById(workflowBridgeControlledId):null;workflowBridgeCore.dataset.workflowBridge=workflowBridgeSpec.name;workflowBridgeCore.dataset.workflowVersion='0';function workflowBridgeSerialize(){const visualNode=workflowBridgeCore.firstElementChild||workflowBridgeCore;const visual=getComputedStyle(visualNode);const outputs=[...workflowBridgeCore.querySelectorAll('output,[role="status"],[aria-live],meter,progress')].map(node=>node.textContent.trim()+'|'+node.getAttribute('aria-valuenow')+'|'+node.getAttribute('value'));const canvas=[...workflowBridgeCore.querySelectorAll('canvas')].map(node=>{try{return node.toDataURL().slice(-160);}catch{return 'canvas-unavailable';}});return JSON.stringify({html:workflowBridgeCore.innerHTML,status:statusOutput.textContent,outputs,canvas,visual:[visual.display,visual.visibility,visual.opacity,visual.transform,visual.filter,visual.backgroundColor,visual.width,visual.height],scroll:workflowBridgeSpec.mode==='scroll'?workflowBridgeControl.scrollTop:null});}let workflowBridgeLastEffect=workflowBridgeSerialize();function workflowBridgeSummary(){const label=(workflowBridgeControl.getAttribute('aria-label')||workflowBridgeControl.textContent||workflowBridgeControl.value||workflowBridgeSpec.name).trim().replace(/\s+/g,' ').slice(0,72);return label+' · Core Version '+workflowBridgeCore.dataset.workflowVersion;}function workflowBridgeCommit(){const effect=workflowBridgeSerialize();if(effect===workflowBridgeLastEffect)return {changed:false,summary:workflowBridgeSummary()};workflowBridgeLastEffect=effect;workflowBridgeCore.dataset.workflowVersion=String(Number(workflowBridgeCore.dataset.workflowVersion||0)+1);return {changed:true,summary:workflowBridgeSummary()};}function workflowBridgeScheduleCommit(){queueMicrotask(workflowBridgeCommit);setTimeout(workflowBridgeCommit,0);}workflowBridgeControl.addEventListener("input",workflowBridgeScheduleCommit);workflowBridgeControl.addEventListener('change',workflowBridgeScheduleCommit);const workflowBridgeStateTargets=new Set(workflowBridgeCore.querySelectorAll('dialog'));if(workflowBridgeControlled&&workflowBridgeCore.contains(workflowBridgeControlled))workflowBridgeStateTargets.add(workflowBridgeControlled);workflowBridgeStateTargets.forEach(target=>['close','cancel','toggle'].forEach(eventName=>target.addEventListener(eventName,workflowBridgeScheduleCommit)));function workflowBridgeActivate(){workflowBridgeControl.focus();const step=Number(workflowBridgeControl.step)||1;const min=workflowBridgeControl.min===''?-Infinity:Number(workflowBridgeControl.min);const max=workflowBridgeControl.max===''?Infinity:Number(workflowBridgeControl.max);let next=Math.min(max,Math.max(min,(Number(workflowBridgeControl.value)||0)+step));if(next===Number(workflowBridgeControl.value))next=Math.max(min,Number(workflowBridgeControl.value)-step);workflowBridgeControl.value=String(next);workflowBridgeControl.dispatchEvent(new Event('input',{bubbles:true}));workflowBridgeControl.dispatchEvent(new Event('change',{bubbles:true}));const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowSpatial=document.querySelector('#workflowSpatial');const workflowSpatialCore=document.querySelector('#workflowCore');const workflowSpatialWidth=document.querySelector('#workflowSpatialWidth');const workflowSpatialZoom=document.querySelector('#workflowSpatialZoom');const workflowSpatialHandle=document.querySelector('#workflowSpatialHandle');const workflowSpatialState={width:64,zoom:1,dragging:false};function workflowSpatialDrive(){workflowSpatial.style.setProperty('--spatial-width',workflowSpatialState.width+'%');workflowSpatial.style.setProperty('--spatial-zoom',String(workflowSpatialState.zoom));workflowSpatialWidth.value=String(workflowSpatialState.width);workflowSpatialZoom.value=String(Math.round(workflowSpatialState.zoom*100));document.querySelector('#workflowSpatialWidthValue').textContent=workflowSpatialState.width+'%';document.querySelector('#workflowSpatialZoomValue').textContent=Math.round(workflowSpatialState.zoom*100)+'%';document.querySelector('#workflowSpatialStatus').textContent='width '+workflowSpatialState.width+'%, zoom '+Math.round(workflowSpatialState.zoom*100)+'%';announce('The exhibit entry form canvas has been rearranged');}workflowSpatialWidth.addEventListener('input',()=>{workflowSpatialState.width=Number(workflowSpatialWidth.value);workflowSpatialDrive();});workflowSpatialZoom.addEventListener('input',()=>{workflowSpatialState.zoom=Number(workflowSpatialZoom.value)/100;workflowSpatialDrive();});workflowSpatialHandle.addEventListener('pointerdown',event=>{workflowSpatialState.dragging=true;workflowSpatialHandle.setPointerCapture(event.pointerId);});workflowSpatialHandle.addEventListener('pointermove',event=>{if(!workflowSpatialState.dragging)return;const rect=workflowSpatial.getBoundingClientRect();workflowSpatialState.width=Math.max(38,Math.min(82,Math.round((event.clientX-rect.left)/rect.width*100)));workflowSpatialDrive();});workflowSpatialHandle.addEventListener('pointerup',event=>{workflowSpatialState.dragging=false;workflowSpatialHandle.releasePointerCapture(event.pointerId);});workflowSpatialHandle.addEventListener('wheel',event=>{event.preventDefault();workflowSpatialState.zoom=Math.max(.8,Math.min(1.2,workflowSpatialState.zoom+(event.deltaY<0?.05:-.05)));workflowSpatialDrive();},{passive:false});workflowSpatialHandle.addEventListener('keydown',event=>{if(!['ArrowLeft','ArrowRight'].includes(event.key))return;event.preventDefault();workflowSpatialState.width=Math.max(38,Math.min(82,workflowSpatialState.width+(event.key==='ArrowRight'?2:-2)));workflowSpatialDrive();});document.querySelector('#workflowSpatialApply').addEventListener('click',()=>{const bridge=workflowBridgeActivate();document.querySelector('#workflowSpatialStatus').textContent='Submission confirmed · Width '+workflowSpatialState.width+'%, zoom '+Math.round(workflowSpatialState.zoom*100)+'% · '+bridge.summary;announce(document.querySelector('#workflowSpatialStatus').textContent);});workflowSpatialDrive();
workflowBridgeReset();
  </script>
</body>
</html>
Page feedbackFound an issue or have suggestions for improvement?
Feedback features need to be used in the online version

Please enable JavaScript in the online version before submitting; local features of the current tool or example are not affected.

Go to the online version for feedback