{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"details-summary-accordion-with-smooth-open-css","type":"registry:block","title":"Details Summary Accordion With Smooth Open","description":"Free HTML and CSS accordion built on details and summary: no JavaScript, a smooth open with interpolate-size, a turning chevron and a React version.","dependencies":[],"files":[{"path":"components/we-inc/details-summary-accordion-with-smooth-open-css.tsx","type":"registry:component","content":"// Native <details> and <summary>: works with no script. Smooth height where the browser supports interpolate-size.\nconst items = [\n  { q: \"How long does a hand-thrown mug take to reach me?\", a: \"Every mug is thrown, dried for a week and fired twice, so allow three to four weeks from order to doorstep. We email a photo when yours comes out of the kiln.\" },\n  { q: \"Are the glazes safe for food and the dishwasher?\", a: \"Yes. All of our glazes are lead free and fired to stoneware temperature. They go in the dishwasher and microwave, though hand washing keeps the matte finishes looking new for longer.\" },\n  { q: \"Can I order a set in a colour that is not listed?\", a: \"Sets of six or more can be glazed in any of our test colours. Write to the studio with the shade you have in mind and we will send a sample tile first.\" },\n  { q: \"What happens if a piece arrives broken?\", a: \"Send us a photo within seven days and we will make a replacement in the next firing. You do not need to return the broken piece.\" },\n];\n\nexport default function DetailsSummaryAccordionWithSmoothOpenCss() {\n  return (\n    <section className=\"dsa bg-stone-100 px-5 py-16 sm:py-20\">\n      <style>{`\n        .dsa details { interpolate-size: allow-keywords; }\n        .dsa details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s cubic-bezier(.2,.7,.2,1), content-visibility .35s allow-discrete; }\n        .dsa details[open]::details-content { block-size: auto; }\n        .dsa summary { list-style: none; }\n        .dsa summary::-webkit-details-marker { display: none; }\n        .dsa .dsa-chev { transition: transform .3s cubic-bezier(.2,.7,.2,1); }\n        .dsa details[open] .dsa-chev { transform: rotate(180deg); }\n        @media (prefers-reduced-motion: reduce) {\n          .dsa details::details-content, .dsa .dsa-chev { transition: none; }\n        }\n      `}</style>\n      <div className=\"mx-auto max-w-2xl\">\n        <p className=\"text-xs font-semibold uppercase tracking-[0.2em] text-amber-800\">Saltmarsh Pottery</p>\n        <h2 className=\"mt-2 text-2xl font-semibold tracking-tight text-stone-900 sm:text-3xl\">Orders and care</h2>\n        <div className=\"mt-8 divide-y divide-stone-300 border-y border-stone-300\">\n          {items.map((it, i) => (\n            <details key={it.q} open={i === 0}>\n              <summary className=\"flex min-h-[56px] cursor-pointer items-center justify-between gap-4 py-4 text-left text-base font-medium text-stone-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-700 focus-visible:ring-offset-2 focus-visible:ring-offset-stone-100\">\n                {it.q}\n                <svg className=\"dsa-chev h-5 w-5 shrink-0 text-stone-500\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" aria-hidden=\"true\"><path d=\"M5 7.5l5 5 5-5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n              </summary>\n              <p className=\"pb-5 pr-8 text-[15px] leading-relaxed text-stone-600\">{it.a}</p>\n            </details>\n          ))}\n        </div>\n      </div>\n    </section>\n  );\n}\n"}]}
