{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"html-css-round-icon-only-buttons-in-a-player","type":"registry:component","title":"HTML CSS Round Icon Only Buttons In A Player","description":"","dependencies":[],"files":[{"path":"components/we-inc/html-css-round-icon-only-buttons-in-a-player.tsx","type":"registry:component","content":"import { useState } from \"react\";\n\n// Round icon-only buttons on a podcast player: each has an aria-label, the big one toggles play and pause.\nconst ring = \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-200 focus-visible:ring-offset-2 focus-visible:ring-offset-emerald-950\";\nconst small = `grid h-11 w-11 place-items-center rounded-full text-emerald-100 transition-colors hover:bg-emerald-800 active:bg-emerald-700 ${ring}`;\n\nfunction Icon({ d }: { d: string }) {\n  return <svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" aria-hidden=\"true\" className=\"fill-current\"><path d={d} /></svg>;\n}\n\nexport default function HtmlCssRoundIconOnlyButtonsInAPlayer() {\n  const [playing, setPlaying] = useState(false);\n  const [liked, setLiked] = useState(true);\n  return (\n    <section className=\"bg-emerald-50 px-5 py-14\">\n      <div className=\"mx-auto max-w-sm rounded-[28px] bg-emerald-950 p-6 text-center\">\n        <p className=\"text-xs font-semibold uppercase tracking-[0.2em] text-emerald-300\">Episode 31</p>\n        <h2 className=\"mt-1 text-lg font-semibold text-white\">Growing tomatoes on a balcony</h2>\n        <p className=\"text-sm text-emerald-200\">The Allotment Hour</p>\n        <div className=\"mt-5 h-1.5 overflow-hidden rounded-full bg-emerald-800\"><div className=\"h-full w-2/5 rounded-full bg-emerald-300\" /></div>\n        <div className=\"mt-6 flex items-center justify-between\">\n          <button type=\"button\" aria-label={liked ? \"Remove from saved\" : \"Save episode\"} aria-pressed={liked} onClick={() => setLiked(!liked)} className={small}>\n            <svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" aria-hidden=\"true\" className={liked ? \"fill-emerald-300 text-emerald-300\" : \"fill-none\"} stroke=\"currentColor\" strokeWidth=\"2\"><path d=\"M12 20s-7-4.4-9-8.8C1.6 8 3.6 4.5 7 4.5c2 0 3.5 1.1 5 2.9 1.5-1.8 3-2.9 5-2.9 3.4 0 5.4 3.5 4 6.7C19 15.6 12 20 12 20z\" /></svg>\n          </button>\n          <button type=\"button\" aria-label=\"Back 15 seconds\" className={small}><Icon d=\"M11 6V2L5 8l6 6v-4a5 5 0 1 1-5 5H4a7 7 0 1 0 7-7z\" /></button>\n          <button type=\"button\" aria-label={playing ? \"Pause\" : \"Play\"} onClick={() => setPlaying(!playing)}\n            className={`grid h-16 w-16 place-items-center rounded-full bg-emerald-300 text-emerald-950 transition-transform hover:bg-emerald-200 active:scale-95 motion-reduce:transition-none motion-reduce:active:scale-100 ${ring}`}>\n            <Icon d={playing ? \"M7 5h4v14H7zm6 0h4v14h-4z\" : \"M8 5v14l11-7z\"} />\n          </button>\n          <button type=\"button\" aria-label=\"Forward 30 seconds\" className={small}><Icon d=\"M13 6V2l6 6-6 6v-4a5 5 0 1 0 5 5h2a7 7 0 1 1-7-7z\" /></button>\n          <button type=\"button\" aria-label=\"Share episode\" className={small}><Icon d=\"M18 16a3 3 0 0 0-2.4 1.2l-6.7-3.4a3 3 0 0 0 0-1.6l6.7-3.4A3 3 0 1 0 15 7c0 .3 0 .5.1.8L8.4 11.2a3 3 0 1 0 0 3.6l6.7 3.4A3 3 0 1 0 18 16z\" /></button>\n        </div>\n      </div>\n    </section>\n  );\n}\n"}]}
