Forms & inputs / Text fields

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.

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>
  );
}

Quality checks

Automated, in a real browser · today
—

More from Embossed Lab Monochrome

The whole style →

Pictogram Mega Nav Bar

Headers & nav bars

Centered Link Footer

Footers

Embossed Advent Tile Grid

Feature sections

Embossed Relief Tile

Cards

Centered Uppercase Intro Panel

Heroes

Quiet Countdown Readout

Stats & metrics