Versions in this module Expand all Collapse all v0 v0.4.0 Aug 1, 2026 Changes in this version + const Fill + func AreaDisabled() func(*TextAreaEl) + func CheckboxDisabled() func(*CheckboxEl) + func Disabled() func(*ButtonEl) + func IsTUI() bool + func IsWeb() bool + func PlatformText(tui, web string) string + func PlatformValue[T any](tui, web T) T + func RenderTUI(el Element) string — darwin/amd64, linux/amd64, windows/amd64 + func RenderTUISized(el Element, width, height int) string — darwin/amd64, linux/amd64, windows/amd64 + func SelectDisabled() func(*SelectEl) + func SidebarGap(n int) func(*SidebarOpts) + func SidebarMinMain(n int) func(*SidebarOpts) + func SidebarRight() func(*SidebarOpts) + func SidebarSnug() func(*SidebarOpts) + func SidebarWidth(n int) func(*SidebarOpts) + func SpinnerFrames() int + func Walk(el Element, fn func(Element) bool) + func WithAreaOnChange(f func(string) Msg) func(*TextAreaEl) + func WithAreaPlaceholder(p string) func(*TextAreaEl) + func WithAreaRows(n int) func(*TextAreaEl) + func WithAreaStyle(s Style) func(*TextAreaEl) + func WithAreaValue(v string) func(*TextAreaEl) + func WithButtonStyle(s Style) func(*ButtonEl) + func WithCardStyle(s Style) func(*CardEl) + func WithCheckboxStyle(s Style) func(*CheckboxEl) + func WithDividerStyle(s Style) func(*DividerEl) + func WithID(id string) func(*ButtonEl) + func WithOnChange(f func(string) Msg) func(*TextInputEl) + func WithOnSubmit(f func(string) Msg) func(*TextInputEl) + func WithPassword() func(*TextInputEl) + func WithPlaceholder(p string) func(*TextInputEl) + func WithProgressLabel() func(*ProgressEl) + func WithProgressRunes(filled, empty string) func(*ProgressEl) + func WithProgressStyle(s Style) func(*ProgressEl) + func WithProgressWidth(n int) func(*ProgressEl) + func WithSelectStyle(s Style) func(*SelectEl) + func WithSpinnerLabel(label string) func(*SpinnerEl) + func WithSpinnerStyle(s Style) func(*SpinnerEl) + func WithTextStyle(s Style) func(*TextEl) + func WithValue(v string) func(*TextInputEl) + type AddrFlag struct + Addr string + Enabled bool + func ServeFlag(name, usage string) *AddrFlag + func (f *AddrFlag) IsBoolFlag() bool + func (f *AddrFlag) Set(s string) error + func (f *AddrFlag) String() string + type Align int + const AlignCenter + const AlignEnd + const AlignStart + const AlignStretch + type BatchMsg struct + Msgs []Msg + type Binding struct + Name string + func NewBinding(name string, opts ...BindingOption) Binding + func (b Binding) Enabled() bool + func (b Binding) HelpDesc() string + func (b Binding) HelpKey() string + func (b Binding) KeyNames() []string + func (b Binding) Matches(msg KeyMsg) bool + func (b Binding) MatchesKey(key string) bool + func (b Binding) SetEnabled(v bool) Binding + type BindingOption func(*Binding) + func BindingDisabled() BindingOption + func Help(key, desc string) BindingOption + func Keys(keys ...string) BindingOption + type BoxEl struct + Align Align + Children []Element + Direction Direction + Gap int + Justify Align + Style Style + Wrap bool + type Breakpoint struct + Content Element + MinWidth int + func At(minWidth int, content Element) Breakpoint + type ButtonEl struct + Disabled bool + ID string + Label string + OnClick func() Msg + Style Style + type CardEl struct + Child Element + Style Style + Title string + type CheckboxEl struct + Checked bool + Disabled bool + ID string + Label string + OnToggle func(checked bool) Msg + Style Style + type ClickMsg struct + TargetID string + type Cmd func() Msg + func Batch(cmds ...Cmd) Cmd + func Do(f func() Msg) Cmd + func Every(d time.Duration, build func(time.Time) Msg) Cmd + func Quit() Cmd + func Send(msg Msg) Cmd + func Sequence(cmds ...Cmd) Cmd + func Tick(d time.Duration, build func() Msg) Cmd + type Color string + type Direction int + const Column + const Row + type DividerEl struct + Label string + Style Style + type Element interface + func AlignedX(align Align, children ...Element) Element + func AppShell(header, body, footer Element) Element + func Box(dir Direction, children ...Element) Element + func BoxStyled(dir Direction, gap int, style Style, children ...Element) Element + func Button(label string, onClick func() Msg, opts ...func(*ButtonEl)) Element + func Card(title string, child Element, opts ...func(*CardEl)) Element + func Center(width int, children ...Element) Element + func Centered(child Element) Element + func CenteredX(children ...Element) Element + func Checkbox(id, label string, checked bool, onToggle func(bool) Msg, ...) Element + func Children(el Element) []Element + func Constrain(maxWidth int, children ...Element) Element + func ConstrainBox(maxWidth int, dir Direction, place Align, children ...Element) Element + func Divider(label string, opts ...func(*DividerEl)) Element + func Empty() Element + func Find(el Element, pred func(Element) bool) (Element, bool) + func Flex() Element + func Form(onSubmit func(map[string]string) Msg, children ...Element) Element + func Fullscreen(children ...Element) Element + func Group(children ...Element) Element + func Grow(n int, child Element) Element + func HStack(children ...Element) Element + func If(cond bool, el Element) Element + func IfElse(cond bool, yes, no Element) Element + func Input(id string, opts ...func(*TextInputEl)) Element + func Link(label, href string) Element + func List(ordered bool, items ...Element) Element + func Map[T any](items []T, build func(i int, item T) Element) []Element + func OnPlatform(tui, web Element) Element + func Progress(value float64, opts ...func(*ProgressEl)) Element + func Responsive(variants ...Breakpoint) Element + func ResponsiveText(style Style, variants ...TextVariant) Element + func Scroll(child Element, maxHeight int) Element + func Select(id string, options []SelectOption, value string, onChange func(string) Msg, ...) Element + func Sidebar(side, main Element, opts ...func(*SidebarOpts)) Element + func Spacer(n int) Element + func Spinner(frame int, opts ...func(*SpinnerEl)) Element + func Split(panes ...Element) Element + func TUIOnly(children ...Element) Element + func Table(columns []string, rows [][]string) Element + func Text(s string, opts ...func(*TextEl)) Element + func TextArea(id string, opts ...func(*TextAreaEl)) Element + func VStack(children ...Element) Element + func WebOnly(children ...Element) Element + func When(cond bool, build func() Element) Element + type EmptyEl struct + type FormEl struct + Children []Element + OnSubmit func(values map[string]string) Msg + Style Style + type Handler struct + Binding Binding + Do func() Msg + func Bind(b Binding, do func() Msg) Handler + type HelpEntry struct + Desc string + Key string + type InputMsg struct + ID string + Value string + type KeyMap struct + func KeyMapFrom(handlers ...Handler) KeyMap + func NewKeyMap(bindings ...Binding) KeyMap + func (k KeyMap) Add(bindings ...Binding) KeyMap + func (k KeyMap) Bindings() []Binding + func (k KeyMap) Get(name string) (Binding, bool) + func (k KeyMap) HelpEntries() []HelpEntry + func (k KeyMap) HelpView(dir Direction) Element + func (k KeyMap) Match(msg KeyMsg) (string, bool) + func (k KeyMap) SetEnabled(name string, enabled bool) KeyMap + func (k KeyMap) ShortHelp() string + type KeyMsg struct + Key string + Rune rune + type LinkEl struct + Href string + Label string + Style Style + type ListEl struct + Items []Element + Ordered bool + Style Style + type Model interface + Init func() Cmd + Update func(Msg) (Model, Cmd) + View func() Element + type Msg interface + func Dispatch(msg KeyMsg, handlers ...Handler) (Msg, bool) + type NavigateMsg struct + Path string + type NoneMsg struct + type Option func(*config) + func WithKeyMap(km KeyMap) Option + func WithStatus(f StatusFunc) Option + func WithTitle(title string) Option + func WithWebServer(addr, dir string) Option + func WithoutAltScreen() Option + func WithoutBaseCSS() Option + func WithoutMouse() Option + func WithoutStatusBar() Option + type Pather interface + Path func() string + type Platform int + const PlatformTUI + const PlatformWeb + func Current() Platform + func (p Platform) String() string + type Program struct + func NewProgram(m Model, opts ...Option) *Program + func (p *Program) KeyMap() KeyMap + func (p *Program) Run() error + type ProgressEl struct + EmptyRune string + FilledRune string + ShowLabel bool + Style Style + Value float64 + Width int + type QuitMsg struct + type ResizeMsg struct + Height int + Width int + type ResponsiveEl struct + Variants []Breakpoint + type ScrollAreaEl struct + Child Element + MaxHeight int + Style Style + type SelectEl struct + Disabled bool + ID string + OnChange func(value string) Msg + Options []SelectOption + Style Style + Value string + type SelectOption struct + Label string + Value string + func Opt(value, label string) SelectOption + func Options(values ...string) []SelectOption + type SidebarOpts struct + Gap int + MinMain int + Right bool + Snug bool + Width int + type SpacerEl struct + Size int + type SpinnerEl struct + Frame int + Label string + Style Style + type Status struct + Hidden bool + Items []StatusItem + Separator string + Style Style + func NewStatus() Status + func (s Status) Empty() bool + func (s Status) Hide() Status + func (s Status) Item(it StatusItem) Status + func (s Status) Left(texts ...string) Status + func (s Status) Right(texts ...string) Status + func (s Status) Styled(text string, style Style) Status + func (s Status) WithSeparator(sep string) Status + func (s Status) WithStyle(style Style) Status + type StatusFunc func(Model) Status + type StatusItem struct + Right bool + Style Style + Text string + type Style struct + Align Align + BG Color + Bold bool + Border bool + BorderColor Color + FG Color + Faint bool + Grow int + Height int + Italic bool + Margin [4]int + MaxHeight int + MaxWidth int + MinWidth int + Padding [4]int + PlaceX Align + Strike bool + Underline bool + Width int + func NewStyle() Style + func (s Style) Aligned(a Align) Style + func (s Style) Bg(c Color) Style + func (s Style) Bordered(c Color) Style + func (s Style) Fg(c Color) Style + func (s Style) Grown(n int) Style + func (s Style) H(n int) Style + func (s Style) Mar(v ...int) Style + func (s Style) MaxH(n int) Style + func (s Style) MaxW(n int) Style + func (s Style) Merge(other Style) Style + func (s Style) MinW(n int) Style + func (s Style) Pad(v ...int) Style + func (s Style) PlacedX(a Align) Style + func (s Style) SetBold(v bool) Style + func (s Style) SetFaint(v bool) Style + func (s Style) SetItalic(v bool) Style + func (s Style) SetStrike(v bool) Style + func (s Style) SetUnderline(v bool) Style + func (s Style) W(n int) Style + type SubmitMsg struct + FormValues map[string]string + type TableEl struct + Columns []string + Rows [][]string + Style Style + type TextAreaEl struct + Disabled bool + ID string + OnChange func(string) Msg + Placeholder string + Rows int + Style Style + Value string + type TextEl struct + Content string + Style Style + type TextInputEl struct + Disabled bool + ID string + OnChange func(string) Msg + OnSubmit func(string) Msg + Password bool + Placeholder string + Style Style + Value string + type TextVariant struct + Content string + MinWidth int + func TextAt(minWidth int, content string) TextVariant + type ToggleMsg struct + Checked bool + ID string v0.3.0 Aug 1, 2026 v0.2.1 Jul 31, 2026 v0.2.0 Jul 26, 2026 v0.1.1 Jul 22, 2026 v0.1.0 Jul 22, 2026