Text

Native, Parley-shaped text with size, weight, colour and selection.

Text rendered by Tarve Text rendered by Tarve
Native render. The live version loads when this comes into view.

Import

import { Text } from "@tarve/core";

Usage

Text.tsx
import { Column, Text, theme } from "@tarve/core";

<Column gap={4}>
  <Text size={28} weight={700}>Native text</Text>
  <Text color={theme.colors.mutedForeground}>Shaped by Parley, painted by Vello or D3D11.</Text>
  <Text size={13} style={{ textShadow: { x: 0, y: 0, blur: 10, color: "#ffffffcc" } }}>With a text shadow</Text>
</Column>

Props

PropTypeDefault
children BindableChild—
color string—
size number—
style Reactive<IntrinsicStyle>—
weight number—

Common props

Shared by every component. See descriptions →

classclassNamehighlightidkeymotionFromonHighlightonPasteonPointerLeaveonPointerMoveonSizeonTransitionEndrovingGroup

Types

BindableChild
type BindableChild = Child | Signal<unknown> | BindableChild[];
Reactive
type Reactive<S> = { [K in keyof S]: S[K] | Signal<Exclude<S[K], undefined>> };