Cards, Lists, and Content Organization

Reading List Story Carousel Cards

Complete a story carousel card for a reading-list scenario: includes real content, interactive controls, clear status feedback, and responsive layouts.

Cards, Lists, and Content OrganizationStory carousel cardHTMLCSSJavaScript
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>Reading List Story Carousel Cards</title>
  <style>
    :root { --ink:#18314f; --paper:#f7f8f2; --accent:#ff6b5e; --secondary:#71c9b5; --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:"Songti SC","Noto Serif SC",Georgia,serif; background:linear-gradient(90deg,transparent 49.7%,color-mix(in srgb,var(--ink) 7%,transparent) 50%,transparent 50.3%),var(--paper); }
    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(1180px,calc(100% - 40px));margin:auto;padding:7vw 0}.mast{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(180px,.4fr);gap:5vw;align-items:end;margin-bottom:38px}.mast h1{font-family:"Songti SC",Georgia,serif;font-weight:800;font-size:clamp(42px,9vw,92px);max-width:920px;margin:0;line-height:.94}.eyebrow{display:block;margin-bottom:14px;color:var(--accent);font:800 11px/1 ui-monospace,monospace;letter-spacing:.24em}.intro{max-width:58ch;line-height:1.9}.scenario{align-self:start;padding-top:10px;border-top:1px solid var(--ink);font-style:italic}.demo{border-radius:0;border-width:2px;box-shadow:14px 14px 0 color-mix(in srgb,var(--ink) 18%,transparent);position:relative;overflow:hidden;min-height:420px;padding:clamp(22px,4vw,48px);background:var(--paper)}@media(max-width:700px){.page{width:calc(100% - 22px);padding:26px 0}.mast{grid-template-columns:1fr}.demo{min-height:340px;padding:18px}}
    .panel{padding:20px;border:1px dashed var(--secondary);border-radius:8px;background:color-mix(in srgb,var(--paper) 92%,#000)}.stack{display:grid;gap:10px}.row{display:flex;flex-wrap:wrap;gap:7px}.action{min-height:40px;padding:8px 12px;border:1px solid var(--secondary);border-radius:5px;color:var(--ink);background:transparent;font:700 12px/1 ui-monospace,monospace}.action.primary,.action.is-active{color:var(--paper);background:var(--accent)}.status{min-height:22px;color:var(--secondary);font:700 12px/1.5 ui-monospace,monospace}.status::before{content:"status: "}.metric{font:800 clamp(28px,6vw,56px)/1 ui-monospace,monospace}.muted{opacity:.64;font-family:ui-monospace,monospace}.meter{height:8px;background:repeating-linear-gradient(90deg,var(--line) 0 8px,transparent 8px 10px)}.meter>i{display:block;height:100%;background:var(--secondary)}.chip{padding:4px 7px;border:1px solid var(--secondary);font:700 10px/1 ui-monospace,monospace}
    .composition-studio{display:grid;gap:14px}.studio-ruler{display:flex;justify-content:space-between;padding:0 4px;color:color-mix(in srgb,var(--ink) 55%,transparent);font:700 11px/1 ui-monospace,monospace;letter-spacing:.14em}.studio-ruler::before{content:"01 / WORKING PROTOTYPE"}.studio-ruler::after{content:"360 · 768 · 1440"}.composition-studio .demo::after{content:"";position:absolute;right:18px;bottom:18px;width:24px;height:24px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);pointer-events:none}
    .carousel-demo{display:grid;gap:14px}.carousel-viewport{overflow:hidden;border:1px solid var(--line);border-radius:26px}.carousel-viewport article{display:grid;min-height:340px;align-content:center;padding:clamp(30px,8vw,90px);background:linear-gradient(130deg,color-mix(in srgb,var(--secondary) 28%,var(--paper)),var(--paper));animation:carouselEnter .35s ease both}.carousel-viewport h2{font-size:clamp(38px,8vw,86px);line-height:.95}.carousel-controls{display:grid;grid-template-columns:auto 1fr auto auto;gap:12px;align-items:center}.carousel-controls>button{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:var(--paper)}.carousel-controls>div{display:flex;gap:7px;justify-content:center}.carousel-controls>div button{width:11px;height:11px;padding:0;border:0;border-radius:50%;background:var(--line)}.carousel-controls>div button[aria-current="true"]{width:30px;border-radius:999px;background:var(--accent)}@keyframes carouselEnter{from{opacity:0;transform:translateX(35px)}}.workflow-dispatch{display:grid;grid-template-columns:minmax(210px,.48fr) minmax(0,1.52fr);gap:18px}.dispatch-console{display:grid;align-content:start;gap:16px;padding:22px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--secondary) 12%,var(--paper))}.dispatch-console h2{margin:.2em 0}.dispatch-console form,.dispatch-console label{display:grid;gap:7px}.dispatch-console input,.dispatch-console select{min-width:0;width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}.dispatch-console fieldset{display:flex;gap:12px;border:1px solid var(--line);border-radius:10px}.dispatch-console fieldset label{display:flex;align-items:center}.dispatch-workbench{--dispatch-load:.22;min-width:0;padding:14px;border-left:8px solid color-mix(in srgb,var(--accent) calc(var(--dispatch-load)*100%),var(--line));background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 8%,transparent),transparent 28%)}.dispatch-workbench[data-dispatch-priority="urgent"]{box-shadow:inset 0 0 0 2px var(--accent)}@media(max-width:900px){.workflow-dispatch{grid-template-columns:1fr}.dispatch-console{order:2}}
  </style>
