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
<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>Build faster with VinUI
Eight styles, one API
Pick an accent colour
Copy the code
import { Heading } from "@/components/vin/typography";
export function TypographyHeadings() {
return (
<div style={{ display: "grid", gap: 14, width: "100%", maxWidth: 520 }}>
<Heading level={1} as="h2">Build faster with VinUI</Heading>
<Heading level={2} as="h3">Eight styles, one API</Heading>
<Heading level={3} as="h4">Pick an accent colour</Heading>
<Heading level={4} as="h5">Copy the code</Heading>
</div>
);
}The Vue version renders the same markup as the HTML tab, so it looks and works the same.
<script setup lang="ts">
import Heading from "@/components/vin/typography.vue";
</script>
<template>
<div style="display: grid; gap: 14px; width: 100%; max-width: 520px">
<Heading :level="1" as="h2">Build faster with VinUI</Heading>
<Heading :level="2" as="h3">Eight styles, one API</Heading>
<Heading :level="3" as="h4">Pick an accent colour</Heading>
<Heading :level="4" as="h5">Copy the code</Heading>
</div>
</template>The Svelte version renders the same markup as the HTML tab, so it looks and works the same.
<script lang="ts">
import Heading from "$lib/components/vin/typography-heading.svelte";
</script>
<div style="display: grid; gap: 14px; width: 100%; max-width: 520px">
<Heading level={1} as="h2">Build faster with VinUI</Heading>
<Heading level={2} as="h3">Eight styles, one API</Heading>
<Heading level={3} as="h4">Pick an accent colour</Heading>
<Heading level={4} as="h5">Copy the code</Heading>
</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.
<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>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.
import { Text, Code, Link } from "@/components/vin/typography";
export function TypographyText() {
return (
<div style={{ display: "grid", gap: 14, width: "100%", maxWidth: 520 }}>
<Text variant="lead">Components you copy into your project, in the style you choose.</Text>
<Text>
Run <Code>npx @vinish/ui init</Code> once, then add what you need. Read the <Link href="#">installation guide</Link> for the details.
</Text>
<Text variant="muted">Works with plain HTML and with React.</Text>
<Text variant="small">MIT licence. Free forever.</Text>
</div>
);
}The Vue version renders the same markup as the HTML tab, so it looks and works the same.
<script setup lang="ts">
import { Text, Code, Link } from "@/components/vin/typography.vue";
</script>
<template>
<div style="display: grid; gap: 14px; width: 100%; max-width: 520px">
<Text variant="lead">Components you copy into your project, in the style you choose.</Text>
<Text>
Run <Code>npx @vinish/ui init</Code> once, then add what you need. Read the <Link href="#">installation guide</Link> for the details.
</Text>
<Text variant="muted">Works with plain HTML and with Vue.</Text>
<Text variant="small">MIT licence. Free forever.</Text>
</div>
</template>The Svelte version renders the same markup as the HTML tab, so it looks and works the same.
<script lang="ts">
import Text from "$lib/components/vin/typography.svelte";
import Code from "$lib/components/vin/typography-code.svelte";
import Link from "$lib/components/vin/typography-link.svelte";
</script>
<div style="display: grid; gap: 14px; width: 100%; max-width: 520px">
<Text variant="lead">Components you copy into your project, in the style you choose.</Text>
<Text>
Run <Code>npx @vinish/ui init</Code> once, then add what you need. Read the <Link href="#installation">installation guide</Link> for the details.
</Text>
<Text variant="muted">Works with plain HTML, React and Svelte.</Text>
<Text variant="small">MIT licence. Free forever.</Text>
</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.
<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>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.
import { Prose } from "@/components/vin/typography";
export function TypographyProse() {
return (
<Prose as="article" style={{ width: "100%", maxWidth: 520 }}>
<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>
</Prose>
);
}The Vue version renders the same markup as the HTML tab, so it looks and works the same.
<script setup lang="ts">
import { Prose } from "@/components/vin/typography.vue";
</script>
<template>
<Prose as="article" 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>
</Prose>
</template>The Svelte version renders the same markup as the HTML tab, so it looks and works the same.
<script lang="ts">
import Prose from "$lib/components/vin/typography-prose.svelte";
</script>
<Prose as="article" 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">theming</a>.</p>
</Prose>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:
npx @vinish/ui add typographyimport { Heading, Text, Blockquote, List, Code, Link, Prose } from "@/components/vin/typography";import Heading, { Text, Blockquote, List, Code, Link, Prose } from "@/components/vin/typography.vue";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.
| Prop | Values | Default | In HTML |
|---|---|---|---|
Heading levelThe look. Pick the tag (h1–h6) for the page outline separately with `as`. | 1234 | — | vin-h{value} |
Text variant | pleadmutedsmall | p | vin-{value} |
Blockquote / List / Code / Link | children | — | .vin-blockquote, ul.vin-list or ol.vin-list, code.vin-code, a.vin-link |
ProseStyles plain HTML inside (Markdown, CMS content). | children | — | .vin-prose |
Parts
| React, Vue, Svelte | HTML 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.
Customize
Saved in this browser. Style and accent are in the header.