Typography

Shell's type scale, rendered by Shell. Components set their text with it, and nothing else sets a size or weight: use Text or its textVariants.

Scale

Preview
scale.tsx
import { View } from "nsh"

import { Text, textSizes } from "~/components/ui/text"

export default function Example() {
  return (
    <View class="w-full gap-(--space-md)">
      <Each of={textSizes}>
        {(size) => (
          <View class="flex-row items-baseline gap-(--space-xl)">
            <Text size="xs" tone="muted" class="w-16 shrink-0">
              {size()}
            </Text>
            <Text size={size()} truncate class="min-w-0 flex-1">
              The harbor plan, explained
            </Text>
          </View>
        )}
      </Each>
    </View>
  )
}

Weights and families

Preview
Not in Shell yet
Shell doesn't have this example, or every component it uses.