Design manual

Everything you need to make Torpio pages look like Torpio. One CSS file, plain HTML classes, no build step.

Contents


Getting started

Add one line to the <head> of your page:

<link rel="stylesheet" href="https://torp.io/torpio.css">

All classes are short and readable. All design values are CSS variables that start with --t-. You can override them in your own styles.


Principles

Simple

Remove before you add. One primary action per view.

Clear

Plain words, strong contrast, generous whitespace.

Consistent

Use the tokens and components. Do not invent new ones for one page.

Logo

The logo is torp + io. The “io” means input/output and is drawn as a bar and a ring, like 1 and 0. It always has its own colour, --t-io.

Torpio logo

On light — logo.svg

Torpio logo, white

On dark — logo-white.svg

Torpio mark

Icon / favicon — mark.svg

Animation. On the home page the “io” switches on: the “i” grows, its dot pops in, and the “o” draws itself. To use it, put the logo SVG inline (copy it from /index.html) and add class="logo-animated". It is turned off for people who prefer reduced motion.

See the logo concepts we explored →


Colors

Deep blue is the brand color. Use it for actions and highlights. Use neutrals for everything else.

Brand

Blue 900
#0b1a4a

Blue 700
#142f8f

Blue 600 · primary
#1d3fbf

IO blue · logo
#3b6cf6

Blue 100
#e6ecfb

Blue 50
#f3f6fd

Neutrals & status

Gray 900
#111827

Gray 500
#6b7280

Gray 300
#d1d5db

Success
#15803d

Warning
#b45309

Danger
#b91c1c


Typography

We use the system font of the device. It is fast and needs no downloads.

Heading 1

Heading 2

Heading 3

Heading 4

Lead text for introductions.

Body text. Keep lines short and sentences simple. This is a link and this is inline code.

Muted text for secondary information.

<h1>Heading 1</h1>
<p class="lead">Lead text</p>
<p class="muted">Muted text</p>

Spacing

Spacing uses a 4px scale. Use the variables, not raw numbers.

VariableValueSize
--t-14px
--t-28px
--t-416px
--t-624px
--t-832px
--t-1664px

Layout

ClassUse
.containerCenters content with a max width.
.section / .section-altVertical page section. -alt adds a light blue background.
.gridResponsive columns. Wraps automatically on small screens.
.rowHorizontal group with a gap, for example buttons.
.stackVertical spacing between children.
.header / .nav / .footerPage header, navigation and footer.
<section class="section">
  <div class="container">
    <div class="grid">
      <div class="card">…</div>
      <div class="card">…</div>
    </div>
  </div>
</section>

Buttons

Use one primary button per view. Use secondary or ghost for other actions.

<button class="btn">Primary</button>
<button class="btn btn-secondary">Secondary</button>
<button class="btn btn-ghost">Ghost</button>
<button class="btn btn-danger">Danger</button>
<a class="btn btn-lg" href="#">Link as button</a>

Cards

Card

A bordered box for grouped content.

Raised card

Uses a shadow instead of a border.

<div class="card">…</div>
<div class="card card-raised">…</div>

Tables

Wrap tables in .table-wrap so they scroll on small screens. Use .num for numbers.

ProjectClientStatusHours
Platform setupAcme ASDone120
API redesignNordlysActive64
Cloud reviewFjord TechWaiting8
<div class="table-wrap">
  <table class="table table-striped table-hover">
    <thead><tr><th>Project</th><th class="num">Hours</th></tr></thead>
    <tbody><tr><td>Platform setup</td><td class="num">120</td></tr></tbody>
  </table>
</div>

Forms

Enter a valid email address.
Optional.
<div class="field">
  <label class="label" for="name">Name</label>
  <input class="input" id="name">
  <span class="hint">Help text</span>
</div>
<select class="select">…</select>
<textarea class="textarea"></textarea>
<label class="check"><input type="checkbox"> Label</label>
<!-- Add .is-invalid to an input to show an error -->

Alerts & badges

Info. Something you should know.
Success. The change is saved.
Warning. Check this before you continue.
Error. Something went wrong.
Default Success Warning Danger
<div class="alert alert-success">…</div>
<span class="badge badge-warning">Waiting</span>

Status

A status pill shows availability. Add .status-busy when you are booked.

Available for new projects

Booked until March

<p class="status"><span class="status-dot"></span>Available for new projects</p>
<p class="status status-busy"><span class="status-dot"></span>Booked until March</p>

Terminal

A terminal window for showing commands and code. The home page adds a small script that types the text automatically.

$ torpio build
// turning input into output
✓ built in 0.42s
<div class="terminal">
  <div class="terminal-bar"><span></span><span></span><span></span></div>
  <pre class="terminal-body"><span class="prompt">$ torpio build</span>
<span class="comment">// a comment</span>
<span class="ok">✓ done</span><span class="cursor"></span></pre>
</div>