[{"data":1,"prerenderedAt":1071},["ShallowReactive",2],{"blog-\u002Fblog\u002F2026\u002Fanimated-accordion-grid-or-details":3,"blog-project-\u002Fblog\u002F2026\u002Fanimated-accordion-grid-or-details":985,"i-lucide:link":1066,"art-\u002Fart\u002Fblog\u002Fakordeon-grid-czy-details.svg":1070},{"id":4,"title":5,"art":6,"body":7,"date":969,"description":970,"draft":971,"extension":972,"image":973,"kind":974,"meta":975,"navigation":340,"ogImage":976,"path":977,"project":978,"seo":979,"slug":973,"stem":980,"tags":981,"translationKey":983,"updated":973,"__hash__":984},"blog_en\u002Fblog\u002F2026\u002Fanimated-accordion-grid-or-details.md","An animated accordion: grid or \u003Cdetails>?","\u002Fart\u002Fblog\u002Fakordeon-grid-czy-details.svg",{"type":8,"value":9,"toc":961},"minimark",[10,26,31,53,57,68,246,480,486,613,625,632,652,700,822,836,840,909,915,918,925,929,957],[11,12,13,14,18,19,22,23,25],"p",{},"When I worked on superauto.pl at Arris Agency, I had to build an element that expands on click. I built it on ",[15,16,17],"code",{},"\u003Cdetails>"," and ",[15,20,21],{},"\u003Csummary>"," – a ready, native HTML element that works without JavaScript. After it went live, I was told to change it, because ",[15,24,17],{}," opens and closes without animation. I remembered a technique I had once seen: animating grid rows. The situation is real, but the code below is simplified examples written for this post, not the code from the site. In the example, a list of car equipment expands.",[27,28,30],"h2",{"id":29},"why-height-doesnt-want-to-animate","Why height doesn't want to animate",[11,32,33,34,37,38,41,42,45,46,48,49,52],{},"The simplest idea is to animate ",[15,35,36],{},"height"," from ",[15,39,40],{},"0"," to ",[15,43,44],{},"auto",". It doesn't work: for years browsers couldn't move smoothly to an ",[15,47,44],{}," value, so the element changed its height in one jump. That's why workarounds appeared – for example ",[15,50,51],{},"max-height"," with a big number, or measuring the height in JavaScript.",[27,54,56],{"id":55},"an-accordion-on-grid","An accordion on grid",[11,58,59,60,63,64,67],{},"Grid can animate rows. A ",[15,61,62],{},"0fr"," row has zero height, and a ",[15,65,66],{},"1fr"," row is as tall as the content needs. The transition between them has worked in all major browsers since late 2022.",[69,70,75],"pre",{"className":71,"code":72,"language":73,"meta":74,"style":74},"language-html shiki shiki-themes github-light github-dark","\u003Cdiv class=\"accordion\">\n  \u003Cbutton type=\"button\" class=\"accordion__toggle\" aria-expanded=\"false\" aria-controls=\"equipment\">\n    Equipment\n  \u003C\u002Fbutton>\n  \u003Cdiv class=\"accordion__panel\" id=\"equipment\">\n    \u003Cdiv class=\"accordion__inner\">\n      \u003Cp>Air conditioning, parking sensors, reversing camera…\u003C\u002Fp>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n","html","",[15,76,77,104,146,152,162,185,202,217,227,236],{"__ignoreMap":74},[78,79,82,86,90,94,97,101],"span",{"class":80,"line":81},"line",1,[78,83,85],{"class":84},"sVt8B","\u003C",[78,87,89],{"class":88},"s9eBZ","div",[78,91,93],{"class":92},"sScJk"," class",[78,95,96],{"class":84},"=",[78,98,100],{"class":99},"sZZnC","\"accordion\"",[78,102,103],{"class":84},">\n",[78,105,107,110,113,116,118,121,123,125,128,131,133,136,139,141,144],{"class":80,"line":106},2,[78,108,109],{"class":84},"  \u003C",[78,111,112],{"class":88},"button",[78,114,115],{"class":92}," type",[78,117,96],{"class":84},[78,119,120],{"class":99},"\"button\"",[78,122,93],{"class":92},[78,124,96],{"class":84},[78,126,127],{"class":99},"\"accordion__toggle\"",[78,129,130],{"class":92}," aria-expanded",[78,132,96],{"class":84},[78,134,135],{"class":99},"\"false\"",[78,137,138],{"class":92}," aria-controls",[78,140,96],{"class":84},[78,142,143],{"class":99},"\"equipment\"",[78,145,103],{"class":84},[78,147,149],{"class":80,"line":148},3,[78,150,151],{"class":84},"    Equipment\n",[78,153,155,158,160],{"class":80,"line":154},4,[78,156,157],{"class":84},"  \u003C\u002F",[78,159,112],{"class":88},[78,161,103],{"class":84},[78,163,165,167,169,171,173,176,179,181,183],{"class":80,"line":164},5,[78,166,109],{"class":84},[78,168,89],{"class":88},[78,170,93],{"class":92},[78,172,96],{"class":84},[78,174,175],{"class":99},"\"accordion__panel\"",[78,177,178],{"class":92}," id",[78,180,96],{"class":84},[78,182,143],{"class":99},[78,184,103],{"class":84},[78,186,188,191,193,195,197,200],{"class":80,"line":187},6,[78,189,190],{"class":84},"    \u003C",[78,192,89],{"class":88},[78,194,93],{"class":92},[78,196,96],{"class":84},[78,198,199],{"class":99},"\"accordion__inner\"",[78,201,103],{"class":84},[78,203,205,208,210,213,215],{"class":80,"line":204},7,[78,206,207],{"class":84},"      \u003C",[78,209,11],{"class":88},[78,211,212],{"class":84},">Air conditioning, parking sensors, reversing camera…\u003C\u002F",[78,214,11],{"class":88},[78,216,103],{"class":84},[78,218,220,223,225],{"class":80,"line":219},8,[78,221,222],{"class":84},"    \u003C\u002F",[78,224,89],{"class":88},[78,226,103],{"class":84},[78,228,230,232,234],{"class":80,"line":229},9,[78,231,157],{"class":84},[78,233,89],{"class":88},[78,235,103],{"class":84},[78,237,239,242,244],{"class":80,"line":238},10,[78,240,241],{"class":84},"\u003C\u002F",[78,243,89],{"class":88},[78,245,103],{"class":84},[69,247,251],{"className":248,"code":249,"language":250,"meta":74,"style":74},"language-css shiki shiki-themes github-light github-dark",".accordion__panel {\n  display: grid;\n  grid-template-rows: 0fr;\n  visibility: hidden; \u002F* collapsed content doesn't take focus and isn't read by a screen reader *\u002F\n  transition: grid-template-rows 0.3s, visibility 0.3s;\n}\n\n.accordion__toggle[aria-expanded=\"true\"] + .accordion__panel {\n  grid-template-rows: 1fr;\n  visibility: visible;\n}\n\n\u002F* without this, the content sticks out of the collapsed row *\u002F\n.accordion__inner {\n  overflow: hidden;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .accordion__panel {\n    transition: none;\n  }\n}\n","css",[15,252,253,261,276,291,308,331,336,342,369,382,393,398,403,409,417,429,434,439,448,456,469,475],{"__ignoreMap":74},[78,254,255,258],{"class":80,"line":81},[78,256,257],{"class":92},".accordion__panel",[78,259,260],{"class":84}," {\n",[78,262,263,267,270,273],{"class":80,"line":106},[78,264,266],{"class":265},"sj4cs","  display",[78,268,269],{"class":84},": ",[78,271,272],{"class":265},"grid",[78,274,275],{"class":84},";\n",[78,277,278,281,283,285,289],{"class":80,"line":148},[78,279,280],{"class":265},"  grid-template-rows",[78,282,269],{"class":84},[78,284,40],{"class":265},[78,286,288],{"class":287},"szBVR","fr",[78,290,275],{"class":84},[78,292,293,296,298,301,304],{"class":80,"line":154},[78,294,295],{"class":265},"  visibility",[78,297,269],{"class":84},[78,299,300],{"class":265},"hidden",[78,302,303],{"class":84},"; ",[78,305,307],{"class":306},"sqY6-","\u002F* collapsed content doesn't take focus and isn't read by a screen reader *\u002F\n",[78,309,310,313,316,319,322,325,327,329],{"class":80,"line":164},[78,311,312],{"class":265},"  transition",[78,314,315],{"class":84},": grid-template-rows ",[78,317,318],{"class":265},"0.3",[78,320,321],{"class":287},"s",[78,323,324],{"class":84},", visibility ",[78,326,318],{"class":265},[78,328,321],{"class":287},[78,330,275],{"class":84},[78,332,333],{"class":80,"line":187},[78,334,335],{"class":84},"}\n",[78,337,338],{"class":80,"line":204},[78,339,341],{"emptyLinePlaceholder":340},true,"\n",[78,343,344,347,350,353,355,358,361,364,367],{"class":80,"line":219},[78,345,346],{"class":92},".accordion__toggle",[78,348,349],{"class":84},"[",[78,351,352],{"class":92},"aria-expanded",[78,354,96],{"class":287},[78,356,357],{"class":99},"\"true\"",[78,359,360],{"class":84},"] ",[78,362,363],{"class":287},"+",[78,365,366],{"class":92}," .accordion__panel",[78,368,260],{"class":84},[78,370,371,373,375,378,380],{"class":80,"line":229},[78,372,280],{"class":265},[78,374,269],{"class":84},[78,376,377],{"class":265},"1",[78,379,288],{"class":287},[78,381,275],{"class":84},[78,383,384,386,388,391],{"class":80,"line":238},[78,385,295],{"class":265},[78,387,269],{"class":84},[78,389,390],{"class":265},"visible",[78,392,275],{"class":84},[78,394,396],{"class":80,"line":395},11,[78,397,335],{"class":84},[78,399,401],{"class":80,"line":400},12,[78,402,341],{"emptyLinePlaceholder":340},[78,404,406],{"class":80,"line":405},13,[78,407,408],{"class":306},"\u002F* without this, the content sticks out of the collapsed row *\u002F\n",[78,410,412,415],{"class":80,"line":411},14,[78,413,414],{"class":92},".accordion__inner",[78,416,260],{"class":84},[78,418,420,423,425,427],{"class":80,"line":419},15,[78,421,422],{"class":265},"  overflow",[78,424,269],{"class":84},[78,426,300],{"class":265},[78,428,275],{"class":84},[78,430,432],{"class":80,"line":431},16,[78,433,335],{"class":84},[78,435,437],{"class":80,"line":436},17,[78,438,341],{"emptyLinePlaceholder":340},[78,440,442,445],{"class":80,"line":441},18,[78,443,444],{"class":287},"@media",[78,446,447],{"class":84}," (prefers-reduced-motion: reduce) {\n",[78,449,451,454],{"class":80,"line":450},19,[78,452,453],{"class":92},"  .accordion__panel",[78,455,260],{"class":84},[78,457,459,462,464,467],{"class":80,"line":458},20,[78,460,461],{"class":265},"    transition",[78,463,269],{"class":84},[78,465,466],{"class":265},"none",[78,468,275],{"class":84},[78,470,472],{"class":80,"line":471},21,[78,473,474],{"class":84},"  }\n",[78,476,478],{"class":80,"line":477},22,[78,479,335],{"class":84},[11,481,482,483,485],{},"JavaScript only switches ",[15,484,352],{},". This attribute tells a screen reader whether the element is expanded, and CSS uses it for the animation:",[69,487,491],{"className":488,"code":489,"language":490,"meta":74,"style":74},"language-js shiki shiki-themes github-light github-dark","document.querySelectorAll('.accordion__toggle').forEach((button) => {\n  button.addEventListener('click', () => {\n    const isOpen = button.getAttribute('aria-expanded') === 'true'\n    button.setAttribute('aria-expanded', String(!isOpen))\n  })\n})\n","js",[15,492,493,527,547,577,603,608],{"__ignoreMap":74},[78,494,495,498,501,504,507,510,513,516,519,522,525],{"class":80,"line":81},[78,496,497],{"class":84},"document.",[78,499,500],{"class":92},"querySelectorAll",[78,502,503],{"class":84},"(",[78,505,506],{"class":99},"'.accordion__toggle'",[78,508,509],{"class":84},").",[78,511,512],{"class":92},"forEach",[78,514,515],{"class":84},"((",[78,517,112],{"class":518},"siNPP",[78,520,521],{"class":84},") ",[78,523,524],{"class":287},"=>",[78,526,260],{"class":84},[78,528,529,532,535,537,540,543,545],{"class":80,"line":106},[78,530,531],{"class":84},"  button.",[78,533,534],{"class":92},"addEventListener",[78,536,503],{"class":84},[78,538,539],{"class":99},"'click'",[78,541,542],{"class":84},", () ",[78,544,524],{"class":287},[78,546,260],{"class":84},[78,548,549,552,555,558,561,564,566,569,571,574],{"class":80,"line":148},[78,550,551],{"class":287},"    const",[78,553,554],{"class":265}," isOpen",[78,556,557],{"class":287}," =",[78,559,560],{"class":84}," button.",[78,562,563],{"class":92},"getAttribute",[78,565,503],{"class":84},[78,567,568],{"class":99},"'aria-expanded'",[78,570,521],{"class":84},[78,572,573],{"class":287},"===",[78,575,576],{"class":99}," 'true'\n",[78,578,579,582,585,587,589,592,595,597,600],{"class":80,"line":154},[78,580,581],{"class":84},"    button.",[78,583,584],{"class":92},"setAttribute",[78,586,503],{"class":84},[78,588,568],{"class":99},[78,590,591],{"class":84},", ",[78,593,594],{"class":92},"String",[78,596,503],{"class":84},[78,598,599],{"class":287},"!",[78,601,602],{"class":84},"isOpen))\n",[78,604,605],{"class":80,"line":164},[78,606,607],{"class":84},"  })\n",[78,609,610],{"class":80,"line":187},[78,611,612],{"class":84},"})\n",[11,614,615,616,618,619,591,621,624],{},"This approach has one cost: what ",[15,617,17],{}," gives you for free, you have to add yourself – the button, ",[15,620,352],{},[15,622,623],{},"aria-controls"," and hiding the collapsed content.",[27,626,628,629,631],{"id":627},"today-details-with-animation","Today: ",[15,630,17],{}," with animation",[11,633,634,635,638,639,641,642,644,645,648,649,651],{},"Since September 2025 all major browsers support ",[15,636,637],{},"::details-content",". It's a pseudo-element that points to the content of ",[15,640,17],{}," – everything except ",[15,643,21],{},". Together with ",[15,646,647],{},"interpolate-size",", which lets you animate to ",[15,650,44],{},", the accordion goes back to native HTML:",[69,653,655],{"className":71,"code":654,"language":73,"meta":74,"style":74},"\u003Cdetails>\n  \u003Csummary>Equipment\u003C\u002Fsummary>\n  \u003Cp>Air conditioning, parking sensors, reversing camera…\u003C\u002Fp>\n\u003C\u002Fdetails>\n",[15,656,657,666,680,692],{"__ignoreMap":74},[78,658,659,661,664],{"class":80,"line":81},[78,660,85],{"class":84},[78,662,663],{"class":88},"details",[78,665,103],{"class":84},[78,667,668,670,673,676,678],{"class":80,"line":106},[78,669,109],{"class":84},[78,671,672],{"class":88},"summary",[78,674,675],{"class":84},">Equipment\u003C\u002F",[78,677,672],{"class":88},[78,679,103],{"class":84},[78,681,682,684,686,688,690],{"class":80,"line":148},[78,683,109],{"class":84},[78,685,11],{"class":88},[78,687,212],{"class":84},[78,689,11],{"class":88},[78,691,103],{"class":84},[78,693,694,696,698],{"class":80,"line":154},[78,695,241],{"class":84},[78,697,663],{"class":88},[78,699,103],{"class":84},[69,701,703],{"className":248,"code":702,"language":250,"meta":74,"style":74},":root {\n  interpolate-size: allow-keywords;\n}\n\ndetails::details-content {\n  block-size: 0;\n  overflow-y: clip;\n  transition: block-size 0.3s, content-visibility 0.3s allow-discrete;\n}\n\ndetails[open]::details-content {\n  block-size: auto;\n}\n",[15,704,705,712,720,724,728,740,751,763,784,788,792,808,818],{"__ignoreMap":74},[78,706,707,710],{"class":80,"line":81},[78,708,709],{"class":92},":root",[78,711,260],{"class":84},[78,713,714,717],{"class":80,"line":106},[78,715,716],{"class":265},"  interpolate-size",[78,718,719],{"class":84},": allow-keywords;\n",[78,721,722],{"class":80,"line":148},[78,723,335],{"class":84},[78,725,726],{"class":80,"line":154},[78,727,341],{"emptyLinePlaceholder":340},[78,729,730,732,735,738],{"class":80,"line":164},[78,731,663],{"class":88},[78,733,734],{"class":84},"::",[78,736,737],{"class":88},"details-content",[78,739,260],{"class":84},[78,741,742,745,747,749],{"class":80,"line":187},[78,743,744],{"class":265},"  block-size",[78,746,269],{"class":84},[78,748,40],{"class":265},[78,750,275],{"class":84},[78,752,753,756,758,761],{"class":80,"line":204},[78,754,755],{"class":265},"  overflow-y",[78,757,269],{"class":84},[78,759,760],{"class":265},"clip",[78,762,275],{"class":84},[78,764,765,767,770,772,774,777,779,781],{"class":80,"line":219},[78,766,312],{"class":265},[78,768,769],{"class":84},": block-size ",[78,771,318],{"class":265},[78,773,321],{"class":287},[78,775,776],{"class":84},", content-visibility ",[78,778,318],{"class":265},[78,780,321],{"class":287},[78,782,783],{"class":84}," allow-discrete;\n",[78,785,786],{"class":80,"line":229},[78,787,335],{"class":84},[78,789,790],{"class":80,"line":238},[78,791,341],{"emptyLinePlaceholder":340},[78,793,794,796,798,801,804,806],{"class":80,"line":395},[78,795,663],{"class":88},[78,797,349],{"class":84},[78,799,800],{"class":92},"open",[78,802,803],{"class":84},"]::",[78,805,737],{"class":88},[78,807,260],{"class":84},[78,809,810,812,814,816],{"class":80,"line":400},[78,811,744],{"class":265},[78,813,269],{"class":84},[78,815,44],{"class":265},[78,817,275],{"class":84},[78,819,820],{"class":80,"line":405},[78,821,335],{"class":84},[11,823,824,825,827,828,831,832,835],{},"There's one \"but\": ",[15,826,647],{}," works only in Chrome and Edge for now. In Firefox and Safari the element opens without animation – but it opens and works normally. If several elements share the same ",[15,829,830],{},"name"," attribute, for example ",[15,833,834],{},"\u003Cdetails name=\"offer\">",", only one of them can be open. This has worked in all major browsers since September 2024.",[27,837,839],{"id":838},"what-to-choose","What to choose",[841,842,843,859],"table",{},[844,845,846],"thead",{},[847,848,849,852,855],"tr",{},[850,851],"th",{},[850,853,854],{},"Grid",[850,856,857],{},[15,858,17],{},[860,861,862,874,885,896],"tbody",{},[847,863,864,868,871],{},[865,866,867],"td",{},"Animation",[865,869,870],{},"everywhere",[865,872,873],{},"Chrome and Edge for now",[847,875,876,879,882],{},[865,877,878],{},"JavaScript",[865,880,881],{},"needed",[865,883,884],{},"not needed",[847,886,887,890,893],{},[865,888,889],{},"Accessibility",[865,891,892],{},"you add it",[865,894,895],{},"built in",[847,897,898,901,904],{},[865,899,900],{},"Only one open",[865,902,903],{},"in JavaScript",[865,905,906,908],{},[15,907,830],{}," attribute",[11,910,911,912,914],{},"Today I would start with ",[15,913,17],{}," and treat the animation as a bonus that will come to more browsers. I would choose grid where the animation has to work everywhere right now.",[11,916,917],{},"I put both approaches – the default version and a variant where only one element can be open – in one view on CodePen. You can run them here:",[919,920],"code-pen",{"slug":921,"title":922,"url":923,"user":924},"vExrgqy","Accordion – grid and details","https:\u002F\u002Fcodepen.io\u002Feditor\u002FLukaszDev\u002Fpen\u002F01a15a92-8abc-7da6-9de0-30d95aa85954","LukaszDev",[27,926,928],{"id":927},"what-came-out-of-it","What came out of it",[930,931,932,938,947,950],"ul",{},[933,934,935,937],"li",{},[15,936,17],{}," is a good start: it works without JavaScript and has built-in accessibility.",[933,939,940,941,943,944,946],{},"Animating grid rows (",[15,942,62],{}," → ",[15,945,66],{},") is a proven way to expand to the natural height.",[933,948,949],{},"In the grid version you have to hide the collapsed content from the keyboard and screen readers too.",[933,951,952,18,954,956],{},[15,953,637],{},[15,955,647],{}," mean you have to choose between native HTML and animation less and less often.",[958,959,960],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sqY6-, html code.shiki .sqY6-{--shiki-default:#6A737D;--shiki-dark:#90A1B9}html pre.shiki code .siNPP, html code.shiki .siNPP{--shiki-default:#CA3500;--shiki-dark:#FFAB70}",{"title":74,"searchDepth":106,"depth":106,"links":962},[963,964,965,967,968],{"id":29,"depth":106,"text":30},{"id":55,"depth":106,"text":56},{"id":627,"depth":106,"text":966},"Today: \u003Cdetails> with animation",{"id":838,"depth":106,"text":839},{"id":927,"depth":106,"text":928},"2026-12-01","First I built an expandable element on \u003Cdetails>, then I had to rewrite it on grid, because it had no animation. Today \u003Cdetails> can animate – what to choose and why.",false,"md",null,"post",{},"\u002Fog\u002Fblog\u002Fakordeon-grid-czy-details-en.jpg","\u002Fblog\u002F2026\u002Fanimated-accordion-grid-or-details","\u002Fprojects\u002F2025\u002Fsuperauto",{"title":5,"description":970},"blog\u002F2026\u002Fanimated-accordion-grid-or-details",[250,73,982],"javascript","akordeon-grid-czy-details","K5oysP6sREUjkHAxV3NDcb0bYSoi3os4i8ubaAjQt5s",{"id":986,"title":987,"agency":988,"body":989,"compare":973,"cover":1021,"date":1026,"description":1027,"draft":971,"extension":972,"facts":1028,"featured":971,"gallery":1040,"galleryLead":1052,"highlights":973,"image":1053,"links":973,"meta":1054,"motion":973,"motionLead":973,"navigation":340,"note":1055,"ogImage":1056,"path":978,"seo":1057,"stack":1058,"stem":1061,"tags":1062,"__hash__":1065},"projects_en\u002Fprojects\u002F2025\u002Fsuperauto\u002Findex.md","superauto.pl","Arris Agency",{"type":8,"value":990,"toc":1018},[991,994,998],[11,992,993],{},"superauto.pl is a site with car offers, also for leasing. At Arris Agency I made many changes there, and the biggest ordered rebuild was replacing several different carousels with one. I suggested Swiper – it loads images in advance and is easy to edit – and I built one bigger component that replaced three different carousels.",[27,995,997],{"id":996},"what-changed","What changed",[930,999,1000,1003,1006,1009,1012,1015],{},[933,1001,1002],{},"One carousel pattern instead of three different ones – easier to maintain and edit",[933,1004,1005],{},"The car gallery with thumbnails as an extension of the pattern",[933,1007,1008],{},"A full-screen photo view (lightbox) – the same carousel, bigger photos",[933,1010,1011],{},"Carousels for vehicle cards and small offers – new offers load more smoothly after fetching data",[933,1013,1014],{},"Photos load in two steps: first a blurred low-quality preview in the background, then the full version",[933,1016,1017],{},"Video tiles that take you to the section of the offer with that video",{"title":74,"searchDepth":106,"depth":106,"links":1019},[1020],{"id":996,"depth":106,"text":997},{"desktop":1022,"width":1023,"height":1024,"alt":1025},"\u002Fprojects\u002F2025\u002Fsuperauto\u002Fcar-page.webp",1920,1080,"superauto.pl – car page with a gallery and thumbnails","2025-03-01","My part of the site – three different carousels replaced with one Swiper component: the car gallery, a full-screen view and offer carousels.",[1029,1031,1034,1037],{"value":377,"text":1030},"carousel component instead of three different ones – one pattern for the whole site",{"value":1032,"text":1033},"4","extensions of the pattern – gallery with thumbnails, full-screen view, vehicles and small offers",{"value":1035,"text":1036},"2","steps of loading a photo – first a blurred preview, then full quality",{"value":1038,"text":1039},"Swiper","the library I suggested – images loaded in advance and easy editing",[1041,1044,1048],{"src":1022,"width":1023,"height":1024,"alt":1042,"caption":1043},"Car page with a gallery","Car page – gallery with thumbnails, arrows and a photo counter",{"src":1045,"width":1023,"height":1024,"alt":1046,"caption":1047},"\u002Fprojects\u002F2025\u002Fsuperauto\u002Fgallery-fullscreen.webp","Full-screen gallery","Full-screen view – the same carousel pattern, thumbnails under the photo",{"src":1049,"width":1023,"height":1024,"alt":1050,"caption":1051},"\u002Fprojects\u002F2025\u002Fsuperauto\u002Foffer-carousels.webp","Offer carousels","Offer carousels – model versions and \"Others also viewed\", each card has its own small gallery","Screenshots of the site – click one to see it bigger.","\u002Fprojects\u002F2025\u002Fsuperauto\u002Fthumbnail.webp",{},"A project at Arris Agency – I only show my part of the site.","\u002Fog\u002Fprojects\u002Fsuperauto-en.jpg",{"title":987,"description":1027},[878,1038,1059,1060],"Twig","SCSS","projects\u002F2025\u002Fsuperauto\u002Findex",[982,1063,1064],"swiper","twig","PiQR8ughMEsBhuM568xdpOl8uP7hXTLM5vtk5xHgD00",{"left":1067,"top":1067,"width":1068,"height":1068,"rotate":1067,"vFlip":971,"hFlip":971,"body":1069},0,24,"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"\u002F>\u003Cpath d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"\u002F>\u003C\u002Fg>","\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 480 300\" fill=\"none\" width=\"480\" height=\"300\" class=\"art-draw block h-auto w-full\" aria-hidden=\"true\" focusable=\"false\">\n\n\u003Cg stroke=\"rgba(160,185,255,.5)\" stroke-width=\"1.5\">\n\u003Crect x=\"40\" y=\"36\" width=\"280\" height=\"40\" rx=\"10\" fill=\"rgba(111,156,255,.16)\" pathLength=\"1\" class=\"l\" style=\"--d:0.08\"\u002F>\n\u003Crect x=\"40\" y=\"86\" width=\"280\" height=\"128\" rx=\"10\" fill=\"rgba(111,156,255,.28)\" pathLength=\"1\" class=\"l\" style=\"--d:0.08\"\u002F>\n\u003Crect x=\"40\" y=\"224\" width=\"280\" height=\"40\" rx=\"10\" fill=\"rgba(111,156,255,.16)\" pathLength=\"1\" class=\"l\" style=\"--d:0.08\"\u002F>\n\u003C\u002Fg>\n\u003Cg stroke=\"#cfd9ff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\u003Cpath d=\"m292 52 6 6 6-6\" pathLength=\"1\" class=\"l\" style=\"--d:0.61\"\u002F>\u003Cpath d=\"m292 108 6-6 6 6\" pathLength=\"1\" class=\"l\" style=\"--d:0.61\"\u002F>\u003Cpath d=\"m292 240 6 6 6-6\" pathLength=\"1\" class=\"l\" style=\"--d:0.61\"\u002F>\n\u003C\u002Fg>\n\u003Cg fill=\"rgba(200,215,255,.6)\">\n\u003Crect x=\"58\" y=\"51\" width=\"110\" height=\"10\" rx=\"5\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\u003Crect x=\"58\" y=\"100\" width=\"130\" height=\"10\" rx=\"5\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\u003Crect x=\"58\" y=\"239\" width=\"96\" height=\"10\" rx=\"5\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\n\u003C\u002Fg>\n\n\u003Cg fill=\"rgba(200,215,255,.3)\">\n\u003Crect x=\"58\" y=\"132\" width=\"230\" height=\"8\" rx=\"4\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\u003Crect x=\"58\" y=\"150\" width=\"200\" height=\"8\" rx=\"4\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\u003Crect x=\"58\" y=\"168\" width=\"216\" height=\"8\" rx=\"4\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\u003Crect x=\"58\" y=\"186\" width=\"150\" height=\"8\" rx=\"4\" pathLength=\"1\" class=\"l\" style=\"--d:0.12\"\u002F>\n\u003C\u002Fg>\n\n\u003Cg stroke=\"rgba(200,215,255,.55)\" stroke-width=\"2\" stroke-linecap=\"round\">\n\u003Cpath d=\"M336 96v108\" pathLength=\"1\" class=\"l\" style=\"--d:0.70\"\u002F>\u003Cpath d=\"m330 102 6-6 6 6\" pathLength=\"1\" class=\"l\" style=\"--d:0.69\"\u002F>\u003Cpath d=\"m330 198 6 6 6-6\" pathLength=\"1\" class=\"l\" style=\"--d:0.69\"\u002F>\n\u003C\u002Fg>\n\u003Cg font-family=\"ui-monospace,Menlo,Consolas,monospace\" font-size=\"14\" fill=\"#cfd9ff\">\n\u003Ctext x=\"352\" y=\"128\" class=\"f\" style=\"--d:0.73\">0fr\u003C\u002Ftext>\n\u003Ctext x=\"352\" y=\"152\" class=\"f\" style=\"--d:0.73\">→ 1fr\u003C\u002Ftext>\n\u003Ctext x=\"352\" y=\"196\" class=\"f\" style=\"--d:0.73\">&lt;details&gt;\u003C\u002Ftext>\n\u003C\u002Fg>\n\u003Crect x=\"352\" y=\"168\" width=\"8\" height=\"8\" rx=\"4\" fill=\"#2860ea\" pathLength=\"1\" class=\"l\" style=\"--d:0.73\"\u002F>\n\u003C\u002Fsvg>\n",1796154516837]