<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Timon Franke</title>
    <description>The latest articles on DEV Community by Timon Franke (@tijeyyy).</description>
    <link>https://dev.to/tijeyyy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4141032%2F30871e0c-f0ed-4177-884c-f0375f434797.jpg</url>
      <title>DEV Community: Timon Franke</title>
      <link>https://dev.to/tijeyyy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tijeyyy"/>
    <language>en</language>
    <item>
      <title>I rebuilt the iPhone 3GS UI as a React library, and here is the CSS recipe</title>
      <dc:creator>Timon Franke</dc:creator>
      <pubDate>Thu, 24 Sep 2026 10:41:44 +0000</pubDate>
      <link>https://dev.to/tijeyyy/i-rebuilt-the-iphone-3gs-ui-as-a-react-library-and-here-is-the-css-recipe-published-3kjp</link>
      <guid>https://dev.to/tijeyyy/i-rebuilt-the-iphone-3gs-ui-as-a-react-library-and-here-is-the-css-recipe-published-3kjp</guid>
      <description>&lt;p&gt;I wanted to know how much of the old iOS look was actual method and how much was just taste. So I rebuilt it: 23 React components in the iPhone 3GS style, from the nav bar down to the on-screen&lt;br&gt;
keyboard.&lt;/p&gt;

&lt;p&gt;Turns out it is almost entirely method. One gradient recipe explains nearly every control on that device. Here it is, then the parts that took me longer than expected.&lt;/p&gt;
&lt;h2&gt;
  
  
  The gel is four layers
&lt;/h2&gt;

&lt;p&gt;Buttons, the nav bar, the ON/OFF switch, the tab bar. All the same four things, different colours:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* 1. the shine, kept as its own layer so any body colour can wear it */&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.12&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="m"&gt;50.5%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c"&gt;/* the hard stop, this is what matters */&lt;/span&gt;
      &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="c"&gt;/* 2. the body, split at the same point */&lt;/span&gt;
    &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#8fb8f5&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#4d8ae4&lt;/span&gt; &lt;span class="m"&gt;49%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#2a6bd2&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#1d55b5&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c"&gt;/* 3. hard outline plus a light inner rim */&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nb"&gt;inset&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.22&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c"&gt;/* the lit top edge */&lt;/span&gt;
    &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.75&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;              &lt;span class="c"&gt;/* it sits on something */&lt;/span&gt;

  &lt;span class="c"&gt;/* 4. type stamped into the surface, not floating above it */&lt;/span&gt;
  &lt;span class="nl"&gt;text-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;-1px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.7&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The discontinuity at 50 percent is what your eye reads as glass. Smooth that gradient out and you get flat design with a shadow on it. Keep the hard edge and the surface looks wet.&lt;/p&gt;

&lt;p&gt;The text shadow is the other half. Light comes from above, so the label is debossed with a dark shadow pointing up, never down. I had this backwards for an hour and could not work out why everything looked slightly wrong.&lt;/p&gt;

&lt;p&gt;Pressed state is the same thing without the shine, plus an inset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#17427f&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#1f56a8&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#2b66bf&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inset&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tokens turn a costume into a system
&lt;/h2&gt;

&lt;p&gt;If every component hard-codes those gradients, you have a costume. So each value is a CSS custom property and components just compose them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.gs-button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--gs-button-gel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-gradient-neutral&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--gs-button-text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-text-on-neutral&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-gloss&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-button-gel&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-border&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-emboss&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-button-text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;text-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--gs-text-shadow-on-neutral&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That pays off with the second theme. iOS 3 had two chromes, the black glass one and the original blue-grey, and the light theme here is one file of token overrides:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.gs-root&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;data-theme&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"light"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--gs-gradient-bar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="m"&gt;#b0bccd&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#8a9bb4&lt;/span&gt; &lt;span class="m"&gt;49%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#6d84a2&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#5b7397&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--gs-bar-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#2d3642&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--gs-bar-rim&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.45&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--gs-text-emboss&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;.75&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c"&gt;/* shadow flips downward */&lt;/span&gt;
  &lt;span class="c"&gt;/* about 36 more */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The mistake
&lt;/h3&gt;

&lt;p&gt;My first attempt remapped the raw tokens. In light mode &lt;code&gt;--gs-gradient-dark&lt;/code&gt; became a light gradient. Everything went pale, including things that were black on the real device in both appearances: the tab bar, and the saturated app icon tiles in list rows.&lt;/p&gt;

