{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"compact-dots-stepper-for-mobile","type":"registry:component","title":"Compact Dots Stepper for Mobile","description":"","dependencies":[],"files":[{"path":"components/we-inc/compact-dots-stepper-for-mobile.tsx","type":"registry:component","content":"import { useState } from \"react\";\n\n// Onboarding screens for a habit app. One dot per screen.\nconst screens = [\n  { title: \"Pick one small habit\", text: \"Two minutes of stretching beats an hour you never start.\", tint: \"from-violet-200 to-fuchsia-100\" },\n  { title: \"Choose a time\", text: \"Tie it to something you already do, like the first coffee.\", tint: \"from-sky-200 to-violet-100\" },\n  { title: \"Get a nudge\", text: \"One quiet reminder a day. No streak guilt.\", tint: \"from-amber-200 to-rose-100\" },\n  { title: \"Look back weekly\", text: \"Sunday evening, see what stuck and drop what did not.\", tint: \"from-emerald-200 to-teal-100\" },\n  { title: \"You are set\", text: \"Your first check-in is tomorrow morning.\", tint: \"from-violet-300 to-indigo-100\" },\n];\n\nexport default function CompactDotsStepperForMobile() {\n  const [current, setCurrent] = useState(1);\n  const last = screens.length - 1;\n  const s = screens[current];\n\n  return (\n    <div className=\"flex justify-center bg-violet-950 px-4 py-10\">\n      <div className=\"flex h-[520px] w-full max-w-[340px] flex-col overflow-hidden rounded-[2rem] bg-white\">\n        <div className={`grid h-56 place-items-center bg-gradient-to-br ${s.tint}`} aria-hidden=\"true\">\n          <span className=\"grid h-24 w-24 place-items-center rounded-3xl bg-white/70 text-4xl font-bold text-violet-900 shadow-sm\">{current + 1}</span>\n        </div>\n        <div className=\"flex flex-1 flex-col px-6 pb-6 pt-5\">\n          <ol className=\"flex items-center gap-1.5\" aria-label={`Step ${current + 1} of ${screens.length}`}>\n            {screens.map((sc, i) => (\n              <li key={sc.title} aria-current={i === current ? \"step\" : undefined}>\n                <span className={`block h-2 rounded-full transition-all duration-300 motion-reduce:transition-none ${i === current ? \"w-6 bg-violet-700\" : i < current ? \"w-2 bg-violet-400\" : \"w-2 bg-slate-200\"}`} />\n                <span className=\"sr-only\">{sc.title}{i < current ? \", done\" : \"\"}</span>\n              </li>\n            ))}\n          </ol>\n          <p className=\"mt-4 text-xs font-semibold uppercase tracking-wider text-violet-700\">Step {current + 1} of {screens.length}</p>\n          <h2 className=\"mt-1 text-xl font-semibold text-slate-900\">{s.title}</h2>\n          <p className=\"mt-2 text-sm leading-6 text-slate-600\">{s.text}</p>\n          <div className=\"mt-auto flex items-center justify-between\">\n            <button type=\"button\" onClick={() => setCurrent((c) => Math.max(0, c - 1))} disabled={current === 0} className=\"h-11 rounded-full px-4 text-sm font-medium text-slate-700 hover:bg-slate-100 disabled:invisible focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-violet-600\">Back</button>\n            <button type=\"button\" onClick={() => setCurrent((c) => (c === last ? 0 : c + 1))} className=\"h-11 rounded-full bg-violet-700 px-6 text-sm font-semibold text-white hover:bg-violet-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-violet-600 focus-visible:ring-offset-2\">\n              {current === last ? \"Start\" : \"Next\"}\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n"}]}
