mlang is a lightweight, declarative markup language for UI creation and interaction.
It allows you to define UI components, styles, images, links, buttons, and behaviors in a concise and readable format.
Features
Define styles with size, color, background, and more.
Add text elements with styling.
Embed images from URLs.
Insert dividers for layout separation.
Create clickable links and buttons with custom actions.
Support for interactive behavior on button press (e.g., launch confetti).
Example Usage
<require&ui&module let.Module.Load&m>
# Styles
require.Set.Style &id=b1 selective.Size=size=120%, selective.Color=color=blue
require.Set.Style &id=b2 selective.Size=size=100%, selective.Color=color=darkgray
require.Set.Style &id=btn1 selective.Size=size=100%, selective.Color=color=white, selective.Background=blue
# Text assignment
require.Set.Text &id=b1 text="Welcome to M"
require.Set.Text &id=b2 text="Subtitle here"
# Add an image
require.Image &id=img1 img?src=("https://example.com/img.png")
# Add a divider
require.Div &id=div1
# Create a clickable link
require.Link &id=lnk1 url="https://example.com" text="Visit Example"
# Create a button with text and link action
require.Button &id=btn1 text="Click Me" onClick="https://example.com"
require.Set=onButton?nolink=yes&when.Pressed&launchConfetti=yes&text=("Press Me!")
END MODULES