# Text

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

- Category: [Text & media](https://tarve.dev/docs.md#text-media)
- Import: `import { Text } from "@tarve/core";`
- Props type: `TextProps`
- Source: [packages/core/src/components/text.ts:13](https://github.com/omarcosr/tarve/blob/main/packages/core/src/components/text.ts#L13)

## Usage

```tsx title="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

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `BindableChild` | — |  |
| `color` | `string` | — |  |
| `size` | `number` | — |  |
| `style` | `Reactive<IntrinsicStyle>` | — |  |
| `weight` | `number` | — |  |

## Common props

Shared by every component (descriptions: https://tarve.dev/docs.md#common-props): `class`, `className`, `highlight`, `id`, `key`, `motionFrom`, `onHighlight`, `onPaste`, `onPointerLeave`, `onPointerMove`, `onSize`, `onTransitionEnd`, `rovingGroup`.

## Types

```ts title="BindableChild"
type BindableChild = Child | Signal<unknown> | BindableChild[];
```

```ts title="Reactive"
type Reactive<S> = { [K in keyof S]: S[K] | Signal<Exclude<S[K], undefined>> };
```

Previous: [Glass](https://tarve.dev/docs/components/Glass.md) · Next: [Typography](https://tarve.dev/docs/components/Typography.md)

---

Tarve v0.13.8 · HTML version: https://tarve.dev/docs/components/Text · Index for agents: https://tarve.dev/llms.txt
