Skip to content

Instantly share code, notes, and snippets.

@wmoxam
Created Aug 16, 2017
Embed
What would you like to do?
require "motif"
app = Motif.new(ARGV, {title: "Hello"})
button = Motif.create_element(
Motif::PushButton,
{
label: "Push here to say hello"
}.to_h
)
button.add_callback {
puts "Hello from Crystal"
}
app.render(button)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment