Typography

Text

Polymorphic text component — display, headings, body, caption, mono.

Typography Variants

Standardized typography scales for consistent design.

Display

Heading 1

Heading 2

Heading 3

Heading 4

Body (Default)

Caption textMonospace
'use client'

import React from 'react'
import { Text, Stack } from 'biibaos'

export default function TypographyVariants() {
  return (
    <Stack gap={16} direction="column">
      <Text variant="display">Display</Text>
      <Text variant="h1">Heading 1</Text>
      <Text variant="h2">Heading 2</Text>
      <Text variant="h3">Heading 3</Text>
      <Text variant="h4">Heading 4</Text>
      <Text variant="body">Body (Default)</Text>
      <Text variant="caption">Caption text</Text>
      <Text variant="mono">Monospace</Text>
    </Stack>
  )
}

Line Clamping

Cleanly truncate long paragraphs to a specific number of lines using maxLines.

BiibaOS is a high-fidelity design system focused on speed and aesthetic. It provides a set of highly optimized components that look great out of the box. This paragraph is actually much longer than it appears, but it is being clamped to exactly three lines to maintain the vertical rhythm of the container.

'use client'

import React from 'react'
import { Text, View } from 'biibaos'

export default function ClampingExample() {
  return (
    <View w={300}>
      <Text maxLines={3} color="muted" variant="body-sm">
        BiibaOS is a high-fidelity design system focused on speed and aesthetic. It provides a set of highly optimized components that look great out of the box. This paragraph is actually much longer than it appears, but it is being clamped to exactly three lines to maintain the vertical rhythm of the container.
      </Text>
    </View>
  )
}

Real-world Scenarios

Using Text props to build complex, professional interfaces.

Alexander Graham

Product Designer • San Francisco
Engineering

The future of agentic coding interfaces

How we built a design system that adapts to the speed of AI-driven development while maintaining a premium, high-fidelity look and feel for end users across all platforms.

May 14, 20265 min read
'use client'

import React from 'react'
import { Text, View, Stack } from 'biibaos'

export default function ProfileHeader() {
  return (
    <Stack direction="column" gap={24} style={{ maxWidth: 450 }}>
      {/* Profile Header */}
      <View display="flex" align="center" gap={12} p={16} bg="surface" radius="lg" border>
        <View w={48} h={48} radius="full" bg="primary" />
        <View flex={1}>
          <Text variant="h3" weight="bold">Alexander Graham</Text>
          <Text variant="caption" color="muted" transform="uppercase" weight="semibold">
            Product Designer • San Francisco
          </Text>
        </View>
      </View>

      {/* Article Preview */}
      <View>
        <Text variant="label" color="primary" transform="uppercase" weight="bold" size={10}>
          Engineering
        </Text>
        <Text variant="h2" weight="bold" style={{ margin: '8px 0' }}>
          The future of agentic coding interfaces
        </Text>
        <Text variant="body-sm" color="muted" maxLines={2}>
          How we built a design system that adapts to the speed of AI-driven development.
        </Text>
      </View>
    </Stack>
  )
}

Properties

PropTypeDefaultDescription
variantTextVariant'body'Semantic design theme variant
colorTextColor | string'default'Predefined theme typography color token or hex code
truncatebooleanTruncates overflowing text with trailing ellipses
maxLinesnumberConfigures the maxLines option
askeyof JSX.IntrinsicElementsHTML tag type to render (button or a)
childrenReact.ReactNodeMain descriptive text or overlay children layout
align'left' | 'center' | 'right' | 'justify'Horizontal text alignment (left, center, right, justify)
weight'normal' | 'medium' | 'semibold' | 'bold' | number | stringConfigures the weight option
transform'uppercase' | 'lowercase' | 'capitalize' | 'none'Configures the transform option
sizenumber | stringPredefined size scaling preset
keystring]: anyConfigures the key option