Floating Label Square Field
Sharp-cornered 1px black bordered input, 60px tall, with a tiny grey label pinned top-left inside.
Rebuilt from teenage.engineering/newsletter in the Embossed Lab Monochrome style.
npx shadcn@latest add https://justyoink.it/r/embossed-lab-monochrome/blocks/outlined-email-field.json
Looks exactly like teenage.engineering: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/embossed-lab-monochrome/mine/outlined-email-field.json
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
Props: heading, description, label (the small floating field label), consentText, linkText, buttonText. All have defaults, so it renders with no props; the field border darkens with an inner ring on focus.
components/outlined-email-field.tsx
import { useState } from "react"; export default function FloatingLabelSquareField({ heading = "stay in the loop", description = "leave your address and we will send occasional notes on new releases, workshop dates, and small studio stories.", label = "address", consentText = "yes, please contact me by mail and I accept the", linkText = "terms of use.", buttonText = "sign me up", }: { heading?: string; description?: string; label?: string; consentText?: string; linkText?: string; buttonText?: string; }) { const [value, setValue] = useState(""); const [checked, setChecked] = useState(false); return ( <section className="bg-canvas-light bg-white px-4 py-16 sm:py-24"> <form className="mx-auto flex w-full max-w-[720px] flex-col items-stretch text-center font-sans text-ink" onSubmit={(e) => e.preventDefault()} > <h2 className="font-display text-h1 font-light lowercase">{heading}</h2> <p className="mx-auto mt-4 max-w-[680px] text-body-lg font-light text-muted">{description}</p> <div className="relative mt-8 h-[60px] text-left"> <input id="ff-field" type="email" value={value} onChange={(e) => setValue(e.target.value)} className="peer h-full w-full rounded-none border border-ink bg-white px-[15px] pt-5 text-field text-ink outline-none transition-shadow duration-tile-hover focus:shadow-[inset_0_0_0_1px_var(--color-ink)] focus-visible:shadow-[inset_0_0_0_1px_var(--color-ink)]" /> <label htmlFor="ff-field" className="pointer-events-none absolute left-[15px] top-[8px] text-caption text-muted"> {label} </label> </div> <label className="mt-8 flex cursor-pointer items-center gap-4 text-left text-body-lg font-light"> <input type="checkbox" checked={checked} onChange={(e) => setChecked(e.target.checked)} className="h-[30px] w-[30px] shrink-0 appearance-none rounded-none border border-surface-muted bg-white checked:bg-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink" /> <span> {consentText} <a href="#" className="underline">{linkText}</a> * </span> </label> <button type="submit" className="mt-6 h-[74px] w-full rounded-none bg-ink text-nav-title font-light text-on-dark transition-opacity duration-tile-hover hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ink" > {buttonText} </button> </form> </section> ); }import { useState } from "react"; export default function FloatingLabelSquareField({ heading = "stay in the loop", description = "leave your address and we will send occasional notes on new releases, workshop dates, and small studio stories.", label = "address", consentText = "yes, please contact me by mail and I accept the", linkText = "terms of use.", buttonText = "sign me up", }: { heading?: string; description?: string; label?: string; consentText?: string; linkText?: string; buttonText?: string; }) { const [value, setValue] = useState(""); const [checked, setChecked] = useState(false); return ( <section className="bg-canvas-light bg-foreground px-4 py-16 sm:py-24"> <form className="mx-auto flex w-full max-w-[720px] flex-col items-stretch text-center font-mono text-foreground" onSubmit={(e) => e.preventDefault()} > <h2 className="font-mono text-embossed-h1 font-light lowercase">{heading}</h2> <p className="mx-auto mt-4 max-w-[680px] text-embossed-body-lg font-light text-muted-foreground">{description}</p> <div className="relative mt-8 h-[60px] text-left"> <input id="ff-field" type="email" value={value} onChange={(e) => setValue(e.target.value)} className="peer h-full w-full rounded-none border border-foreground bg-foreground px-[15px] pt-5 text-embossed-field text-background outline-none transition-shadow duration-embossed-tile-hover focus:shadow-[inset_0_0_0_1px_var(--color-foreground)] focus-visible:shadow-[inset_0_0_0_1px_var(--color-foreground)]" /> <label htmlFor="ff-field" className="pointer-events-none absolute left-[15px] top-[8px] text-embossed-caption text-muted-foreground"> {label} </label> </div> <label className="mt-8 flex cursor-pointer items-center gap-4 text-left text-embossed-body-lg font-light"> <input type="checkbox" checked={checked} onChange={(e) => setChecked(e.target.checked)} className="h-[30px] w-[30px] shrink-0 appearance-none rounded-none border border-foreground bg-foreground checked:bg-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-foreground" /> <span> {consentText} <a href="#" className="underline">{linkText}</a> * </span> </label> <button type="submit" className="mt-6 h-[74px] w-full rounded-none bg-foreground text-embossed-nav-title font-light text-background transition-opacity duration-embossed-tile-hover hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground" > {buttonText} </button> </form> </section> ); }
Quality checks
Automated, in a real browser · today- 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: not passedElements must meet minimum color contrast ratio thresholds (2 elements)
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.