Skip to content

Text entry

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.

Resolve state from the record by name and render it as text.

app/orbit/resources/post_resource.py
from almasix.orbit.infolists import TextEntry
TextEntry.make("title").label("Title")

Orbit Text entry basic (light)

Orbit Text entry basic (dark)

.badge() wraps the value in an or-badge. Pair with .color(...) (success, danger, warning, info, primary, gray, or a callable).

app/orbit/resources/post_resource.py
TextEntry.make("status").label("Status").badge().color("success")

Orbit Text entry badge (light)

Orbit Text entry badge (dark)

.color(...) also tints plain text via or-color-* classes.

app/orbit/resources/post_resource.py
TextEntry.make("status").label("Status").color("info").weight("medium")

Orbit Text entry color (light)

Orbit Text entry color (dark)

.icon(...) places a Heroicon before (default) or after the text. .icon_position("after") and .icon_color(...) control placement and tint.

app/orbit/resources/post_resource.py
TextEntry.make("email")
.label("Email")
.icon("heroicon-o-envelope")
.icon_color("primary")

Orbit Text entry icon (light)

Orbit Text entry icon (dark)

.url(...) wraps the value in a link. Pass a string or callable (state, record, …). .open_url_in_new_tab() adds target="_blank".

app/orbit/resources/post_resource.py
TextEntry.make("website")
.label("Website")
.url(lambda state, **_: str(state))
.open_url_in_new_tab()
.color("primary")

Orbit Text entry url (light)

Orbit Text entry url (dark)

.size("sm" | "md" | "lg" | …), .weight("bold" | "medium" | …), and .font_family("monospace") map to Orbit typography utilities.

app/orbit/resources/post_resource.py
TextEntry.make("title").label("Title").size("lg").weight("bold")
TextEntry.make("slug").label("Slug").font_family("monospace")

Orbit Text entry size + weight (light)

Orbit Text entry size + weight (dark)

Orbit Text entry font family (light)

Orbit Text entry font family (dark)

.line_clamp(n) truncates to n lines with CSS line-clamp. .wrap() allows soft wrapping on long unbroken strings.

app/orbit/resources/post_resource.py
TextEntry.make("bio").label("Bio").line_clamp(2).wrap()

Orbit Text entry line clamp (light)

Orbit Text entry line clamp (dark)

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
app/orbit/resources/post_resource.py
TextEntry.make("tags").label("Tags").list_with_line_breaks()
TextEntry.make("tags").label("Tags").bulleted()
TextEntry.make("skills").label("Skills").separator(",").badge().color("gray")

Orbit Text entry list (light)

Orbit Text entry list (dark)

Orbit Text entry bulleted (light)

Orbit Text entry bulleted (dark)

Orbit Text entry separator (light)

Orbit Text entry separator (dark)

.date(...), .date_time(...), and .time(...) accept strftime formats. .since() renders human-relative time (5 minutes ago, in 2 days).

app/orbit/resources/post_resource.py
TextEntry.make("published_at").label("Published").date_time("%b %d, %Y %H:%M")
TextEntry.make("starts_at").label("Started").since()

Orbit Text entry date (light)

Orbit Text entry date (dark)

Orbit Text entry since (light)

Orbit Text entry since (dark)

.money("USD", divide_by=100) formats currency (optional decimal_places). .numeric(2) forces decimal places.

app/orbit/resources/post_resource.py
TextEntry.make("price").label("Price").money("USD", divide_by=100)
TextEntry.make("qty").label("Quantity").numeric(2)

Orbit Text entry money (light)

Orbit Text entry money (dark)

Orbit Text entry numeric (light)

Orbit Text entry numeric (dark)

.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.

app/orbit/resources/post_resource.py
TextEntry.make("md").label("Summary").markdown()
TextEntry.make("html").label("HTML").html()
TextEntry.make("body").label("Body").prose().markdown()

Orbit Text entry markdown (light)

Orbit Text entry markdown (dark)

Orbit Text entry html (light)

Orbit Text entry html (dark)

Orbit Text entry prose (light)

Orbit Text entry prose (dark)

.limit(n) truncates characters; .words(n) truncates by word count. Both accept a custom end suffix (default ).

app/orbit/resources/post_resource.py
TextEntry.make("bio").label("Bio").limit(48)
TextEntry.make("body").label("Body").words(8)

Orbit Text entry limit (light)

Orbit Text entry limit (dark)

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.