&lt;p&gt;The fix was a semantic layer. Raw tokens keep their literal meaning in every theme, so &lt;code&gt;--gs-gradient-dark&lt;/code&gt; is always dark. Components read intent instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--gs-gradient-neutral&lt;/code&gt; for a default control surface&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--gs-gradient-barbutton&lt;/code&gt; for a button inside a bar&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--gs-text-on-bar&lt;/code&gt; and &lt;code&gt;--gs-text-emboss&lt;/code&gt; for text on those surfaces&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Themes only redefine the semantic ones. Anything that has to stay constant simply does not use them. Adding a third theme is now one file, and no component changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The components that were actually hard
&lt;/h2&gt;

&lt;p&gt;The switch is not a toggle with a knob on top. It is a strip twice the track width, holding the blue ON half and the grey OFF half, sliding underneath a fixed silver knob with &lt;code&gt;overflow: hidden&lt;/code&gt; on the track. That is how the original behaves, and it is why the label looks pushed out of view rather than faded out.&lt;/p&gt;

&lt;p&gt;The picker, meaning the spinning wheel, is &lt;code&gt;scroll-snap-type: y mandatory&lt;/code&gt; with 44px rows, spacer elements at both ends so the first and last option can reach the centre, and two absolutely&lt;br&gt;
positioned shading overlays to fake the cylinder. The annoying part is that selection and scroll position drive each other. Committing a value scrolls the drum, and scrolling commits a value. You need a guard, in my case a 150ms window after a programmatic scroll where scroll events are ignored, or it loops forever.&lt;/p&gt;

&lt;p&gt;The keyboard has three layers, shift with caps lock, delete auto-repeat and the enlarged key popup. The non-obvious bit: every key has to call &lt;code&gt;preventDefault()&lt;/code&gt; on pointerdown, otherwise tapping it blurs the field you are typing into.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then it got out of hand
&lt;/h2&gt;

&lt;p&gt;A component gallery is a dull way to show a design system, so the docs site got a text field. Paste a URL and it rebuilds that site as a 2009 iPhone app.&lt;/p&gt;

&lt;p&gt;A serverless function fetches the page and pulls out structure: title, icons, nav links, headings, body copy, prices, FAQ pairs, forms. That gets mapped to a spec object which the client renders with the components. The result is navigable rather than a screenshot. Tabs open real pages, rows push screens with a back button, search runs the site's own search, and forms are editable.&lt;/p&gt;

&lt;p&gt;Two things were harder than I expected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feed pages.&lt;/strong&gt; Hacker News is a table layout from 2007 with no &lt;code&gt;article&lt;/code&gt; element anywhere, and my prose-oriented extractor found nothing at all. Special-casing it would have been useless, so the&lt;br&gt;
detection is structural: group every candidate link by a signature made of its own tag plus three ancestors, ignore generated class names like &lt;code&gt;css-1x2y3z&lt;/code&gt;, then take the dominant repeated pattern.&lt;br&gt;
HN's &lt;code&gt;A &amp;lt; SPAN.titleline &amp;lt; TD.title &amp;lt; TR.athing&lt;/code&gt; and a modern blog's &lt;code&gt;A &amp;lt; H2 &amp;lt; ARTICLE&lt;/code&gt; both fall out of the same rule. Lobsters, GitHub Trending and changelogs came along for free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accepting arbitrary URLs is an SSRF machine.&lt;/strong&gt; The fetcher re-resolves DNS on every redirect hop and refuses loopback, private ranges, link-local including &lt;code&gt;169.254.169.254&lt;/code&gt;, CGNAT, and the&lt;br&gt;
IPv4-mapped IPv6 versions of all of those. Then a read cap that truncates instead of failing, an 8 second timeout, and rate limiting per IP. If you ever build something that fetches a user-supplied URL, validate after each redirect rather than once at the start. That is the hole most implementations leave open.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do
&lt;/h2&gt;

&lt;p&gt;Client-rendered pages come back thin, because there is nothing in the HTML to read. Some hosts block the fetcher. And it is a caricature, not a port, so please do not ship your SaaS dashboard in 2009 gel.&lt;/p&gt;

&lt;p&gt;It is about 22kB of JS and 27kB of CSS gzipped, one dependency (lucide, for icons), MIT licensed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try it on your own site: &lt;a href="https://design-system-3gs.vercel.app" rel="noopener noreferrer"&gt;design-system-3gs.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hacker News as a 2009 news app: &lt;a href="https://design-system-3gs.vercel.app/p/news.ycombinator.com" rel="noopener noreferrer"&gt;/p/news.ycombinator.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/TimonBozzApps/design-system-3gs" rel="noopener noreferrer"&gt;github.com/TimonBozzApps/design-system-3gs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;npm i @3gs/ui&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>css</category>
      <category>webdev</category>
      <category>design</category>
    </item>
  </channel>
</rss>
