Text entry
Introduction
Section titled “Introduction”TextEntry is the workhorse for read-only strings and formatted values on a show page. Titles, statuses, slugs, bios, money amounts, and markdown bodies usually start here before you reach for a more specialized entry.
It inherits the shared Entry chrome (label, helper, hint, placeholder, copyable, slots) and adds formatters for badges, icons, links, dates, money, numeric display, markdown / HTML / prose, and list layouts. By default the label sits above the value — pair with overview helpers like .hidden_label() or .inline_label() when the show page needs a hero line or a dense settings row.
Each variation below includes a short explanation, the fluent API to paste into your schema, and light/dark screenshots.
Basic text entry
Section titled “Basic text entry”Resolve state from the record by name and render it as text.
from almasix.orbit.infolists import TextEntry
TextEntry.make("title").label("Title")

Badges
Section titled “Badges”.badge() wraps the value in an or-badge. Pair with .color(...) (success, danger, warning, info, primary, gray, or a callable).
TextEntry.make("status").label("Status").badge().color("success")

Color without a badge
Section titled “Color without a badge”.color(...) also tints plain text via or-color-* classes.
TextEntry.make("status").label("Status").color("info").weight("medium")

.icon(...) places a Heroicon before (default) or after the text. .icon_position("after") and .icon_color(...) control placement and tint.
TextEntry.make("email") .label("Email") .icon("heroicon-o-envelope") .icon_color("primary")![]()
![]()
.url(...) wraps the value in a link. Pass a string or callable (state, record, …). .open_url_in_new_tab() adds target="_blank".
TextEntry.make("website") .label("Website") .url(lambda state, **_: str(state)) .open_url_in_new_tab() .color("primary")

Size, weight, and font family
Section titled “Size, weight, and font family”.size("sm" | "md" | "lg" | …), .weight("bold" | "medium" | …), and .font_family("monospace") map to Orbit typography utilities.
TextEntry.make("title").label("Title").size("lg").weight("bold")TextEntry.make("slug").label("Slug").font_family("monospace")



Line clamp and wrap
Section titled “Line clamp and wrap”.line_clamp(n) truncates to n lines with CSS line-clamp. .wrap() allows soft wrapping on long unbroken strings.
TextEntry.make("bio").label("Bio").line_clamp(2).wrap()

Lists — line breaks, bullets, separators
Section titled “Lists — line breaks, bullets, separators”When state is a list (or you split a string with .separator(...)):
| Method | Behavior |
|---|---|
.list_with_line_breaks() |
One item per line |
.bulleted() |
Alias — prefix each item with • |
.separator(",") |
Join with the given separator; with .badge() renders a badge list |
TextEntry.make("tags").label("Tags").list_with_line_breaks()TextEntry.make("tags").label("Tags").bulleted()TextEntry.make("skills").label("Skills").separator(",").badge().color("gray")





Dates and relative time
Section titled “Dates and relative time”.date(...), .date_time(...), and .time(...) accept strftime formats. .since() renders human-relative time (5 minutes ago, in 2 days).
TextEntry.make("published_at").label("Published").date_time("%b %d, %Y %H:%M")TextEntry.make("starts_at").label("Started").since()



Money and numeric
Section titled “Money and numeric”.money("USD", divide_by=100) formats currency (optional decimal_places). .numeric(2) forces decimal places.
TextEntry.make("price").label("Price").money("USD", divide_by=100)TextEntry.make("qty").label("Quantity").numeric(2)



Markdown, HTML, and prose
Section titled “Markdown, HTML, and prose”.markdown() renders a small safe subset (**bold**, *italic*, newlines). .html() inserts raw HTML (sanitize untrusted input yourself). .prose() adds reading-width typography classes — often paired with markdown.
TextEntry.make("md").label("Summary").markdown()TextEntry.make("html").label("HTML").html()TextEntry.make("body").label("Body").prose().markdown()





Limiting length
Section titled “Limiting length”.limit(n) truncates characters; .words(n) truncates by word count. Both accept a custom end suffix (default …).
TextEntry.make("bio").label("Bio").limit(48)TextEntry.make("body").label("Body").words(8)

API cheat sheet
Section titled “API cheat sheet”| Method | Notes |
|---|---|
.badge |
Badge wrapper; callable condition supported |
.color / .icon / .icon_position / .icon_color |
Visual chrome |
.url / .open_url_in_new_tab |
Link the value |
.size / .weight / .font_family / .wrap / .line_clamp |
Typography |
.list_with_line_breaks / .bulleted / .separator |
List layouts |
.date / .date_time / .time / .since |
Temporal formatters |
.money / .numeric |
Currency / number display |
.markdown / .html / .prose |
Rich text modes |
.limit / .words |
Truncation |
Shared chrome (copyable, placeholder, slots, …) is documented on the overview.