Inference Logoinference.sh

Text

Displays plain text with optional styling variants.

Preview

code
1Regular text

Usage

go
1node := models.WidgetNode{2    Type:  models.WidgetNodeTypeText,3    Value: "Hello, world!",4}

Props

NameTypeDescriptionDefault
type"text"Node typerequired
valuestringText content to display""
variantstringVisual style variant"default"

Variants

VariantDescriptionCSS Classes
defaultStandard texttext-sm
titleProminent heading texttext-sm font-medium
boldEmphasized texttext-sm font-medium
mutedDe-emphasized secondary texttext-xs text-muted-foreground
smallCompact texttext-xs

Examples

Default Text

go
1{Type: models.WidgetNodeTypeText, Value: "Regular text content"}

Title Text

go
1{Type: models.WidgetNodeTypeText, Value: "Step Title", Variant: "title"}

Muted Text

go
1{Type: models.WidgetNodeTypeText, Value: "Secondary description", Variant: "muted"}

Visual Hierarchy Example

Create clear visual hierarchy by combining variants:

go
1children := []models.WidgetNode{2    {3        Type: models.WidgetNodeTypeCol,4        Gap:  1,5        Children: []models.WidgetNode{6            {Type: models.WidgetNodeTypeText, Value: "Task Complete", Variant: "title"},7            {Type: models.WidgetNodeTypeText, Value: "Your report has been generated successfully.", Variant: "muted"},8        },9    },10}

TypeScript

typescript
1const node: WidgetNode = {2  type: "text",3  value: "Hello, world!",4  variant: "muted",5}

Best Practices

  1. Use variants for hierarchy - Combine title and muted for clear information hierarchy
  2. Keep text concise - Long text should use the markdown node type
  3. Use muted for secondary info - Descriptions, timestamps, and metadata

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.