Editor Inspector Cards
Bento of tiles showing real editor controls: Loop Effect panel with segmented 2D/3D, blue sliders, number fields; OpenType panel with Yes/No toggle pairs; Variable-font weight slider; form builder with dashed blue selection outline. Each tile has a bold white lead-in word followed by grey description.
Rebuilt from framer.com/solutions/designers in the Obsidian Canvas style.
Looks exactly like framer.com: brings its fonts and colours, namespaced so your own theme stays untouched.
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Renders standalone; optional props: heading and the four [lead, description] caption tuples. Sliders, segmented controls and Yes/No toggles are interactive, and each tile scales from 0.8 and fades in on load.
components/properties-inspector-bento.tsx
import { useState } from "react"; function Seg({ options, value, onChange }: { options: string[]; value: string; onChange: (v: string) => void }) { return ( <div className="flex rounded-md bg-surface-raised p-0.5 text-caption"> {options.map((o) => ( <button key={o} type="button" onClick={() => onChange(o)} aria-pressed={value === o} className={"flex-1 rounded-sm px-3 py-1 transition-colors duration-surface-hover focus-visible:outline focus-visible:outline-1 focus-visible:outline-accent-blue " + (value === o ? "bg-surface-high text-primary font-semibold" : "text-muted")}>{o}</button> ))} </div> ); } function Slider({ value, onChange, label }: { value: number; onChange: (v: number) => void; label: string }) { return ( <div className="relative flex h-4 items-center"> <div className="h-px w-full bg-hairline" /> <div className="absolute h-px bg-accent-blue" style={{ width: value + "%" }} /> <div className="absolute size-3 -translate-x-1/2 rounded-full bg-primary shadow-blue-glow" style={{ left: value + "%" }} /> <input aria-label={label} type="range" min={0} max={100} value={value} onChange={(e) => onChange(+e.target.value)} className="absolute inset-0 w-full cursor-pointer opacity-0" /> </div> ); } function Panel({ title, children, className = "" }: { title: string; children: React.ReactNode; className?: string }) { return ( <div className={"rounded-xl border border-hairline bg-surface p-3 " + className}> <div className="flex items-center justify-between border-b border-hairline pb-3 text-ui font-semibold text-primary"><span>{title}</span><span aria-hidden className="text-muted">×</span></div> <div className="pt-3">{children}</div> </div> ); } function Row({ label, children }: { label: string; children: React.ReactNode }) { return ( <div className="flex items-center justify-between gap-3 py-1.5 pl-3 text-caption text-secondary"><span>{label}</span><div className="w-[134px]">{children}</div></div> ); } function YesNo({ label, initial }: { label: string; initial: boolean }) { const [v, setV] = useState(initial ? "Yes" : "No"); return <Row label={label}><Seg options={["Yes", "No"]} value={v} onChange={setV} /></Row>; } function Caption({ lead, text }: { lead: string; text: string }) { return <p className="text-lead text-secondary"><span className="text-primary">{lead}</span> {text}</p>; } export default function EditorInspectorCards(props: { heading?: string; shaderCaption?: [string, string]; motionCaption?: [string, string]; listCaption?: [string, string]; fontCaption?: [string, string]; }) { const { heading = "Small touches that make the difference", shaderCaption = ["Effects.", "Layer glossy gradients and soft particles onto any shape."], motionCaption = ["Motion.", "Smooth, lightweight transitions that are simple to configure."], listCaption = ["Behavior.", "Hovers and taps that respond the moment someone uses them."], fontCaption = ["Type controls.", "Tune weight and style with fine-grained sliders."] } = props; const [type, setType] = useState("Loop"); const [dim, setDim] = useState("2D"); const [op, setOp] = useState(100); const [sc, setSc] = useState(20); const [wt, setWt] = useState(95); const [it, setIt] = useState(0); const [active, setActive] = useState(2); const items = ["Revenue", "Reports", "Summary", "Outlook"]; const reveal = "motion-safe:animate-[yk-in_1100ms_linear_both]"; return ( <section className="bg-canvas px-6 py-20 font-sans text-primary"> <style>{"@keyframes yk-in{from{opacity:.001;transform:scale(.8)}to{opacity:1;transform:none}}"}</style> <div className="mx-auto max-w-[1200px]"> <h2 className="mb-12 max-w-md text-h2 text-primary">{heading}</h2> <div className="grid overflow-hidden rounded-xl border border-hairline md:grid-cols-6"> <div className={"flex flex-col justify-between gap-8 border-b border-hairline p-6 md:col-span-2 " + reveal}> <div className="flex h-[360px] items-center justify-center"> <div className="relative h-40 w-44"> <div className="absolute left-4 top-0 h-[70px] w-36 -skew-x-[40deg] bg-accent-blue shadow-blue-glow [clip-path:polygon(0_0,100%_0,100%_100%,0_100%)]" style={{ transform: "skewX(-40deg)" }} /> <div className="absolute left-0 top-[84px] h-[70px] w-36 bg-accent-blue shadow-blue-glow" style={{ transform: "skewX(-40deg)" }} /> </div> </div> <Caption lead={shaderCaption[0]} text={shaderCaption[1]} /> </div> <div className={"grid gap-6 border-b border-l border-hairline p-6 md:col-span-4 md:grid-cols-[1fr_260px] " + reveal}> <div className="flex flex-col justify-between gap-8"> <div className="relative mx-auto my-4 size-[280px]"> <div className="absolute inset-0 rounded-full border border-hairline" /> <div className="absolute inset-14 rounded-full border border-dotted border-hairline" /> <div className="absolute left-1/2 top-1/2 size-14 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary" /> {[0, 1, 2, 3, 4, 5].map((i) => { const a = (i * 60 - 90) * Math.PI / 180; return <div key={i} className="absolute size-[58px] rounded-full border border-hairline bg-canvas" style={{ left: 140 + 140 * Math.cos(a) - 29, top: 140 + 140 * Math.sin(a) - 29 }}><div className="m-auto mt-[21px] size-4 rounded-sm border border-muted" /></div>; })} </div> <Caption lead={motionCaption[0]} text={motionCaption[1]} /> </div> <Panel title="Loop Effect" className="max-h-[420px] overflow-hidden [mask-image:linear-gradient(#000_80%,transparent)]"> <Row label="Type"><Seg options={["Loop", "Mirror"]} value={type} onChange={setType} /></Row> <Row label="Opacity"><Slider label="Opacity" value={op} onChange={setOp} /></Row> <Row label="Scale"><Slider label="Scale" value={sc} onChange={setSc} /></Row> <Row label="Rotate"><Seg options={["2D", "3D"]} value={dim} onChange={setDim} /></Row> <Row label="Skew"><div className="rounded-md bg-surface-raised px-2 py-1">0°</div></Row> <Row label="Offset"><div className="rounded-md bg-surface-raised px-2 py-1">0°</div></Row> <Row label="Off Screen"><Seg options={["Play", "Pause"]} value="Pause" onChange={() => {}} /></Row> </Panel> </div> <div className="md:col-span-4"> <div className="grid md:grid-cols-2"> <div className={"flex flex-col justify-between gap-8 border-b border-hairline p-6 " + reveal}> <ul className="mt-10 h-[260px] px-6"> {items.map((t, i) => ( <li key={t} className="border-b border-hairline-soft"> <button type="button" onMouseEnter={() => setActive(i)} onFocus={() => setActive(i)} className={"flex w-full items-center gap-2 py-3 text-left text-h3 transition-colors duration-surface-hover " + (active === i ? "text-primary" : "text-muted")}>{active === i && <span className="size-1.5 rounded-full bg-primary" />}{t}</button> </li> ))} </ul> <Caption lead={listCaption[0]} text={listCaption[1]} /> </div> <div className={"flex flex-col justify-between gap-6 border-b border-l border-hairline p-6 " + reveal}> <Panel title="Variable"> <Row label="Weight"><div className="flex items-center gap-3"><span className="w-12 rounded-md bg-surface-raised px-2 py-1">{Math.round(wt * 9)}</span><div className="w-16"><Slider label="Weight" value={wt} onChange={setWt} /></div></div></Row> <Row label="Italic"><div className="flex items-center gap-3"><span className="w-12 rounded-md bg-surface-raised px-2 py-1">{it ? 1 : 0}</span><div className="w-16"><Slider label="Italic" value={it} onChange={setIt} /></div></div></Row> </Panel> <div className="text-center text-display text-primary" style={{ fontWeight: 100 + wt * 8, fontStyle: it > 50 ? "italic" : "normal" }}>Variable</div> <Caption lead={fontCaption[0]} text={fontCaption[1]} /> </div> </div> <div className={"grid gap-6 p-6 sm:grid-cols-2 " + reveal}> <form className="space-y-3 border border-dashed border-accent-blue p-5" onSubmit={(e) => e.preventDefault()}> <h3 className="text-h3 text-primary">Join the list</h3> <div className="grid grid-cols-2 gap-3 text-caption text-muted"> <label>Name<input className="mt-1 w-full rounded-md bg-surface-raised px-3 py-2 text-ui text-secondary outline-none focus-visible:ring-1 focus-visible:ring-accent-blue" placeholder="Alex Doe" /></label> <label>Email<input className="mt-1 w-full rounded-md bg-surface-raised px-3 py-2 text-ui text-secondary outline-none focus-visible:ring-1 focus-visible:ring-accent-blue" placeholder="alex@mail.com" /></label> </div> <label className="block text-caption text-muted">Location<select className="mt-1 w-full rounded-md bg-surface-raised px-3 py-2 text-ui text-secondary"><option>Select...</option></select></label> <button className="w-full rounded-md bg-surface-high py-2 text-ui font-semibold text-primary">Submit</button> </form> <Panel title="Input"> <Row label="Name"><div className="rounded-md bg-surface-raised px-2 py-1.5">Location</div></Row> <YesNo label="Required" initial /> {["Oslo", "Lisbon"].map((c) => <Row key={c} label=""><div className="flex items-center gap-2 rounded-md bg-surface-raised px-2 py-1"><span className="size-4 rounded-sm bg-accent-blue" />{c}</div></Row>)} </Panel> </div> </div> <div className={"border-l border-hairline p-6 md:col-span-2 " + reveal}> <Panel title="OpenType" className="[mask-image:linear-gradient(#000_90%,transparent)]"> <div className="mb-3 flex h-24 items-center justify-center rounded-md bg-surface-raised text-h2 text-muted">H<sub>2</sub>O</div> <p className="py-2 text-ui font-semibold">Stylistic Sets</p> <YesNo label="Set 1" initial={false} /> <YesNo label="Set 2" initial={false} /> <p className="py-2 text-ui font-semibold">Variants</p> <YesNo label="Alternates" initial={false} /> <YesNo label="Inferiors" initial /> <p className="py-2 text-ui font-semibold">Ligatures</p> <YesNo label="Standard" initial={false} /> <YesNo label="Historical" initial /> </Panel> </div> </div> </div> </section> ); }import { useState } from "react"; function Seg({ options, value, onChange }: { options: string[]; value: string; onChange: (v: string) => void }) { return ( <div className="flex rounded-md bg-secondary p-0.5 text-obsidian-caption"> {options.map((o) => ( <button key={o} type="button" onClick={() => onChange(o)} aria-pressed={value === o} className={"flex-1 rounded-md px-3 py-1 transition-colors duration-obsidian-surface-hover focus-visible:outline focus-visible:outline-1 focus-visible:outline-primary " + (value === o ? "bg-accent text-foreground font-semibold" : "text-muted-foreground")}>{o}</button> ))} </div> ); } function Slider({ value, onChange, label }: { value: number; onChange: (v: number) => void; label: string }) { return ( <div className="relative flex h-4 items-center"> <div className="h-px w-full bg-border" /> <div className="absolute h-px bg-primary" style={{ width: value + "%" }} /> <div className="absolute size-3 -translate-x-1/2 rounded-full bg-foreground shadow-obsidian-blue-glow" style={{ left: value + "%" }} /> <input aria-label={label} type="range" min={0} max={100} value={value} onChange={(e) => onChange(+e.target.value)} className="absolute inset-0 w-full cursor-pointer opacity-0" /> </div> ); } function Panel({ title, children, className = "" }: { title: string; children: React.ReactNode; className?: string }) { return ( <div className={"rounded-2xl border border-border bg-card p-3 " + className}> <div className="flex items-center justify-between border-b border-border pb-3 text-obsidian-ui font-semibold text-foreground"><span>{title}</span><span aria-hidden className="text-muted-foreground">×</span></div> <div className="pt-3">{children}</div> </div> ); } function Row({ label, children }: { label: string; children: React.ReactNode }) { return ( <div className="flex items-center justify-between gap-3 py-1.5 pl-3 text-obsidian-caption text-muted-foreground"><span>{label}</span><div className="w-[134px]">{children}</div></div> ); } function YesNo({ label, initial }: { label: string; initial: boolean }) { const [v, setV] = useState(initial ? "Yes" : "No"); return <Row label={label}><Seg options={["Yes", "No"]} value={v} onChange={setV} /></Row>; } function Caption({ lead, text }: { lead: string; text: string }) { return <p className="text-obsidian-lead text-muted-foreground"><span className="text-foreground">{lead}</span> {text}</p>; } export default function EditorInspectorCards(props: { heading?: string; shaderCaption?: [string, string]; motionCaption?: [string, string]; listCaption?: [string, string]; fontCaption?: [string, string]; }) { const { heading = "Small touches that make the difference", shaderCaption = ["Effects.", "Layer glossy gradients and soft particles onto any shape."], motionCaption = ["Motion.", "Smooth, lightweight transitions that are simple to configure."], listCaption = ["Behavior.", "Hovers and taps that respond the moment someone uses them."], fontCaption = ["Type controls.", "Tune weight and style with fine-grained sliders."] } = props; const [type, setType] = useState("Loop"); const [dim, setDim] = useState("2D"); const [op, setOp] = useState(100); const [sc, setSc] = useState(20); const [wt, setWt] = useState(95); const [it, setIt] = useState(0); const [active, setActive] = useState(2); const items = ["Revenue", "Reports", "Summary", "Outlook"]; const reveal = "motion-safe:animate-[yk-in_1100ms_linear_both]"; return ( <section className="bg-background px-6 py-20 font-sans text-foreground"> <style>{"@keyframes yk-in{from{opacity:.001;transform:scale(.8)}to{opacity:1;transform:none}}"}</style> <div className="mx-auto max-w-[1200px]"> <h2 className="mb-12 max-w-md text-obsidian-h2 text-foreground">{heading}</h2> <div className="grid overflow-hidden rounded-2xl border border-border md:grid-cols-6"> <div className={"flex flex-col justify-between gap-8 border-b border-border p-6 md:col-span-2 " + reveal}> <div className="flex h-[360px] items-center justify-center"> <div className="relative h-40 w-44"> <div className="absolute left-4 top-0 h-[70px] w-36 -skew-x-[40deg] bg-primary shadow-obsidian-blue-glow [clip-path:polygon(0_0,100%_0,100%_100%,0_100%)]" style={{ transform: "skewX(-40deg)" }} /> <div className="absolute left-0 top-[84px] h-[70px] w-36 bg-primary shadow-obsidian-blue-glow" style={{ transform: "skewX(-40deg)" }} /> </div> </div> <Caption lead={shaderCaption[0]} text={shaderCaption[1]} /> </div> <div className={"grid gap-6 border-b border-l border-border p-6 md:col-span-4 md:grid-cols-[1fr_260px] " + reveal}> <div className="flex flex-col justify-between gap-8"> <div className="relative mx-auto my-4 size-[280px]"> <div className="absolute inset-0 rounded-full border border-border" /> <div className="absolute inset-14 rounded-full border border-dotted border-border" /> <div className="absolute left-1/2 top-1/2 size-14 -translate-x-1/2 -translate-y-1/2 rounded-full bg-foreground" /> {[0, 1, 2, 3, 4, 5].map((i) => { const a = (i * 60 - 90) * Math.PI / 180; return <div key={i} className="absolute size-[58px] rounded-full border border-border bg-background" style={{ left: 140 + 140 * Math.cos(a) - 29, top: 140 + 140 * Math.sin(a) - 29 }}><div className="m-auto mt-[21px] size-4 rounded-md border border-muted-foreground" /></div>; })} </div> <Caption lead={motionCaption[0]} text={motionCaption[1]} /> </div> <Panel title="Loop Effect" className="max-h-[420px] overflow-hidden [mask-image:linear-gradient(#000_80%,transparent)]"> <Row label="Type"><Seg options={["Loop", "Mirror"]} value={type} onChange={setType} /></Row> <Row label="Opacity"><Slider label="Opacity" value={op} onChange={setOp} /></Row> <Row label="Scale"><Slider label="Scale" value={sc} onChange={setSc} /></Row> <Row label="Rotate"><Seg options={["2D", "3D"]} value={dim} onChange={setDim} /></Row> <Row label="Skew"><div className="rounded-md bg-secondary px-2 py-1">0°</div></Row> <Row label="Offset"><div className="rounded-md bg-secondary px-2 py-1">0°</div></Row> <Row label="Off Screen"><Seg options={["Play", "Pause"]} value="Pause" onChange={() => {}} /></Row> </Panel> </div> <div className="md:col-span-4"> <div className="grid md:grid-cols-2"> <div className={"flex flex-col justify-between gap-8 border-b border-border p-6 " + reveal}> <ul className="mt-10 h-[260px] px-6"> {items.map((t, i) => ( <li key={t} className="border-b border-border"> <button type="button" onMouseEnter={() => setActive(i)} onFocus={() => setActive(i)} className={"flex w-full items-center gap-2 py-3 text-left text-obsidian-h3 transition-colors duration-obsidian-surface-hover " + (active === i ? "text-foreground" : "text-muted-foreground")}>{active === i && <span className="size-1.5 rounded-full bg-foreground" />}{t}</button> </li> ))} </ul> <Caption lead={listCaption[0]} text={listCaption[1]} /> </div> <div className={"flex flex-col justify-between gap-6 border-b border-l border-border p-6 " + reveal}> <Panel title="Variable"> <Row label="Weight"><div className="flex items-center gap-3"><span className="w-12 rounded-md bg-secondary px-2 py-1">{Math.round(wt * 9)}</span><div className="w-16"><Slider label="Weight" value={wt} onChange={setWt} /></div></div></Row> <Row label="Italic"><div className="flex items-center gap-3"><span className="w-12 rounded-md bg-secondary px-2 py-1">{it ? 1 : 0}</span><div className="w-16"><Slider label="Italic" value={it} onChange={setIt} /></div></div></Row> </Panel> <div className="text-center text-obsidian-display text-foreground" style={{ fontWeight: 100 + wt * 8, fontStyle: it > 50 ? "italic" : "normal" }}>Variable</div> <Caption lead={fontCaption[0]} text={fontCaption[1]} /> </div> </div> <div className={"grid gap-6 p-6 sm:grid-cols-2 " + reveal}> <form className="space-y-3 border border-dashed border-primary p-5" onSubmit={(e) => e.preventDefault()}> <h3 className="text-obsidian-h3 text-foreground">Join the list</h3> <div className="grid grid-cols-2 gap-3 text-obsidian-caption text-muted-foreground"> <label>Name<input className="mt-1 w-full rounded-md bg-secondary px-3 py-2 text-obsidian-ui text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-primary" placeholder="Alex Doe" /></label> <label>Email<input className="mt-1 w-full rounded-md bg-secondary px-3 py-2 text-obsidian-ui text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-primary" placeholder="alex@mail.com" /></label> </div> <label className="block text-obsidian-caption text-muted-foreground">Location<select className="mt-1 w-full rounded-md bg-secondary px-3 py-2 text-obsidian-ui text-muted-foreground"><option>Select...</option></select></label> <button className="w-full rounded-md bg-accent py-2 text-obsidian-ui font-semibold text-foreground">Submit</button> </form> <Panel title="Input"> <Row label="Name"><div className="rounded-md bg-secondary px-2 py-1.5">Location</div></Row> <YesNo label="Required" initial /> {["Oslo", "Lisbon"].map((c) => <Row key={c} label=""><div className="flex items-center gap-2 rounded-md bg-secondary px-2 py-1"><span className="size-4 rounded-md bg-primary" />{c}</div></Row>)} </Panel> </div> </div> <div className={"border-l border-border p-6 md:col-span-2 " + reveal}> <Panel title="OpenType" className="[mask-image:linear-gradient(#000_90%,transparent)]"> <div className="mb-3 flex h-24 items-center justify-center rounded-md bg-secondary text-obsidian-h2 text-muted-foreground">H<sub>2</sub>O</div> <p className="py-2 text-obsidian-ui font-semibold">Stylistic Sets</p> <YesNo label="Set 1" initial={false} /> <YesNo label="Set 2" initial={false} /> <p className="py-2 text-obsidian-ui font-semibold">Variants</p> <YesNo label="Alternates" initial={false} /> <YesNo label="Inferiors" initial /> <p className="py-2 text-obsidian-ui font-semibold">Ligatures</p> <YesNo label="Standard" initial={false} /> <YesNo label="Historical" initial /> </Panel> </div> </div> </div> </section> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.