Every business app needs the same things before it needs anything of its own: buttons and fields that agree with each
other, dialogs and menus that trap focus and close on Escape, a data grid that sorts, filters and exports, settings
pages, empty and loading states — and a shell to hold it all: a sidebar or a rail, a top bar with search and a
command menu, a phone layout that turns the navigation into a drawer. This package is that vocabulary, written in
Osy# and themed by tokens, so an app re-skins it by declaring a theme rather than by restyling each control.
Every Osy# app has it in scope — the CLI ships it, so it resolves offline, with no using needed. Pin a major in
app.osy when you want a lock to name the version you built against:
app Fulcrum {
use Osysharp.Ui@3;
…
}
[Route("/orders")]
component Orders() {
live var orders = Order.Where(o => o.Total >= 0);
render {
PageHead("Orders", subtitle: "Every open sales order.");
DataGrid(
rows: orders,
label: "Orders",
filterable: true,
columns: [
new GridColumn<Order> { Name = "Reference", Label = "Reference", Value = o => o.Reference },
new GridColumn<Order> { Name = "Customer", Label = "Customer", Value = o => o.Customer },
new GridColumn<Order> { Name = "Total", Label = "Total", Kind = GridColumnKind.Number,
Value = o => o.Total.ToString("N0"), Number = o => o.Total }
]);
}
}
osy kit lists all of it with each control's arguments; osy kit <Control> prints one control's source, and
osy kit shells shows the arrangements a shell can take.
| group | controls |
|---|---|
| actions | Button, IconButton, Menu, MenuItem, CommandMenu, KeyHint |
| input | Field, NumberField, DecimalField, DurationField, DatePicker, DateTimePicker, Dropdown, SearchPicker, RadioGroup, Checkbox, Option, SearchField |
| overlays | Dialog, Backdrop, Scrim, ShellSheet, KeyboardSheet, AssistantPanel |
| data | DataGrid (selectable, with a selection toolbar, and Load more), LoadMoreButton, SelectionBar, FilterChip, Card, Metric, Badge, RecordBadge, RecordPanel, ListRow |
| feedback | Alert, Done, EmptyState, ProgressBar, Spinner, Skeleton, SaveBar, SaveActions, AutoSave, LeavePrompt, Lamp |
| settings | SettingsArea, SettingsPage, SettingsSection, SettingRow, SettingsOverview |
| shells | SidebarShell, RailShell, TabbedShell, WorkbenchShell, FocusedShell, SplitShell, CatalogueShell, EditorialShell, MarqueeShell, StorefrontShell |
| page arrangements | Dock (right and bottom drawers), SubNav, Paper, WidgetGrid, Widget |
| typography | PageHead, PageTitle, CardTitle, SectionLabel, FieldLabel, Hint, Strong |
| media | AmbientVideo — a background film with its own pause |
| codes | QrCode — a QR code a phone can scan, dark on white whatever the theme |
Its words are translated (locales/), and every control is keyboard-reachable and labelled for a screen reader.
- Source: one
.osyfile per group in this folder (Button.osy,DataGrid.osy,Shell.Sidebar.osy, …), the default theme intheme.osy. - Tests:
tests/. - Package:
use Osysharp.Ui@3;— the CLI carries the current release, andosy lockfetches any other from this repository's releases.
To build your own look on top of it, declare a theme in your app — its tokens re-skin every control. To change a
control itself, copy its file into your app or into a package of your own, rename the component, and use yours.
Taken from this package's own tests, which compile and run on every release.
[Test]
void a_danger_icon_button_asks_before_it_acts() {
Ui.Visit("/offcuts");
Ui.Click("Scrap Oak, 40cm");
Assert.Dialog("Scrap Oak, 40cm?");
Assert.Visible("3 offcuts"); // nothing has happened yet
Ui.Click("Cancel");
Assert.Visible("Oak, 40cm");
Assert.Visible("3 offcuts");
Ui.Click("Scrap Oak, 40cm");
Ui.Click("Scrap Oak, 40cm", within: "Scrap Oak, 40cm?");
Assert.Hidden("Oak, 40cm");
Assert.Visible("2 offcuts");
}
From tests/ask-first.test.osy.
[Test(Workshop)]
void bullets_hang_their_points_in_the_list_s_indent() {
Ui.SignInAs(Tom);
Ui.Visit("/bullets");
Assert.Visible("Ready to build");
Assert.Visible("Waiting on a decision");
Assert.Below("Waiting on a decision", "Ready to build");
Assert.Inside("Ready to build", "Checks");
Assert.Wider("Checks", "Ready to build");
// ENG-KIT-TONES-TABS-4: and each point is drawn WITH its marker — the disc no order or size claim can see
Assert.HasListMarker("Ready to build");
Assert.HasListMarker("Waiting on a decision");
}
From tests/bullets.test.osy.
[Test(Workshop)]
void the_editing_parts_keep_the_board_s_geometry() {
Ui.SignInAs(Tom);
Ui.Visit("/editing-geometry");
Assert.SameHeight("Kit banner", "Board banner");
Assert.SameHeight("Kit history rows", "Board history rows");
Assert.SameHeight("Kit tab strips", "Board tab strips");
Assert.SameHeight("Kit setting", "Board setting");
// the floor keeps a step between points
Assert.Taller("Kit bullets", "Board bullets");
Ui.Click("Design geometry");
Assert.SameHeight("Kit bullets", "Board bullets");
Assert.SameHeight("Kit banner", "Board banner");
// at the design's 44px tabs the strip is still the tab and its rule
Assert.SameHeight("Kit tab strips", "Board tab strips");
Assert.SameHeight("Kit history rows", "Board history rows");
}
From tests/editing-geometry.test.osy.
- The Osysharp.Ui reference
- Osysharp.Ui in the package catalogue
- The Osy# reference — the language, the runtime and every kit
llms-full.txt— the whole reference and specification as one Markdown file, for a coding agent
MIT — see LICENSE.

