// // Copyright 2026 DXOS.org // // @import-as-namespace import { ark } from '@ark-ui/react/factory'; import React, { type CSSProperties } from 'react'; import { recipes } from '../../recipes.ts'; import { composableProps, slottable } from '../../util/slots.ts'; import { type CSSVariables } from '../Container/Container.tsx'; type TypographyTone = 'default' | 'muted' | 'subtle'; type TypographyProps = { /** One line, ending in an ellipsis when it overflows. */ truncate?: boolean; /** At most this many lines, the last ending in an ellipsis. */ lines?: number; /** * Emphasis below the default (DESIGN.md "Text emphasis"): `description` for secondary content, `subdued` for * interface text. */ tone?: TypographyTone; /** Monospace, for keys, ids and code. */ mono?: boolean; }; /** * Text whose first line is centred in a block, so it lines up with a Block or control beside it however many lines * it wraps to. Renders a `
`; `asChild` puts the metrics on a heading or other text element instead.
*/
const Typography = slottable