The maintainer has not written a description at the source.
Repo vlang/ui2, read from GitHub 2 d ago. vlang has not joined Take My Repo.
vlang/ui2 is a public repo on GitHub by vlang. It declares the MIT license on GitHub. It is written mainly in V, has 76 stars and last changed on 2026-11-21. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
ui2 is a compact declarative UI module for V. It uses retained native controls
on macOS, iOS, and Windows and a custom immediate-mode gg renderer on Linux,
the BSDs, and Android.
The Linux and BSD backends draw and handle widgets directly through
gg/Sokol; they have no GTK dependency.
The V API includes responsive Flex and Grid placement with intrinsic text measurement. See the layout guide and responsive example.
You can also build desktop ui2 apps in C or any language with a C FFI. Build
the shared library and the C counter with make c-example; the standalone
header is c/ui2.h. See the C API guide for the build
callback, widget constructors, state access, ownership rules, and a Python
ctypes example. Application code needs no V compiler once the library is built.
macOS and Windows use native widgets by default. Pass the compile-time define
-d ui2_custom_rendering to use the same custom gg renderer there instead:
v -d ui2_custom_rendering run examples/users/main.v
ui2 needs V 0.5.2 or newer. The module is split across ui/, appkit/,
uikit/, windows/, and linux/ through the subdirs field of v.mod, and
older compilers ignore that field. Run v up if import ui2 fails.
FreeBSD, OpenBSD, NetBSD, and DragonFlyBSD share the custom gg renderer with
Linux, drawing through X11: the X11 client libraries (libX11, libXcursor,
libXi, libXrandr) and OpenGL have to be installed, and stock V's sokol
module already supplies each BSD's include and library paths.
To use ui2 from a project outside this repository, link the clone into
~/.vmodules:
ln -s "$(pwd)" ~/.vmodules/ui2
Element.id identifies a mounted control for text, set_text, focus, and
other lookup APIs.Element.key identifies a child during reconciliation. Keys must be unique
among siblings; IDs must be unique in the tree. Renderers validate both before
changing native state.Element.action_id identifies the emitted action and falls back to id.
VML on_tap and on_change populate action_id without replacing id.Text inputs use controlled-on-change semantics: changing the declared text
applies that value, while a refresh with the same declaration preserves the
current native/local edit, selection, focus, and (on native controls) input
method composition. Use set_text for an explicit imperative replacement.
The custom renderer is demand driven: it builds on demand and reuses its tree
while idle, ui2.WindowOptions{refresh: .continuous} restores the historical
per-vsync rebuild loop, and refresh: .manual suppresses all drawing between
explicit asks. See
render scheduling for invalidation, worker
delivery, window lifecycle and the acceptance fixture.
On Linux, glvnd probes the ICD of every installed GL vendor before the first
frame, mapping each vendor's whole userspace stack into the process — tens of
megabytes per vendor, even when only one of them renders.
ui2.WindowOptions{gl_load: .mesa_only} probes the Mesa vendor only (VMs, CI,
Xvfb), gl_load: .gpu_only probes the proprietary vendor only (NVIDIA
desktops; it needs a real hardware GL context). The UI2_GL_VENDOR
environment variable overrides the field without a recompile, and an explicit
__EGL_VENDOR_LIBRARY_FILENAMES or __EGL_VENDOR_LIBRARY_DIRS in the
process wins over both.
Animations target a mounted element by id and are applied after each
declarative build, so they work with both V-built and VML-built trees. The
native and custom backends schedule frames while the animation is active. The
custom renderer returns to idle when the animation completes.
move := ui2.animation(
duration: 0.75
transition: .in_out_cubic
x: 320
y: 180
rotation: 90
)
move.start('tile')
The original shorthand targets are x, y, width, height, rotation,
background, corner_radius, text_color, text_background, font_size,
and padding_left. For any other numeric or color property on Element or
its visual styles, use typed property targets. They accept concise names where
unambiguous and dotted paths for nested styles:
ui2.animation(
duration: 0.3
properties: [
ui2.animation_number_property('value', 75),
ui2.animation_number_property('slider_style.thumb_size', 28),
ui2.animation_color_property('slider_style.thumb_color', 0xf97316),
ui2.animation_color_property('box.border_color', 0x0ea5e9),
]
).start('volume')
This covers numeric geometry, text metrics, slider state and chrome, switch
colors, borders, and toggle-button selected styles. Use
is_animatable_property(name, kind) to validate a property name before
constructing an animation. Strings, booleans, enums, child lists, and callback
fields are deliberately not interpolated. duration and step use seconds.
All of Kivy's named linear, sine, quadratic, cubic, quartic, quintic,
exponential, circular, back, elastic, and bounce transitions are available;
transition_fn accepts a custom fn (f64) f64 curve.
Use + or sequence(...) to run definitions in order and parallel(...) to
run them together:
there_and_back := ui2.animation(duration: 0.4, x: 320) +
ui2.animation(duration: 0.4, x: 20)
pulse := ui2.parallel(
ui2.animation(duration: 0.25, width: 140, height: 140),
ui2.animation(duration: 0.25, background: u32(0x60a5fa)),
)
there_and_back.repeating().start('tile')
pulse.start('badge')
stop_animation emits a .complete callback while cancel_animation does
not; their property-specific and all-widget variants follow the same rule.
Both retain the values currently on screen, as does natural completion.
clear_animation(id) releases those retained values and returns the element to
its declaration. Query animation_info(id) for status and progress, or attach
one callback for .start, .progress, and .complete with on_event or
with_event_handler.
run_vml[T] parses the document once, owns a model for the window, and exposes
its public fields as app:
ui2.run_vml[App](
source: $embed_file('app.vml').to_string()
model: App{}
title: 'My app'
width: 780
height: 420
)!
For VML that ships with the application, the v3 compiler can lower the document
straight to V expressions that construct ui2.Element values. Name the model
parameter app, use $vml in a build function, and pass it to
run_compiled_vml:
fn build(app &App) ui2.Element {
return $vml('app.vml')
}
fn main() {
ui2.run_compiled_vml[App](
model: App{}
build: build
title: 'My app'
width: 780
height: 420
)!
}
$vml reads and validates the document during compilation, then emits direct
element constructors and V loops for repeaters. Refreshes evaluate model
expressions and build the element tree without parsing VML or interpreting an
expression AST. Typed actions and bind.text/bind.checked/bind.active/
bind.value are handled by the compiled runner. Keep using run_vml when the
VML source must be loaded or edited at runtime.
The compile-time form currently requires the v3 compiler. The included benchmark caches parsing for the runtime-VML baseline, so it compares steady-state tree building rather than charging runtime VML for repeatedly parsing the file:
/path/to/vnew -nocache -prod \
-path "$(dirname "$PWD")|@vlib|@vmodules" \
-o /tmp/ui2-vml-build-bench benchmarks/vml_build/main.v
/tmp/ui2-vml-build-bench
Ordinary properties are one-way expressions. bind.text and bind.checked
write control edits back to a public mutable model field, including nested struct
paths such as bind.text: app.profile.name. Every field along the path must be
public and mutable. Boolean and numeric bindings validate the leaf field type.
Public model methods with no arguments, one int, or one string argument can be used as
actions:
TextField { bind.text: app.name }
Button {
text: "Add"
enabled: app.users.len < app.max_users
on_tap: app.add_user()
}
On macOS, set native: true on a Button (or wrap a V-built button with
with_native_style) to let AppKit own its bezel, font, hover, and pressed
appearance. Its declared colors remain the fallback for the custom renderer.
Runtime VML event handlers (run_vml and VmlApp) can also assign an ordinary
VML expression to a public mutable top-level model field, which is useful for
simple state transitions that do not need a dedicated model method:
Button { text: "Home" on_tap: app.screen_name = "home" }
Action arguments and assignment values are evaluated when the event is dispatched, after any two-way binding on that event has written the control value into the model.
Expressions support property paths, arithmetic, comparisons, boolean operators, conditionals, parentheses, and string interpolation. They are side-effect-free outside event handlers; calls and assignments are restricted to event handlers. Unknown model paths, non-writable binding targets, and invalid action signatures fail document loading.
Compile-time $vml supports typed method actions and two-way bindings, but not
event assignments; use a public model method for those transitions.
Validation traverses every expression branch and repeater item schema without
executing expressions against the model's initial values.
Use a keyed Repeater for model collections. item and index are scoped to
each instance, and the evaluated key becomes Element.key for reconciliation:
Repeater {
model: app.users
key: item.id
Label { text: "${item.name}" }
}
A Button can be styled directly in VML. Leave native unset when the
application should own its colors and shape; native: true requests the
standard native-style appearance instead. For one shared look across many
buttons, prefer a sheet rule (Button.primary { ... } in a Style block
or the global sheet, matched with class: primary) over repeating props —
see Styling.
Button {
id: save
text: "Save"
on_tap: app.save()
x: 20
y: 20
width: 120
height: 40
background: #2563EB
border_color: #1D4ED8
border_width: 1
corner_radius: 8
color: #FFFFFF
bold: true
}
When the button needs arbitrary content rather than a single caption, compose
it from a Rectangle (or View) and opt the container into button activation
with button_behavior: true. The whole rectangle is the activation target;
noninteractive children such as its Label do not block the tap:
Rectangle {
id: save_card
button_behavior: true
on_tap: app.save()
x: 20
y: 20
width: 180
height: 56
background: #2563EB
corner_radius: 8
cursor: "pointing_hand"
Label {
text: "Save changes"
x: 16
y: 16
width: 148
height: 24
align: center
color: #FFFFFF
bold: true
}
}
button_behavior emits the ordinary on_tap action once when a press starts
on the element and is released inside without becoming a drag or scroll
gesture. It also gives the composite the default accessibility role button
and derives its accessibility label from the first visible, noninteractive
descendant with a label or text; set accessibility_role or
accessibility_label explicitly to override those defaults.
This adds activation semantics without requesting a native bezel or pressed
visuals—the rectangle and its children remain application-drawn. The native
Windows backend exposes the composite as a focusable button to accessibility
tools and supports Enter/Space activation; the other renderers do not add
native keyboard focus treatment. Use Button when a platform-drawn bezel and
pressed state are required.
This is deliberately separate from clickable: true. A clickable view is a
low-level pointer surface that reports pointer:down:... and pointer:up:...
events (and can be combined with draggable) for code that needs coordinates
or gesture phases. Use button_behavior for a normal action-bearing composite
control. If both flags are set, the surface emits the raw pointer phases and
then its ordinary action after a successful tap.
hoverable: true (or ui2.with_hover(el)) makes any element report
pointer:enter:<action>:<x>:<y> when the pointer comes over it and
pointer:leave:... when it goes, so a hover card can open or a row can
highlight. ui2.parse_pointer_event(event) decodes these and the other
pointer phases, including actions that contain colons.
Hover follows the CSS :hover
vlang/ui2 is a public repo on GitHub by vlang. Its maker has not written a description.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-21. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run ui2. What is known comes from GitHub. It declares the MIT license on GitHub. Its last change was on 2026-11-21. It has 76 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.