Distortion✨ Premium

Retro Desktop UI

A small style kit in a 90s desktop look: bevelled grey window, blue gradient title bar, buttons that press in on click and a sunken input field.

CSSBordersRetro

Updated

This effect is part of Effect.Labs — 840 vanilla effects, some free, some premium. Distortion has 31 effects, including 5 free. Explore the category →

3 usage examples

"Move to bin?" confirmation on a desktop-style portfolio — Retro Desktop UI example 1

① "Move to bin?" confirmation on a desktop-style portfolio

WhenAn illustrator's portfolio imitates a desktop with icons. Clicking the Bin opens the kit's confirmation box: warning icon, question about the file, "Yes" (main) and "No" buttons.
WhyThe kit gives a period-accurate dialog in a few tags: visitors recognise the gesture at once, and the retro wink serves the portfolio's personality.
Settings--rdk-w: 280px, --rdk-root-h: 0, --rdk-page: transparent; a single title-bar button, no field. The scene shows the root on click and gives it role="alertdialog"; "No" and "X" close it. For the capture, the scene opens the box by itself right after loading, as if the Bin had been clicked.
A computer museum's page held in a large window — Retro Desktop UI example 2

② A computer museum's page held in a large window

WhenA computer museum's site fits in one large kit window: on the left, a menu made of bevelled buttons (Exhibitions, Collections, Visit, Tickets); on the right, a sunken panel whose content changes on click.
WhyThe kit's buttons, which press in on click, become a tactile and readable navigation; the full-size window turns the whole page into an exhibit.
Settings--rdk-w: 100%, window at height: 100%, buttons in a 152 px column. Panel switching and aria-current="page" are wired by the scene; the kit only provides the styles.
Newsletter sign-up for a retro gaming club — Retro Desktop UI example 3

③ Newsletter sign-up for a retro gaming club

WhenOn a gaming club's page, a "Signup.exe" window in purple tones asks for an e-mail address. The visitor types into the sunken field, ticks the tournaments box and confirms with "Sign up".
WhyA very short form gains character: the sunken field and the black-framed main button guide the eye, and the dotted focus shows where you type.
Settings--rdk-w: 340px, --rdk-title-a: #5b21b6, --rdk-title-b: #a855f7; field in type="email" with an e-mail aria-label. For the capture, the scene types the address into the field letter by letter.

How it works

Everything rests on two-colour borders. A "raised" surface has white top and left edges and grey bottom and right edges (border-color: #fff gray gray #fff); a "sunken" surface reverses the order. The .rdk-window (280 px, silver grey) is raised; the .rdk-input field is sunken; the .rdk-titlebar goes from navy to #1084d0.

The .rdk-btn buttons and the small .rdk-titlebar-btn title-bar buttons are raised. While pressed (:active), their borders flip; on .rdk-btn, the text also shifts one pixel down and right: the button seems to sink. The main .rdk-primary button has a 3 px black frame and an inner rim.

With the keyboard, focus shows as a black dotted line inside the button, as on desktops of the time (the old version removed every focus outline). It is a style kit without JavaScript: the buttons have no action of their own, it is up to you to wire them to your code. Combine window, buttons and field freely.

Accessibility

  • Real controls: real <button type="button"> elements and a real <input>, reachable with Tab; Enter or Space activates them, and the pressed look also shows while Space is held.
  • Visible focus: black dotted line inside the buttons (:focus-visible) and around the field (:focus).
  • Accessible names: the "_", "□", "X" buttons have an aria-label (Minimize, Maximize, Close) and their symbol is hidden; the field has aria-label="Command". Adapt those labels to your use.
  • No animation: nothing moves apart from pressing; the reduced-motion setting has nothing to remove.

Browser compatibility

CSS only, no dependency. The most recent feature is gap in a flex box (Chrome 84, Firefox 63, Safari 14.1 according to MDN data); the buttons' dotted focus uses :focus-visible (Chrome 86, Firefox 85, Safari 15.4). Measured in Chromium 151, Firefox 153 and WebKit 26.5: Tab reaches the buttons and the field with a dotted outline, two independent copies, fluid width up to 100 %.

Chrome 84+✓ Full (measured)
Firefox 63+✓ Full (measured)
Safari 14.1+✓ Full (measured in WebKit)
Edge 84+✓ Full
Mobile iOS 14.5+✓ Full
Android Chrome 84+✓ Full

Without :focus-visible, the buttons keep the browser's default focus outline instead of the dotted line. In Safari for Mac, Tab only stops on buttons when the "Press Tab to highlight each item" option is on (a browser setting).

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0279-root">
  <div class="rdk-window">
    <div class="rdk-titlebar">
      <span>Welcome.exe</span>
      <div class="rdk-titlebar-buttons">
        <button type="button" class="rdk-titlebar-btn" aria-label="Minimize"><span aria-hidden="true">_</span></button>
        <button type="button" class="rdk-titlebar-btn" aria-label="Maximize"><span aria-hidden="true">□</span></button>
        <button type="button" class="rdk-titlebar-btn" aria-label="Close"><span aria-hidden="true">X</span></button>
      </div>
    </div>
    <div class="rdk-body">
      <p>Welcome to the desktop!</p>
      <input class="rdk-input" type="text" value="C:\HOME\&gt;" aria-label="Command">
      <div class="rdk-btn-row">
        <button type="button" class="rdk-btn rdk-primary">OK</button>
        <button type="button" class="rdk-btn">Cancel</button>
      </div>
    </div>
  </div>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Window width (CSS — --rdk-w) 280 px 100% fills the parent; add height: 100% on .rdk-window for a full-size window.
Surface grey (CSS — --rdk-face) silver A warmer grey (#d4d0c8) recalls other desktops of the same era; window and buttons follow.
Title bar (CSS — --rdk-title-a, --rdk-title-b) navy → #1084d0 Two brand colours; keep white text readable on the start colour.
Font (CSS — --rdk-font) "Courier New", monospace A sans-serif font (sans-serif) looks closer to the original desktops.
Elements (HTML — .rdk-titlebar-btn, .rdk-btn, .rdk-primary, .rdk-input) 3 title buttons, OK, Cancel, one field Remove what you do not need, duplicate the rest: each class keeps its style outside the window, as long as it stays inside .fx-0279-root.
Accessible labels (HTML — aria-label) Minimize, Maximize, Close, Command Replace them with what your buttons and field actually do.
Demo frame (CSS — --rdk-page, --rdk-root-h) #0a0a0f, at least 300 px tall transparent and 0 drop the kit into your page.

FAQ

No, it is a style kit: they press in but have no action. Add your own listeners, for example closeBtn.addEventListener('click', () => win.hidden = true).
Put the window inside a <dialog> element opened with showModal(): the browser handles focus, the Escape key and the inert background. Give the <dialog> an aria-labelledby pointing to the title-bar text.
It is the focus sign of desktops of that era, drawn inside the button so it does not break the bevel. It only shows when navigating with the keyboard, not on mouse clicks.