</head>
<body data-aesthetic="editorial" data-composition="studio">
  <main class="page">
    <header class="mast"><div><span class="eyebrow">editorial / story carousel cards / INTERMEDIATE</span><h1>Reading List Story Carousel Cards</h1><p class="intro">Complete a story carousel card for a reading-list scenario: includes real content, interactive controls, clear status feedback, and responsive layouts.</p></div><span class="scenario">Reading List</span></header>
    <div class="composition-studio"><div class="studio-ruler" aria-hidden="true"></div><section class="demo" aria-label="Reading List Story Carousel Card Interactive Area"><div class="workflow-dispatch"><aside class="dispatch-console"><span class="eyebrow">Reading List DISPATCH</span><h2>Reading Queue Command Center</h2><form id="workflowDispatchForm"><label>Task Type<select id="workflowDispatchKind"><option>Reading List</option><option>In-depth feature</option><option>Excerpted and organized</option></select></label><label>Number to read<input id="workflowDispatchAmount" type="number" min="1" max="9999" value="30"><span>page</span></label><fieldset><legend>Processing priority</legend><label><input type="radio" name="workflowPriority" value="normal" checked>Regular</label><label><input type="radio" name="workflowPriority" value="urgent">Urgent</label></fieldset><button class="action primary" type="submit">Arrange reading</button></form><label>Current task<select id="workflowDispatchActive" aria-label="Switch current task"><option value="1">Reading List</option><option value="2">In-depth feature</option></select></label><output id="workflowDispatchSummary">Waiting for Dispatch</output></aside><section id="workflowCore" class="workflow-core dispatch-workbench" data-dispatch-priority="normal"><!-- 11DZ_CORE_START:cards-lists-content-story-carousel --><div class="carousel-demo"><div class="carousel-viewport" aria-live="polite"><article data-carousel-slide="0"><span class="eyebrow">STORY 01</span><h2>Reading List Favorites</h2><p>Story cards include a complete title, summary, and position feedback.</p><strong>Reading List</strong></article><article data-carousel-slide="1" hidden><span class="eyebrow">STORY 02</span><h2>Reading list overview</h2><p>Story cards include a complete title, summary, and position feedback.</p><strong>Reading List</strong></article><article data-carousel-slide="2" hidden><span class="eyebrow">STORY 03</span><h2>Reading List Plan</h2><p>Story cards include a complete title, summary, and position feedback.</p><strong>Reading List</strong></article><article data-carousel-slide="3" hidden><span class="eyebrow">STORY 04</span><h2>Reading List Inspiration</h2><p>Story cards include a complete title, summary, and position feedback.</p><strong>Reading List</strong></article><article data-carousel-slide="4" hidden><span class="eyebrow">STORY 05</span><h2>Reading List Records</h2><p>Story cards include a complete title, summary, and position feedback.</p><strong>Reading List</strong></article></div><nav class="carousel-controls" aria-label="Story Carousel"><button id="carouselPrevious" type="button" aria-label="Previous slide" data-core-bridge="cards-lists-content-story-carousel">←</button><div><button type="button" data-carousel-index="0" aria-label="Page 1" aria-current="true"></button><button type="button" data-carousel-index="1" aria-label="Slide No. 2"></button><button type="button" data-carousel-index="2" aria-label="Page 3"></button><button type="button" data-carousel-index="3" aria-label="No. 4"></button><button type="button" data-carousel-index="4" aria-label="Slide 5"></button></div><output id="carouselCount">1 / 5</output><button id="carouselNext" type="button" aria-label="Next">→</button></nav></div><!-- 11DZ_CORE_END --></section></div><p id="status" class="status" role="status" aria-live="polite"></p></section></div>
  </main>
  <script>
    'use strict';
    const statusOutput = document.querySelector('#status');
    const announce = message => { statusOutput.textContent = message; };
    /* 11DZ_CORE_SCRIPT_START:cards-lists-content-story-carousel */
