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文字。
monobooleanGeist Mono,用于密钥、ID、模型 ID 和代码。
tabularboolean等宽数字。
metric默认开启。tone"success" | "warning" | "danger" | "info" | "inherit" | "secondary" | "default" | "tertiary" = default文字的颜色角色;状态色调旁应有表达相同含义的文字。
truncateboolean单行显示并以省略号截断;被截断时,完整文字显示在提示框中。
variant"title" | "display" | "title-sm" | "title-lg" | "body" | "caption" | "small" | "micro" | "body-lg" | "metric" = body文字样式,从
micro到display。weight"medium" | "regular" | "semibold"字重,与文字样式的字重不同时设置。