Irihi.Mafia.Themes.TDesign
0.0.2
Prefix Reserved
dotnet add package Irihi.Mafia.Themes.TDesign --version 0.0.2
NuGet\Install-Package Irihi.Mafia.Themes.TDesign -Version 0.0.2
<PackageReference Include="Irihi.Mafia.Themes.TDesign" Version="0.0.2" />
<PackageVersion Include="Irihi.Mafia.Themes.TDesign" Version="0.0.2" />
<PackageReference Include="Irihi.Mafia.Themes.TDesign" />
paket add Irihi.Mafia.Themes.TDesign --version 0.0.2
#r "nuget: Irihi.Mafia.Themes.TDesign, 0.0.2"
#:package Irihi.Mafia.Themes.TDesign@0.0.2
#addin nuget:?package=Irihi.Mafia.Themes.TDesign&version=0.0.2
#tool nuget:?package=Irihi.Mafia.Themes.TDesign&version=0.0.2
<p align="center"> <img src="./assets/mafia.svg" alt="MAFIA" width="296" /> </p>
IRIHI Mafia
This project is in early development and not yet ready for production use. APIs, controls, and themes may change significantly between releases. Use at your own risk.
Mobile-first Avalonia UI control library and TDesign-inspired theme.
Irihi.Mafia is a mobile-first Avalonia control library β crafted for touch interactions, thumb-friendly sizing, and responsive layouts from the ground up. It also provides a complete visual theme based on TDesign design language, with full light/dark mode support.
Features
- π± Mobile-first design β Touch-optimized controls, generous tap targets, thumb-friendly spacing
- π¨ TDesign-inspired theme β A comprehensive light & dark theme with design token system (colors, typography, spacing, radius)
- π§© Custom controls β Avatar, Cell/ CellGroup, Divider, IconButton, Picker, Popup and more
- π Light/Dark mode β Built-in theme variants with consistent color palettes
- π¦ Modular packages β Core logic library and theme library are separate NuGet packages
- π₯οΈ Cross-platform β Works on Windows, macOS, Linux, Android, iOS and Browser via Avalonia
Packages
Getting Started
1. Install the packages
dotnet add package Irihi.Mafia
dotnet add package Irihi.Mafia.Themes.TDesign
You only need
Irihi.Mafiaif you want to write your own theme; for most projects, install both packages.
2. Apply the theme
In your App.axaml, add the TDesign theme:
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:td="https://irihi.tech/td"
x:Class="MyApp.App">
<Application.Styles>
<td:TDesignTheme />
</Application.Styles>
</Application>
3. Use the controls
xmlns:m="https://irihi.tech/mafia"
<m:IconButton Icon="emoji_smile"
Shape="Circle"
Variant="Outline" />
<m:Cell Description="User settings"
Note="Manage your preferences"
IsRequired="True" />
<m:Avatar Width="40" Height="40"
Source="{Binding ProfileImage}" />
Controls Overview
Many more controls are still in design and development. The current list represents only what has been implemented so far.
| Control | Description |
|---|---|
Avatar |
Button with an image source, for user avatars |
Cell |
List item with description, note, and inner content slots |
CellGroup |
Groups Cell items under a header |
Divider |
A horizontal or vertical separator line |
IconButton |
Button with icon, loading state, shape and variant options |
Picker |
Drop-down selection control with confirm mode and search |
Popup |
Flexible popup with modal mask, placement and animation support |
Project Structure
src/
βββ Irihi.Mafia/ # Core control library
β βββ Controls/ # Custom control implementations
β β βββ Avatar/
β β βββ Cell/
β β βββ Divider.cs
β β βββ IconButton.cs
β β βββ Picker.cs
β β βββ Primitives/ # Popup, OverlayPopupHost
β βββ Common/ # Shared enums (Position, PopupPlacement)
β
βββ Irihi.Mafia.Themes.TDesign/ # TDesign-themed visual library
βββ TDesignTheme.axaml # Theme entry point
βββ Controls/ # 24 ControlTheme definitions
βββ Tokens/ # Design tokens (colors, fonts, radius, sizes)
βββ Themes/ # Light & Dark variant resource dictionaries
βββ Styles/ # Global style selectors
demo/
βββ Irihi.Mafia.Demo/ # Shared demo application
βββ Irihi.Mafia.Demo.Desktop # Windows/macOS/Linux launcher
βββ Irihi.Mafia.Demo.Browser # WebAssembly launcher
βββ Irihi.Mafia.Demo.Android # Android launcher
βββ Irihi.Mafia.Demo.iOS # iOS launcher
Theme Customization
The TDesign theme uses a layered token system, making customization straightforward:
- Design tokens (
Tokens/) β Atomic values for colors, fonts, radius, and spacing - Shared dimensions (
Themes/Shared/) β Component-level size and padding references - Theme variant (
Themes/Light/,Themes/Dark/) β Color mappings per light/dark mode - Control templates (
Controls/) β Visual tree and bindings for each control
To customize, override any DynamicResource key from your app:
<Application.Resources>
<SolidColorBrush x:Key="TDBrandColor" Color="#FF5722" />
</Application.Resources>
Build from Source
# Clone the repository
git clone https://github.com/irihitech/Irihi.Mafia.git
cd Irihi.Mafia
# Build
dotnet build
# Run tests
dotnet test
# Run the desktop demo
dotnet run --project demo/Irihi.Mafia.Demo.Desktop
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Copyright (c) 2026 IRIHI Technology
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Irihi.Mafia (>= 0.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.