const carouselSlides=[...document.querySelectorAll('[data-carousel-slide]')];const carouselDots=[...document.querySelectorAll('[data-carousel-index]')];let carouselIndex=0;function showCarousel(index){carouselIndex=(index+carouselSlides.length)%carouselSlides.length;carouselSlides.forEach((slide,slideIndex)=>{slide.hidden=slideIndex!==carouselIndex;});carouselDots.forEach((dot,dotIndex)=>{if(dotIndex===carouselIndex)dot.setAttribute('aria-current','true');else dot.removeAttribute('aria-current');});document.querySelector('#carouselCount').textContent=(carouselIndex+1)+' / '+carouselSlides.length;announce('Current Story '+(carouselIndex+1)+':'+carouselSlides[carouselIndex].querySelector('h2').textContent);}document.querySelector('#carouselPrevious').addEventListener('click',()=>showCarousel(carouselIndex-1));document.querySelector('#carouselNext').addEventListener('click',()=>showCarousel(carouselIndex+1));carouselDots.forEach((dot,index)=>dot.addEventListener('click',()=>showCarousel(index)));
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"cards-lists-content-story-carousel","selector":"[data-core-bridge=\"cards-lists-content-story-carousel\"]","mode":"click","key":"Enter"};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("click",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();workflowBridgeControl.click();const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowDispatchCore=document.querySelector('#workflowCore');const workflowDispatchForm=document.querySelector('#workflowDispatchForm');const workflowDispatchSelect=document.querySelector('#workflowDispatchActive');const workflowDispatchJobs=new Map([["1",{"label":"Reading List","amount":12,"priority":"normal","touches":0}],["2",{"label":"In-depth feature","amount":21,"priority":"urgent","touches":0}]]);let workflowDispatchSerial=workflowDispatchJobs.size;function workflowDispatchDrive(job,activate=false){workflowDispatchCore.dataset.dispatchPriority=job.priority;workflowDispatchCore.style.setProperty('--dispatch-load',Math.min(.95,.16+job.amount/120));const bridge=activate?workflowBridgeActivate():{changed:false,summary:workflowBridgeSummary()};document.querySelector('#workflowDispatchSummary').textContent=job.label+' · '+job.amount+' p · '+bridge.summary;announce('Current task in reading queue:'+job.label);}function workflowDispatchRender(activeId,activate=false){workflowDispatchSelect.replaceChildren(...[...workflowDispatchJobs].map(([id,job])=>{const option=document.createElement('option');option.value=id;option.textContent=job.label+(job.priority==='urgent'?' · Urgent':'');return option;}));workflowDispatchSelect.value=activeId;workflowDispatchDrive(workflowDispatchJobs.get(activeId),activate);}workflowDispatchForm.addEventListener('submit',event=>{event.preventDefault();const data=new FormData(workflowDispatchForm);const id=String(++workflowDispatchSerial);workflowDispatchJobs.set(id,{label:document.querySelector('#workflowDispatchKind').value,amount:Math.max(1,Number(document.querySelector('#workflowDispatchAmount').value)||1),priority:data.get('workflowPriority'),touches:0});workflowDispatchRender(id,true);});workflowDispatchSelect.addEventListener('change',()=>workflowDispatchDrive(workflowDispatchJobs.get(workflowDispatchSelect.value),true));workflowDispatchCore.addEventListener('focusin',()=>{const job=workflowDispatchJobs.get(workflowDispatchSelect.value);if(!job)return;job.touches+=1;document.querySelector('#workflowDispatchSummary').textContent=job.label+' · '+job.amount+' p · '+workflowBridgeSummary();});workflowDispatchRender('1',false);
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