Bedform UI

Typography

Fonts, the type ramp, and the text components.

Each font has one role:

RoleFontTokenUsed for
ProseSUSE (variable)--ore-font-proseThe page default, long-form writing, body copy and captions
DisplayCinnangles Ten--ore-font-displayTitles, display text, modal and card titles, hero buttons
LabelMinecraft Regular--ore-font-labelLabels of controls: buttons, tabs, fields, menus, tags
MonospaceMonocraft--ore-font-monospacecode, kbd, pre and samp, and font="monospace" text

The stylesheet sets body to the prose font and code, kbd, pre and samp to Monocraft. Components set their own fonts.

Prose

SUSE is a variable font, so every weight from 100 to 900 is drawn rather than synthesized.

The quick brown fox jumps over the lazy dog.

Display

Cinnangles Ten draws Latin, Greek, Cyrillic and symbols, and has one weight. Titles stay regular instead of using a synthetic bold.

CREATE NEW WORLD

Labels

Minecraft Regular has one weight. Use size, color and spacing for hierarchy.

Play · Settings · Marketplace

Monospace

Monocraft draws regular, bold and their italics. Monospace text always has Monocraft's ligatures (its liga feature) and glyph composition (ccmp), and normal letter spacing, because browsers drop ligatures from letter-spaced text. The ligatures cover arrows such as ->, =>, <-, <== and <=>, the operators !=, !==, ==, ===, <= and >=, <!--, NOTE: and TODO:, and runs of +, -, = and ^ up to 31 characters long.

/give @s minecraft:diamond 64


if (count >= 64 && slot != null) => next(); // TODO: <-- ===>

Text components

@bedform/ui has a component for each of Fluent UI 2's typography presets. Each renders a span unless you pass as, such as as="h1".

ComponentSizeLine heightWeightFont
Caption210px14pxRegularProse
Caption2Strong10px14pxSemiboldProse
Caption112px16pxRegularProse
Caption1Strong12px16pxSemiboldProse
Caption1Stronger12px16pxBoldProse
Body114px20pxRegularProse
Body1Strong14px20pxSemiboldProse
Body1Stronger14px20pxBoldProse
Body216px22pxRegularProse
Subtitle216px22pxSemiboldProse
Subtitle2Stronger16px22pxBoldProse
Subtitle120px28pxSemiboldProse
Title324px32pxRegularDisplay
Title228px36pxRegularDisplay
Title132px40pxRegularDisplay
LargeTitle40px52pxRegularDisplay
Display68px92pxRegularDisplay

Text takes the same properties as Fluent's: size (100 to 1000), weight (regular, medium, semibold, bold), font (prose, label, display, monospace), italic, underline, strikethrough, block, wrap, truncate and align. The presets take all of them except size, weight and font.

Body holds long-form prose. It renders a div unless you pass as. Its text is 16px with a 1.5 line height, and its children are spaced 0.75em apart; change the spacing with --ore-body-gap.

import { Body, Caption1, Title1 } from "@bedform/ui";

<Body as="article">
  <Title1 as="h1">World settings</Title1>
  <p>
    These settings apply to every player. Run <code>/gamerule</code> to change
    them later.
  </p>
  <Caption1 block>Last changed today.</Caption1>
</Body>;

The components render the ore-text and ore-body classes with data attributes, such as data-variant="title1", so ordinary CSS can target them.

Tokens

TokenDefault
--ore-font-prose"SUSE", "Noto Sans", "GNU Unifont", sans-serif
--ore-font-display"Cinnangles Ten", "Minecraft Regular", "Noto Sans", "GNU Unifont", sans-serif
--ore-font-label"Minecraft Regular", "Noto Sans", "GNU Unifont", sans-serif
--ore-font-monospace"Monocraft", "Cascadia Mono", Consolas, monospace
--ore-font-bodyvar(--ore-font-label); deprecated
--ore-font-size-100 to --ore-font-size-10000.625rem to 4.25rem
--ore-line-height-100 to --ore-line-height-10000.875rem to 5.75rem
--ore-font-weight-regular to --ore-font-weight-bold400, 500, 600 and 700

GNU Unifont and Noto Sans are fallbacks for characters the bundled fonts do not draw. Neither is bundled; load them yourself under those family names.

On this page