Skip to content
VinUIComponentsTypography

Typography

Headings, paragraphs, lists, quotes, inline code and links in the style's type. Same markup and props in every style: switch the style in the header to see it change.

Headings

Four sizes. Each style sets its own heading face: a serif in Editorial, hand lettering in Paper, Markdown marks in Terminal.

Build faster with VinUI

Eight styles, one API

Pick an accent colour

Copy the code
typography-headings.html
<div style="display: grid; gap: 14px; width: 100%; max-width: 520px">
  <h2 class="vin-h1">Build faster with VinUI</h2>
  <h3 class="vin-h2">Eight styles, one API</h3>
  <h4 class="vin-h3">Pick an accent colour</h4>
  <h5 class="vin-h4">Copy the code</h5>
</div>

Text

A lead paragraph, body text with a link and inline code, muted text and small print.

Components you copy into your project, in the style you choose.

Run npx @vinish/ui init once, then add what you need. Read the installation guide for the details.

Works with plain HTML and with React.

MIT licence. Free forever.

typography-text.html
<div style="display: grid; gap: 14px; width: 100%; max-width: 520px">
  <p class="vin-lead">Components you copy into your project, in the style you choose.</p>
  <p class="vin-p">Run <code class="vin-code">npx @vinish/ui init</code> once, then add what you need. Read the <a class="vin-link" href="#">installation guide</a> for the details.</p>
  <p class="vin-muted">Works with plain HTML and with React.</p>
  <p class="vin-small">MIT licence. Free forever.</p>
</div>

Prose

Wrap Markdown or CMS output in .vin-prose and the plain tags inside are styled and spaced.

Getting started

VinUI gives you components as code you own. Nothing to update behind your back, and no node_modules to fight with.

  • Choose one of eight styles.
  • Set your accent colour.
  • Add the components you need.
Good defaults, and every line is yours to change.

Next, see theming.

typography-prose.html
<article class="vin-prose" style="width: 100%; max-width: 520px">
  <h2>Getting started</h2>
  <p>VinUI gives you components as code you own. Nothing to update behind your back, and no <code>node_modules</code> to fight with.</p>
  <ul>
    <li>Choose one of eight styles.</li>
    <li>Set your accent colour.</li>
    <li>Add the components you need.</li>
  </ul>
  <blockquote>Good defaults, and every line is yours to change.</blockquote>
  <p>Next, see <a href="#">theming</a>.</p>
</article>

Installation

React, Vue and Svelte: add the component to your project with the CLI. It reads your framework from vin.json and also copies any component this one needs. Then import it:

Terminal
npx @vinish/ui add typography
React
import { Heading, Text, Blockquote, List, Code, Link, Prose } from "@/components/vin/typography";
Vue
import Heading, { Text, Blockquote, List, Code, Link, Prose } from "@/components/vin/typography.vue";
Svelte
import Text from "$lib/components/vin/typography.svelte";
import Blockquote from "$lib/components/vin/typography-blockquote.svelte";
import Code from "$lib/components/vin/typography-code.svelte";
import Heading from "$lib/components/vin/typography-heading.svelte";
import Link from "$lib/components/vin/typography-link.svelte";
import List from "$lib/components/vin/typography-list.svelte";
import Prose from "$lib/components/vin/typography-prose.svelte";

The import paths assume the default folders: @/components/vin (React and Vue, with the usual @ → src alias) and $lib/components/vin (SvelteKit). Use your own if you chose another folder in init. How the Vue and Svelte versions pass values and content is in Frameworks.

Plain HTML: the classes come with the style's stylesheet. It needs no JavaScript.

API

From spec/typography.json, which every framework version is tested against.

PropValuesDefaultIn HTML
Heading level
The look. Pick the tag (h1–h6) for the page outline separately with `as`.
1234—vin-h{value}
Text variantpleadmutedsmallpvin-{value}
Blockquote / List / Code / Linkchildren—.vin-blockquote, ul.vin-list or ol.vin-list, code.vin-code, a.vin-link
Prose
Styles plain HTML inside (Markdown, CMS content).
children—.vin-prose

Parts

React, Vue, SvelteHTML classes
<Heading><Text><Blockquote><List><Code><Link><Prose>.vin-h1.vin-h2.vin-h3.vin-h4.vin-p.vin-lead.vin-muted.vin-small.vin-blockquote.vin-list.vin-code.vin-link.vin-prose

Accessibility

  • The look and the level are separate: use the heading tag that fits the page outline (one h1, then h2, h3…), and the class for the size.
  • Links are underlined, not only coloured, and have a visible focus ring.
  • Body and muted text meet 4.5:1 contrast in every style and mode.
  • Lists use real ul/ol elements, so screen readers say how many items there are.