Velvet is a beginner-friendly C++ GUI framework built on SFML.
This documentation is focused on how to build screens quickly and how each widget is configured.
Core idea
Build a tree of widgets, then add the root to a Window:
- Create a
Window
- Create layout containers (
HStack / VStack)
- Add widgets (
Label, Button, Slider, Image, etc.)
- Bind callbacks (
onclick, onchange)
- Start the event loop with
window.run()
Velvet handles:
- event forwarding
- rendering
- cursor updates
- simple layout positioning
Start here
A minimal app

int main() {
Window window(800, 600,
"Hello Velvet");
root.setPadding(16);
Label title(
"Velvet App", {
{"fontSize", 28.f },
});
Button button(220, 44,
"Click me");
button.onclick = [&] {
title.setText("Clicked!");
};
root.add(title, button);
window.add(root);
window.run();
}
Text display widget with simple style map support.
Definition Label.hpp:23
Vertical stack helper (StackDirection::Vertical).
Definition Stack.hpp:400
Application window and main event/render loop.
Definition Window.hpp:19
Head on over to @ref quickstart "Quickstart" to learn how to use Velvet.