A gallery of eight complete apps and five guided suites built with WebSharper.UI — the reactive, composable user-interface library for F#. Everything is compiled from F# to JavaScript and runs entirely in the browser; the gallery itself is a WebSharper.UI SPA.
Try it live · WebSharper · Library source
Substantive, self-contained applications that combine variables, views, collections, forms, async loading and SVG charts.
| App | What it demonstrates |
|---|---|
| Dashboard | Live KPIs, range controls and an animated trend chart fed by a timer |
| Kanban board | Drag-and-drop columns, priorities and search over a ListModel |
| Expense tracker | Forms, typed categories, a budget bar and a live breakdown |
| Data explorer | Async CSV loading, search, sorting, paging and row details |
| Todos | Priorities, filters, progress and bulk actions |
| Community board | Sign-in, threads, replies and search over a simulated async service |
| Game of Life | A cellular automaton with timers, speed control and a reactive grid |
| Onboarding flow | A validated, animated multi-step Flow with review and restart |
Focused tours of one part of the library, with several demos per page.
| Suite | Contents |
|---|---|
| Reactive basics | Vars, derived views, HTML templates and a small calculator |
| Collections & selection | Filterable lists, editable records, check boxes and radios |
| Pointer & keyboard | Live mouse/keyboard views, a click pad and a virtual keyboard |
| Chart lab | Animated CSV-driven bar charts and sortable SVG charts |
| Mini-site | A routed, animated multi-page site nested in the gallery router |
-
src/wwwroot/index.htmlis the whole-page HTML template. Its two typed holes —ws-hole="Nav"andws-hole="Main"— are filled by the site shell:ShellTemplate() .Nav(NavBar var) .Main(main) .Bind()
-
src/Samples.fsdefines the sample catalogue, the app/suite grouping and the route type. Routing is hash-based (#/samples/Dashboard), so the static build works on GitHub Pages without server rewrites. -
Each app and suite lives in its own F# file and registers itself with
Samples.Build(...). There are no external UI or chart dependencies: the charts insrc/Charts.fsare small SVG helpers, and the design system insrc/wwwroot/style.cssis self-contained.
ui/
src/
Utilities.fs # shared UI helpers
Charts.fs # dependency-free SVG chart components
Samples.fs # catalogue, sidebar, sample framework
Site.fs # shell, home page, navigation, routing
Client.fs # [<SPAEntryPoint>]
Dashboard.fs # \
KanbanBoard.fs # |
ExpenseTracker.fs # | apps
DataExplorer.fs # |
TodoApp.fs # |
CommunityBoard.fs # |
GameOfLife.fs # |
OnboardingFlow.fs # /
VarPlayground.fs # \
CollectionsSuite.fs # |
InputInspector.fs # | suites
ChartLab.fs # |
MiniSite.fs # /
InputTransformTemplate.html
wwwroot/
index.html # whole-page gallery template
style.css # self-contained design system
DataExplorer.csv # dataset for the data explorer
ObjectConstancy.csv # dataset for the chart lab
AlphaFrequency.csv # dataset for the chart lab
files/ # logo
wsconfig.json # WebSharper SPA settings
package.json # esbuild
esbuild.config.mjs # bundles Release output into dist/
docs/screenshot.png
.github/workflows/deploy.yml
README.md
The site is fully static: build it in Release, then serve dist/.
dotnet build src/WebSharper.UI.Samples.fsproj -c Release
python3 -m http.server 5290 --bind 127.0.0.1 --directory distOpen http://127.0.0.1:5290/. (npm run serve does the same from src/.)
dotnet build src/WebSharper.UI.Samples.fsproj -c ReleaseWebSharper compiles the F# sources to src/build/, and
esbuild bundles the entry point to
dist/Scripts/WebSharper.UI.Samples.min.js while copying the static assets to
dist/.
Every push to main triggers
.github/workflows/deploy.yml, which builds in
Release and publishes dist/ to the gh-pages branch with GitHub Pages.
Built with WebSharper. WebSharper is open source; see the library repository.
