@wasd/design-system-typography
v0.6.0
Published
Typography primitives and role-based aliases for semantic, tone-aware text.
Readme
@wasd/design-system-typography
Typography primitives and role-based aliases for semantic, tone-aware text.
Components
WASText: low-level primitive using the fullvariantscale.Display: display copy withsize="sm" | "md" | "lg"and heading-level semantics.Heading: section headings withsize="xs" | "sm" | "md" | "lg" | "xl".Body: paragraph copy withsize="xs" | "sm" | "md" | "lg" | "xl".Label: compact metadata and UI copy withsize="xs" | "sm" | "md" | "lg" | "xl".Code: monospace inline text withsize="sm" | "md".
Vue and React also export WAS-prefixed aliases: WASDisplay, WASHeading, WASBody, WASTypographyLabel, and WASCode. The typography label uses WASTypographyLabel and the web component tag wasd-typography-label to avoid colliding with the form label component.
Vue
<script setup lang="ts">
import { Body, Display, Heading, Label } from "@wasd/design-system-typography/vue";
</script>
<template>
<Display size="sm" level="1">Lorem ipsum for confident interfaces</Display>
<Heading size="md" level="2">Consectetur adipiscing elit</Heading>
<Body size="lg" tone="muted">
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</Body>
<Label size="sm">Editorial note</Label>
</template>React
import { Body, Display, Heading, Label } from "@wasd/design-system-typography/react";
export function Example() {
return (
<>
<Display size="sm" level={1}>Lorem ipsum for confident interfaces</Display>
<Heading size="md" level={2}>Consectetur adipiscing elit</Heading>
<Body size="lg" tone="muted">
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</Body>
<Label size="sm">Editorial note</Label>
</>
);
}Web Components
<wasd-display size="sm">Lorem ipsum for confident interfaces</wasd-display>
<wasd-heading size="md">Consectetur adipiscing elit</wasd-heading>
<wasd-body size="lg" tone="muted">
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</wasd-body>
<wasd-typography-label size="sm">Editorial note</wasd-typography-label>