Text
使用字号刻度的文字:一套刻度,处处一致。
micro: Route each request to the model you choosecaption: Route each request to the model you choosesmall: Route each request to the model you choosebody: Route each request to the model you choosebody-lg: Route each request to the model you choosetitle-sm: Route each request to the model you choosetitle: Route each request to the model you choosetitle-lg: Route each request to the model you choosedisplay: Route each request to the model you choose$1,284.20
<div className="flex flex-col gap-8">
{(Object.keys(KAESO_TEXT_VARIANTS.variant) as TextVariant[]).map((v) => (
<Text key={v} variant={v}>
{v === "metric" ? "$1,284.20" : `${v}: Route each request to the model you choose`}
</Text>
))}
</div>import { Text } from "@logicplanes/kaeso-ui";属性
asElementType渲染所用的元素或组件,例如
section或ul。childrenReactNode文字。
lines2在 1024px 以下最多换成两行,并始终保留两行的空间,这样稍后才到的一行文字(例如图表的说明)不会推动下方的内容;从 1024px 起保持一行。
monobooleanGeist Mono,用于密钥、ID、模型 ID 和代码。
tabularboolean等宽数字。
metric默认开启。tone"success" | "warning" | "danger" | "info" | "inherit" | "secondary" | "default" | "tertiary" = default文字的颜色角色;状态色调旁应有表达相同含义的文字。
truncateboolean单行显示并以省略号结尾;纯文本被截断时可以获得焦点,并在提示中显示完整内容。
variant"title" | "display" | "caption" | "title-sm" | "title-lg" | "body" | "small" | "micro" | "body-lg" | "metric" = body文字样式,从
micro到display。weight"medium" | "regular" | "semibold"字重,与文字样式的字重不同时设置。