# Xui.ToolKit.UI.Design

Assembly: **Xui.ToolKit.UI** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`class ColorGroup`](#api-fc118378acb49011)
- [`enum ColorHarmony`](#api-1906268d87a56609)
- [`readonly struct CurveToken`](#api-1c71723365ef832e)
- [`enum DesignSystemChange`](#api-a7f3f2366fa87abd)
- [`class DesignSystemView`](#api-8d0cc14df6e02232)
- [`interface IColorSystem`](#api-2c3eac0de7c93348)
- [`interface IDesignSystem`](#api-bf180554dd1b76ae)
- [`interface IDesignSystemChangeNotifications`](#api-4d04b08f39b3fe3b)
- [`interface IMotionSystem`](#api-c9ae29dbc62a10c7)
- [`interface IShapeSystem`](#api-410b805a491fd0d5)
- [`interface ISpacingSystem`](#api-a2b5291142fc9cd1)
- [`interface ITypographySystem`](#api-5ceea2dc5213824c)
- [`enum MotionPreference`](#api-7f61d425570c3db8)
- [`enum MotionPreset`](#api-9e373d17c6a64fe5)
- [`enum NeutralStyle`](#api-fa879d32a954e29c)
- [`readonly struct Oklch`](#api-3dec07c3988abfe4)
- [`readonly struct OklchRamp`](#api-dd29a8bb7295370b)
- [`enum ShapePreset`](#api-8e6c4351c707b87b)
- [`enum SizingPreset`](#api-dad5a2580cbcf72b)
- [`readonly struct SpacingScale`](#api-f0a755b356358e11)
- [`readonly struct SpringToken`](#api-0e6a98f7c2fe7f8a)
- [`readonly struct TextStyle`](#api-4f7ccbde5aa99716)
- [`readonly struct TextStyleGroup`](#api-3e8713f101bb9270)
- [`class XuiDesignSystem`](#api-32b8d8d8acafb4f6)
- [`readonly struct XuiDesignSystemOptions`](#api-c7af0b7bebb6e67a)

<a id="api-fc118378acb49011"></a>

## `class ColorGroup`

A group of four semantically related colors derived from a single tonal palette, together with the underlying OKLCH ramp that generated them. Shared by all consumers; interaction colors are derived once on demand instead of copied into individual views.

```csharp
public sealed class ColorGroup
{
    public bool IsDark { get; init; }
    public Color HoverBackground { get; }
    public Color PressedBackground { get; }
    public Color PressedContainer { get; }
    public Color ToggleHoverBackground { get; }
    public Color SelectedPressedBackground { get; }
    public Color Background { get; init; }
    public Color Foreground { get; init; }
    public Color Container { get; init; }
    public Color OnContainer { get; init; }
    public OklchRamp Ramp { get; init; }
    public nfloat BackgroundLightness { get; init; }

    public static ColorGroup FromRamp(OklchRamp ramp, bool isDark);
}
```

<a id="api-2f11c213086af68a"></a>

### [`Color ColorGroup.Background`](#api-2f11c213086af68a)


```csharp
public Color Background { get; init; }
```

Strong, saturated action color (ramp at tone 0.56 light / 0.75 dark). Use as fill for filled buttons, active indicators, primary UI elements.

<a id="api-8cac128d984016fe"></a>

### [`NFloat ColorGroup.BackgroundLightness`](#api-8cac128d984016fe)


```csharp
public nfloat BackgroundLightness { get; init; }
```

The lightness value (0–1) used to produce [`Xui.ToolKit.UI.Design.ColorGroup.Background`](../xui-toolkit-ui-design/index.md#api-2f11c213086af68a) from the ramp. Enables relative hover/press offset computation.

<a id="api-afa6a8b96734c42b"></a>

### [`Color ColorGroup.Container`](#api-afa6a8b96734c42b)


```csharp
public Color Container { get; init; }
```

Light tinted fill from the same palette (ramp at tone 0.90 light / 0.30 dark). Use for tonal buttons, chips, and highlighted list rows.

<a id="api-91b24a3f05df0fd3"></a>

### [`Color ColorGroup.Foreground`](#api-91b24a3f05df0fd3)


```csharp
public Color Foreground { get; init; }
```

Black or white text/icon color on Background, selected by its actual luminance.

<a id="api-71d775d13e68c462"></a>

### [`ColorGroup ColorGroup.FromRamp(OklchRamp ramp, bool isDark)`](#api-71d775d13e68c462)


```csharp
public static ColorGroup FromRamp(OklchRamp ramp, bool isDark);
```

Creates a [`Xui.ToolKit.UI.Design.ColorGroup`](../xui-toolkit-ui-design/index.md#api-fc118378acb49011) from a tonal ramp and color scheme.

<a id="api-b52d1f5005834518"></a>

### [`Color ColorGroup.HoverBackground`](#api-b52d1f5005834518)


```csharp
public Color HoverBackground { get; }
```

Background for a hovered filled control.

<a id="api-e7d296bf91a17c51"></a>

### [`bool ColorGroup.IsDark`](#api-e7d296bf91a17c51)


```csharp
public bool IsDark { get; init; }
```

Whether this group belongs to a dark appearance palette.

<a id="api-5ed4593e3a476a72"></a>

### [`Color ColorGroup.OnContainer`](#api-5ed4593e3a476a72)


```csharp
public Color OnContainer { get; init; }
```

Text/icon color on top of Container (ramp at tone 0.10 light / 0.90 dark).

<a id="api-5cd8a7292f8ad1d8"></a>

### [`Color ColorGroup.PressedBackground`](#api-5cd8a7292f8ad1d8)


```csharp
public Color PressedBackground { get; }
```

Background for a pressed filled control.

<a id="api-2931a173e6c577b0"></a>

### [`Color ColorGroup.PressedContainer`](#api-2931a173e6c577b0)


```csharp
public Color PressedContainer { get; }
```

Pressed state layer for an outline or text control.

<a id="api-6e9f1d468cbf9d16"></a>

### [`OklchRamp ColorGroup.Ramp`](#api-6e9f1d468cbf9d16)


```csharp
public OklchRamp Ramp { get; init; }
```

The full tonal ramp for this palette entry (Lightness 0 to 1 at the group&#39;s hue). Use for computing hover/press state colors.

<a id="api-9130d523b55c0e71"></a>

### [`Color ColorGroup.SelectedPressedBackground`](#api-9130d523b55c0e71)


```csharp
public Color SelectedPressedBackground { get; }
```

Pressed background within a segmented selection.

<a id="api-e142fc8b0e958912"></a>

### [`Color ColorGroup.ToggleHoverBackground`](#api-e142fc8b0e958912)


```csharp
public Color ToggleHoverBackground { get; }
```

Hovered active toggle track.


<a id="api-1906268d87a56609"></a>

## `enum ColorHarmony`

Color-scheme relationship used to derive secondary/tertiary hues from a primary hue.

```csharp
public enum ColorHarmony
{
    Complementary,
    Analogous,
    SplitComplementary,
    Triadic,
    Tetradic,
}
```

<a id="api-87ac7636f40ab6a4"></a>

### [`ColorHarmony.Analogous`](#api-87ac7636f40ab6a4)


```csharp
Analogous
```

Secondary = H + 30&#176;, Tertiary = H + 60&#176;.

<a id="api-37f3aa756c0a0e7d"></a>

### [`ColorHarmony.Complementary`](#api-37f3aa756c0a0e7d)


```csharp
Complementary
```

Secondary = H + 180&#176;.

<a id="api-fa131d757a8cf5a4"></a>

### [`ColorHarmony.SplitComplementary`](#api-fa131d757a8cf5a4)


```csharp
SplitComplementary
```

Secondary = H + 150&#176;, Tertiary = H + 210&#176;.

<a id="api-f7dd9a29fd314449"></a>

### [`ColorHarmony.Tetradic`](#api-f7dd9a29fd314449)


```csharp
Tetradic
```

Secondary = H + 90&#176;, Tertiary = H + 180&#176;, Quaternary = H + 270&#176;.

<a id="api-61bb0f7e427c274d"></a>

### [`ColorHarmony.Triadic`](#api-61bb0f7e427c274d)


```csharp
Triadic
```

Secondary = H + 120&#176;, Tertiary = H + 240&#176;.


<a id="api-1c71723365ef832e"></a>

## `readonly struct CurveToken`

An easing curve paired with a default duration for animation. Wraps `Xui.Core.Animation.Easing.CubicBezier` from Xui.Core.Animation.

```csharp
public readonly struct CurveToken
{
    public Easing.CubicBezier Curve { get; init; }
    public TimeSpan DefaultDuration { get; init; }
}
```

<a id="api-cc85fe9318e46823"></a>

### [`CubicBezier CurveToken.Curve`](#api-cc85fe9318e46823)


```csharp
public Easing.CubicBezier Curve { get; init; }
```

The cubic Bezier easing curve.

<a id="api-eb54c003b6de9dc7"></a>

### [`TimeSpan CurveToken.DefaultDuration`](#api-eb54c003b6de9dc7)


```csharp
public TimeSpan DefaultDuration { get; init; }
```

Default duration for this easing curve.


<a id="api-a7f3f2366fa87abd"></a>

## `enum DesignSystemChange`

Token groups affected by a live design-system update.

```csharp
[Flags]
public enum DesignSystemChange
{
    None = 0,
    Colors = 1,
    Typography = 2,
    Spacing = 4,
    Shape = 8,
    Motion = 16,
    All = Colors | Typography | Spacing | Shape | Motion,
}
```

<a id="api-969af1936b419df8"></a>

### [`DesignSystemChange.All`](#api-969af1936b419df8)


```csharp
All = Colors | Typography | Spacing | Shape | Motion
```

Initial application or a complete refresh of every token group.

<a id="api-6f19207d2ec93762"></a>

### [`DesignSystemChange.Colors`](#api-6f19207d2ec93762)


```csharp
Colors = 1
```

Palette or appearance changed; redraw without layout.

<a id="api-114a6913161c9583"></a>

### [`DesignSystemChange.Motion`](#api-114a6913161c9583)


```csharp
Motion = 16
```

Animation preferences or timings changed.

<a id="api-e51b836fcb3f4a1a"></a>

### [`DesignSystemChange.None`](#api-e51b836fcb3f4a1a)


```csharp
None = 0
```

No tokens changed.

<a id="api-c7c70d80269fff9c"></a>

### [`DesignSystemChange.Shape`](#api-c7c70d80269fff9c)


```csharp
Shape = 8
```

Corner radii changed; redraw without layout.

<a id="api-289a64ca4faa4a10"></a>

### [`DesignSystemChange.Spacing`](#api-289a64ca4faa4a10)


```csharp
Spacing = 4
```

Spacing or control sizing changed; measure and arrange again.

<a id="api-12441b0b8ad3873f"></a>

### [`DesignSystemChange.Typography`](#api-12441b0b8ad3873f)


```csharp
Typography = 2
```

Font family or metrics changed; measure and arrange again.


<a id="api-8d0cc14df6e02232"></a>

## `class DesignSystemView`

Provides a device-aware design system to a subtree of controls.

```csharp
public sealed class DesignSystemView : View
{
    public DesignSystemView(View content, XuiDesignSystemOptions? options = null);
    public override int Count { get; }

    public override View this[int index] { get; }

    public override object? GetService(Type type);
    protected override void OnActivate();
    protected override void OnDeactivate();
    protected override Size MeasureCore(Size available, IMeasureContext context);
    protected override void ArrangeCore(Rect rect, IMeasureContext context);
}
```

<a id="api-d0ba4fce65c356b4"></a>

### [`DesignSystemView.DesignSystemView(View content, XuiDesignSystemOptions? options = null)`](#api-d0ba4fce65c356b4)


```csharp
public DesignSystemView(View content, XuiDesignSystemOptions? options = null);
```

Wraps content with the supplied theme, or the default Xui theme.

<a id="api-dc374c0c9158528d"></a>

### [`void DesignSystemView.ArrangeCore(Rect rect, IMeasureContext context)`](#api-dc374c0c9158528d)


```csharp
protected override void ArrangeCore(Rect rect, IMeasureContext context);
```

Override to arrange children within this view&#39;s final frame.

<a id="api-ee139a4bb775347b"></a>

### [`int DesignSystemView.Count`](#api-ee139a4bb775347b)


```csharp
public override int Count { get; }
```

Returns the number of child views. Used by layout containers and traversal logic. Leaf views should return 0.

<a id="api-7cfa650f0c700f93"></a>

### [`object? DesignSystemView.GetService(Type type)`](#api-7cfa650f0c700f93)


```csharp
public override object? GetService(Type type);
```

Resolves a service of the given type by walking up the parent chain. Returns `null` if no ancestor provides the service.

<a id="api-be506575b6e95948"></a>

### [`View DesignSystemView.this[int index]`](#api-be506575b6e95948)


```csharp
public override View this[int index] { get; }
```

Indexer to access child views by index. Layout containers should implement this to expose their children.

<a id="api-937bd8e8f200e447"></a>

### [`Size DesignSystemView.MeasureCore(Size available, IMeasureContext context)`](#api-937bd8e8f200e447)


```csharp
protected override Size MeasureCore(Size available, IMeasureContext context);
```

Override to compute the desired border-edge size.

<a id="api-ee18abe43011fca1"></a>

### [`void DesignSystemView.OnActivate()`](#api-ee18abe43011fca1)


```csharp
protected override void OnActivate();
```

Called when this view becomes active — it will receive events, render, and animate. Override this to start animations, subscribe to data sources, or acquire resources.

<a id="api-c4ec8af3932cf47d"></a>

### [`void DesignSystemView.OnDeactivate()`](#api-c4ec8af3932cf47d)


```csharp
protected override void OnDeactivate();
```

Called when this view becomes dormant — it should stop animations, timers, and event subscriptions. The view may remain in the tree (e.g., in a virtualizing panel&#39;s recycle pool).


<a id="api-2c3eac0de7c93348"></a>

## `interface IColorSystem`

Provides color roles derived from a seed palette, grouped into semantic [`Xui.ToolKit.UI.Design.ColorGroup`](../xui-toolkit-ui-design/index.md#api-fc118378acb49011) bundles and a set of neutral/structural colors.

```csharp
public interface IColorSystem
{
    ColorGroup Application { get; }

    ColorGroup Surface { get; }

    ColorGroup Neutral { get; }

    Color Outline { get; }

    Color OutlineVariant { get; }

    ColorGroup Primary { get; }

    ColorGroup Secondary { get; }

    ColorGroup Tertiary { get; }

    ColorGroup Warning { get; }

    ColorGroup Error { get; }

    Color FocusRing { get; }

    OklchRamp GetTonalRamp(nfloat hueDegrees, nfloat chroma);
    bool IsDark { get; }
}
```

<a id="api-25626064f792c6d0"></a>

### [`ColorGroup IColorSystem.Application`](#api-25626064f792c6d0)


```csharp
ColorGroup Application { get; }
```

The application canvas color group. Background = window/screen fill, Foreground = body text, Container = card/panel fill, OnContainer = card text.

<a id="api-72f4571d5427966b"></a>

### [`ColorGroup IColorSystem.Error`](#api-72f4571d5427966b)


```csharp
ColorGroup Error { get; }
```

Error / destructive state group (from the Error tonal ramp).

<a id="api-c3a33b90f7d3f03c"></a>

### [`Color IColorSystem.FocusRing`](#api-c3a33b90f7d3f03c)


```csharp
Color FocusRing { get; }
```

Focus ring color (typically Tertiary.Background at full opacity).

<a id="api-6f9a1fc156bf3e27"></a>

### [`OklchRamp IColorSystem.GetTonalRamp(NFloat hueDegrees, NFloat chroma)`](#api-6f9a1fc156bf3e27)


```csharp
OklchRamp GetTonalRamp(nfloat hueDegrees, nfloat chroma);
```

Returns a full tonal ramp for any hue/chroma combination.

<a id="api-fffc0e519325a597"></a>

### [`bool IColorSystem.IsDark`](#api-fffc0e519325a597)


```csharp
bool IsDark { get; }
```

True if the current effective color scheme is dark.

<a id="api-06babe9f1e0bceb1"></a>

### [`ColorGroup IColorSystem.Neutral`](#api-06babe9f1e0bceb1)


```csharp
ColorGroup Neutral { get; }
```

Low-chroma interactive group matching the surface tone. Used for quiet buttons, toolbars, and controls that should not compete with Primary/Secondary/Tertiary.

<a id="api-51311bc54ec11d3d"></a>

### [`Color IColorSystem.Outline`](#api-51311bc54ec11d3d)


```csharp
Color Outline { get; }
```

Neutral border/divider color (mid-tone).

<a id="api-e3993ac449e44659"></a>

### [`Color IColorSystem.OutlineVariant`](#api-e3993ac449e44659)


```csharp
Color OutlineVariant { get; }
```

Lighter neutral border/divider variant.

<a id="api-219bb372f33ea35e"></a>

### [`ColorGroup IColorSystem.Primary`](#api-219bb372f33ea35e)


```csharp
ColorGroup Primary { get; }
```

Brand / primary action group (from the Primary tonal ramp).

<a id="api-034ef8dc9587558e"></a>

### [`ColorGroup IColorSystem.Secondary`](#api-034ef8dc9587558e)


```csharp
ColorGroup Secondary { get; }
```

Supporting / secondary action group (from the Secondary tonal ramp).

<a id="api-f80eda13f45afc76"></a>

### [`ColorGroup IColorSystem.Surface`](#api-f80eda13f45afc76)


```csharp
ColorGroup Surface { get; }
```

The surface (card/panel) color group, slightly elevated from Application. Background = card fill, Foreground = card body text, Container = alternate surface (e.g. alternating table row, hover bg), OnContainer = secondary text on alternate surface.

<a id="api-201e1fc35d936677"></a>

### [`ColorGroup IColorSystem.Tertiary`](#api-201e1fc35d936677)


```csharp
ColorGroup Tertiary { get; }
```

Tertiary highlight / accent group (from the Tertiary tonal ramp).

<a id="api-baec0007c248ee69"></a>

### [`ColorGroup IColorSystem.Warning`](#api-baec0007c248ee69)


```csharp
ColorGroup Warning { get; }
```

Warning / caution state group (yellow-orange tonal ramp).


<a id="api-bf180554dd1b76ae"></a>

## `interface IDesignSystem`

Root interface for the Xui Design System. Resolved from the parent-chain service provider via GetService&lt;IDesignSystem&gt;().

```csharp
public interface IDesignSystem
{
    IColorSystem Colors { get; }

    ITypographySystem Typography { get; }

    ISpacingSystem Spacing { get; }

    IShapeSystem Shape { get; }

    IMotionSystem Motion { get; }

    event Action<DesignSystemChange>? Changed;
}
```

<a id="api-68fe7c213c91afab"></a>

### [`event Action<DesignSystemChange>? IDesignSystem.Changed`](#api-68fe7c213c91afab)


```csharp
event Action<DesignSystemChange>? Changed;
```

Raised with the affected token groups after an update; consumers invalidate only the required passes.

<a id="api-5e7ffbbd974e8e8a"></a>

### [`IColorSystem IDesignSystem.Colors`](#api-5e7ffbbd974e8e8a)


```csharp
IColorSystem Colors { get; }
```

Color tokens and palette math.

<a id="api-99cae3b32ff02419"></a>

### [`IMotionSystem IDesignSystem.Motion`](#api-99cae3b32ff02419)


```csharp
IMotionSystem Motion { get; }
```

Motion tokens (curves and springs).

<a id="api-5f951c8e4b0e15a2"></a>

### [`IShapeSystem IDesignSystem.Shape`](#api-5f951c8e4b0e15a2)


```csharp
IShapeSystem Shape { get; }
```

Shape / corner-radius tokens.

<a id="api-aee99afbd4739a79"></a>

### [`ISpacingSystem IDesignSystem.Spacing`](#api-aee99afbd4739a79)


```csharp
ISpacingSystem Spacing { get; }
```

Spacing tokens derived from the 4-pt grid.

<a id="api-69e808212bbded08"></a>

### [`ITypographySystem IDesignSystem.Typography`](#api-69e808212bbded08)


```csharp
ITypographySystem Typography { get; }
```

Typography scale.


<a id="api-4d04b08f39b3fe3b"></a>

## `interface IDesignSystemChangeNotifications`

Receives a design-token update after a view has resolved its [`Xui.ToolKit.UI.Design.IDesignSystem`](../xui-toolkit-ui-design/index.md#api-bf180554dd1b76ae). Implementations read shared tokens from the retained provider and invalidate only affected passes.

```csharp
public interface IDesignSystemChangeNotifications
{
    void OnDesignTokenChange(DesignSystemChange changes);
}
```

<a id="api-34907fc1e2725b29"></a>

### [`void IDesignSystemChangeNotifications.OnDesignTokenChange(DesignSystemChange changes)`](#api-34907fc1e2725b29)


```csharp
void OnDesignTokenChange(DesignSystemChange changes);
```

Responds to the changed token groups without duplicating theme state on the view.


<a id="api-c9ae29dbc62a10c7"></a>

## `interface IMotionSystem`

Provides motion tokens for animations.

```csharp
public interface IMotionSystem
{
    MotionPreference Preference { get; }

    bool ReducedMotion { get; }

    CurveToken EmphasizedDecelerate { get; }

    CurveToken EmphasizedAccelerate { get; }

    CurveToken Standard { get; }

    CurveToken StandardDecelerate { get; }

    CurveToken StandardAccelerate { get; }

    CurveToken Linear { get; }

    SpringToken SpringBouncy { get; }

    SpringToken SpringResponsive { get; }

    SpringToken SpringSmooth { get; }
}
```

<a id="api-eed37103b69a8174"></a>

### [`CurveToken IMotionSystem.EmphasizedAccelerate`](#api-eed37103b69a8174)


```csharp
CurveToken EmphasizedAccelerate { get; }
```

Elements leaving the screen — (0.3, 0.0, 0.8, 0.15), 200 ms.

<a id="api-1bcdacadb7c2e282"></a>

### [`CurveToken IMotionSystem.EmphasizedDecelerate`](#api-1bcdacadb7c2e282)


```csharp
CurveToken EmphasizedDecelerate { get; }
```

Elements entering the screen — (0.05, 0.7, 0.1, 1.0), 400 ms.

<a id="api-f0169e194947197a"></a>

### [`CurveToken IMotionSystem.Linear`](#api-f0169e194947197a)


```csharp
CurveToken Linear { get; }
```

Progress bars, continuous — (0.0, 0.0, 1.0, 1.0), any duration.

<a id="api-f0701d8f19c90a7f"></a>

### [`MotionPreference IMotionSystem.Preference`](#api-f0701d8f19c90a7f)


```csharp
MotionPreference Preference { get; }
```

Whether springs or curves are preferred for interactive feedback.

<a id="api-07a124a7e25f0123"></a>

### [`bool IMotionSystem.ReducedMotion`](#api-07a124a7e25f0123)


```csharp
bool ReducedMotion { get; }
```

True if the user has requested reduced motion (accessibility).

<a id="api-7ae10dc8addb27cb"></a>

### [`SpringToken IMotionSystem.SpringBouncy`](#api-7ae10dc8addb27cb)


```csharp
SpringToken SpringBouncy { get; }
```

Art / lifestyle apps, button press — stiffness 600, damping 0.5.

<a id="api-038594ddef9606fc"></a>

### [`SpringToken IMotionSystem.SpringResponsive`](#api-038594ddef9606fc)


```csharp
SpringToken SpringResponsive { get; }
```

Default interactive feedback — stiffness 300, damping 0.8.

<a id="api-2956d11ae6960bc4"></a>

### [`SpringToken IMotionSystem.SpringSmooth`](#api-2956d11ae6960bc4)


```csharp
SpringToken SpringSmooth { get; }
```

Business / utility apps, modals — stiffness 200, damping 1.0.

<a id="api-808db06248da3c2f"></a>

### [`CurveToken IMotionSystem.Standard`](#api-808db06248da3c2f)


```csharp
CurveToken Standard { get; }
```

General transitions — (0.2, 0.0, 0.0, 1.0), 300 ms.

<a id="api-4675f696fb752f0c"></a>

### [`CurveToken IMotionSystem.StandardAccelerate`](#api-4675f696fb752f0c)


```csharp
CurveToken StandardAccelerate { get; }
```

Quick dismissals — (0.3, 0.0, 1.0, 1.0), 200 ms.

<a id="api-62b735bab6324c4c"></a>

### [`CurveToken IMotionSystem.StandardDecelerate`](#api-62b735bab6324c4c)


```csharp
CurveToken StandardDecelerate { get; }
```

Settling transitions — (0.0, 0.0, 0.0, 1.0), 250 ms.


<a id="api-410b805a491fd0d5"></a>

## `interface IShapeSystem`

Provides corner-radius tokens scaled by [`Xui.ToolKit.UI.Design.IShapeSystem.RoundnessFactor`](../xui-toolkit-ui-design/index.md#api-00a6a42b2a1107b7).

```csharp
public interface IShapeSystem
{
    nfloat RoundnessFactor { get; }

    CornerRadius None { get; }

    CornerRadius ExtraSmall { get; }

    CornerRadius Small { get; }

    CornerRadius Medium { get; }

    CornerRadius Large { get; }

    CornerRadius ExtraLarge { get; }

    CornerRadius Full { get; }
}
```

<a id="api-562d44213ffc9f1f"></a>

### [`CornerRadius IShapeSystem.ExtraLarge`](#api-562d44213ffc9f1f)


```csharp
CornerRadius ExtraLarge { get; }
```

16 pt base, scaled by RoundnessFactor.

<a id="api-d95911f246fc0273"></a>

### [`CornerRadius IShapeSystem.ExtraSmall`](#api-d95911f246fc0273)


```csharp
CornerRadius ExtraSmall { get; }
```

2 pt base, scaled by RoundnessFactor.

<a id="api-084bfb497cdc7a50"></a>

### [`CornerRadius IShapeSystem.Full`](#api-084bfb497cdc7a50)


```csharp
CornerRadius Full { get; }
```

9999 pt — fully round (pill).

<a id="api-f77a4acd30fa2404"></a>

### [`CornerRadius IShapeSystem.Large`](#api-f77a4acd30fa2404)


```csharp
CornerRadius Large { get; }
```

12 pt base, scaled by RoundnessFactor.

<a id="api-db6fdc19ecb5768c"></a>

### [`CornerRadius IShapeSystem.Medium`](#api-db6fdc19ecb5768c)


```csharp
CornerRadius Medium { get; }
```

8 pt base, scaled by RoundnessFactor.

<a id="api-a56cd1b507062d00"></a>

### [`CornerRadius IShapeSystem.None`](#api-a56cd1b507062d00)


```csharp
CornerRadius None { get; }
```

0 pt — no rounding.

<a id="api-00a6a42b2a1107b7"></a>

### [`NFloat IShapeSystem.RoundnessFactor`](#api-00a6a42b2a1107b7)


```csharp
nfloat RoundnessFactor { get; }
```

Global multiplier for all corner radii (default 1.0).

<a id="api-a92b973ef2f1e1df"></a>

### [`CornerRadius IShapeSystem.Small`](#api-a92b973ef2f1e1df)


```csharp
CornerRadius Small { get; }
```

4 pt base, scaled by RoundnessFactor.


<a id="api-a2b5291142fc9cd1"></a>

## `interface ISpacingSystem`

Provides two parallel spacing scales: 

- [`Xui.ToolKit.UI.Design.ISpacingSystem.Passive`](../xui-toolkit-ui-design/index.md#api-f32caf61ba5c84ce) — for layout, content gaps, margins, card padding.
- [`Xui.ToolKit.UI.Design.ISpacingSystem.Active`](../xui-toolkit-ui-design/index.md#api-15068d7845a8ca41) — for interactive leaf elements (button padding, input fields, hit targets). On desktop, Active aligns with Passive (tight). On touch, Active shifts up so that buttons/inputs get generous padding while layout stays compact.

```csharp
public interface ISpacingSystem
{
    SpacingScale Passive { get; }

    SpacingScale Active { get; }

    nfloat None { get; }
}
```

<a id="api-15068d7845a8ca41"></a>

### [`SpacingScale ISpacingSystem.Active`](#api-15068d7845a8ca41)


```csharp
SpacingScale Active { get; }
```

Interactive element spacing scale (shifted up for touch targets).

<a id="api-47a846feff7e9d02"></a>

### [`NFloat ISpacingSystem.None`](#api-47a846feff7e9d02)


```csharp
nfloat None { get; }
```

0 pt.

<a id="api-f32caf61ba5c84ce"></a>

### [`SpacingScale ISpacingSystem.Passive`](#api-f32caf61ba5c84ce)


```csharp
SpacingScale Passive { get; }
```

Layout/content spacing scale.


<a id="api-5ceea2dc5213824c"></a>

## `interface ITypographySystem`

Provides the typography scale. All FontSize values are pre-multiplied by the accessibility font scale.

```csharp
public interface ITypographySystem
{
    TextStyle Display { get; }

    TextStyleGroup Headline { get; }

    TextStyleGroup Title { get; }

    TextStyleGroup Body { get; }

    TextStyleGroup Label { get; }

    string DefaultFontFamily { get; }
}
```

<a id="api-90093046c46935b0"></a>

### [`TextStyleGroup ITypographySystem.Body`](#api-90093046c46935b0)


```csharp
TextStyleGroup Body { get; }
```

12–16 pt — Reading and UI text.

<a id="api-af40ac0d053b9971"></a>

### [`string ITypographySystem.DefaultFontFamily`](#api-af40ac0d053b9971)


```csharp
string DefaultFontFamily { get; }
```

The default font family used across the application.

<a id="api-1f82d591bfc6ccb7"></a>

### [`TextStyle ITypographySystem.Display`](#api-1f82d591bfc6ccb7)


```csharp
TextStyle Display { get; }
```

57 pt — Hero, marketing, splash.

<a id="api-ee70f0b42682df61"></a>

### [`TextStyleGroup ITypographySystem.Headline`](#api-ee70f0b42682df61)


```csharp
TextStyleGroup Headline { get; }
```

24–32 pt — Page and section titles.

<a id="api-81e645667236eee3"></a>

### [`TextStyleGroup ITypographySystem.Label`](#api-81e645667236eee3)


```csharp
TextStyleGroup Label { get; }
```

11–14 pt — Buttons, badges, captions.

<a id="api-7eabafc0c18d6fde"></a>

### [`TextStyleGroup ITypographySystem.Title`](#api-7eabafc0c18d6fde)


```csharp
TextStyleGroup Title { get; }
```

14–22 pt — Card headers, toolbars, tabs.


<a id="api-7f61d425570c3db8"></a>

## `enum MotionPreference`

Whether the application prefers curve-based (Bezier) or spring-based (physics) animations.

```csharp
public enum MotionPreference
{
    Curve,
    Spring,
}
```

<a id="api-351fb5971567d5c9"></a>

### [`MotionPreference.Curve`](#api-351fb5971567d5c9)


```csharp
Curve
```

Duration + cubic Bezier easing.

<a id="api-35eaec2f52013faa"></a>

### [`MotionPreference.Spring`](#api-35eaec2f52013faa)


```csharp
Spring
```

Spring physics (stiffness + damping).


<a id="api-9e373d17c6a64fe5"></a>

## `enum MotionPreset`

Controls animation timing and whether animations are enabled.

```csharp
public enum MotionPreset
{
    None,
    Short,
    Normal,
    Long,
}
```

<a id="api-73b448d482ba453d"></a>

### [`MotionPreset.Long`](#api-73b448d482ba453d)


```csharp
Long
```

Slow/deliberate animations (200% of normal duration). Useful for review/accessibility.

<a id="api-d9266c173d352611"></a>

### [`MotionPreset.None`](#api-d9266c173d352611)


```csharp
None
```

No animations — all transitions snap instantly.

<a id="api-c28cd77dfda4fb3e"></a>

### [`MotionPreset.Normal`](#api-c28cd77dfda4fb3e)


```csharp
Normal
```

Normal animation timing (default).

<a id="api-b6463abffe802b68"></a>

### [`MotionPreset.Short`](#api-b6463abffe802b68)


```csharp
Short
```

Short/snappy animations (50% of normal duration).


<a id="api-fa879d32a954e29c"></a>

## `enum NeutralStyle`

Controls the relationship between Application and Surface background colors.

```csharp
public enum NeutralStyle
{
    Monochrome,
    SecondaryApp,
    SecondarySurface,
    TertiaryApp,
    TertiarySurface,
}
```

<a id="api-36f8cc8971e68c70"></a>

### [`NeutralStyle.Monochrome`](#api-36f8cc8971e68c70)


```csharp
Monochrome
```

Both Application and Surface are desaturated neutral gray. No hue tint.

<a id="api-3e3bfdb56b1319cc"></a>

### [`NeutralStyle.SecondaryApp`](#api-3e3bfdb56b1319cc)


```csharp
SecondaryApp
```

Application gets a subtle Secondary hue tint, Surface stays neutral. Suitable for apps with many panels/surfaces where the app background groups them.

<a id="api-c75fbbec1bbb1bcc"></a>

### [`NeutralStyle.SecondarySurface`](#api-c75fbbec1bbb1bcc)


```csharp
SecondarySurface
```

Surface gets a subtle Secondary hue tint, Application stays neutral. Suitable when few panels appear and most widgets sit directly on the app background.

<a id="api-a18e464bac87c23c"></a>

### [`NeutralStyle.TertiaryApp`](#api-a18e464bac87c23c)


```csharp
TertiaryApp
```

Application gets a subtle Tertiary hue tint, Surface stays neutral.

<a id="api-040442aa63952bb1"></a>

### [`NeutralStyle.TertiarySurface`](#api-040442aa63952bb1)


```csharp
TertiarySurface
```

Surface gets a subtle Tertiary hue tint, Application stays neutral.


<a id="api-3dec07c3988abfe4"></a>

## `readonly struct Oklch`

OKLCH perceptual color space (Oklab-based Lightness, Chroma, Hue). Interpolation in OKLCH produces vivid, perceptually uniform color transitions. See: https://bottosson.github.io/posts/oklab/

```csharp
public readonly struct Oklch
{
    public nfloat L { get; init; }
    public nfloat C { get; init; }
    public nfloat H { get; init; }

    public Oklch(nfloat l, nfloat c, nfloat h);
    public Oklch(Color color);
    public Color ToColor();
    public static nfloat MaxSrgbChroma(nfloat lightness, nfloat hueDegrees);
    public static implicit operator Color(Oklch oklch);
    public static implicit operator Oklch(Color color);
}
```

<a id="api-340f052b95d95292"></a>

### [`Oklch.Oklch(NFloat l, NFloat c, NFloat h)`](#api-340f052b95d95292)


```csharp
public Oklch(nfloat l, nfloat c, nfloat h);
```

Creates a new OKLCH color value.

<a id="api-dd1f09e17fc66372"></a>

### [`Oklch.Oklch(Color color)`](#api-dd1f09e17fc66372)


```csharp
public Oklch(Color color);
```

Converts an sRGB `Xui.Core.Canvas.Color` to OKLCH.

<a id="api-df9d4325ec0f37b8"></a>

### [`NFloat Oklch.C`](#api-df9d4325ec0f37b8)


```csharp
public nfloat C { get; init; }
```

Colorfulness (0.0 = neutral gray; typical max ~0.37 for sRGB gamut).

<a id="api-a44c2548ed75049e"></a>

### [`NFloat Oklch.H`](#api-a44c2548ed75049e)


```csharp
public nfloat H { get; init; }
```

Hue angle in degrees (0–360).

<a id="api-da2494098fec8449"></a>

### [`NFloat Oklch.L`](#api-da2494098fec8449)


```csharp
public nfloat L { get; init; }
```

Perceptual lightness (0.0 = black, 1.0 = white).

<a id="api-2dbc75f1ff7a08fe"></a>

### [`NFloat Oklch.MaxSrgbChroma(NFloat lightness, NFloat hueDegrees)`](#api-2dbc75f1ff7a08fe)


```csharp
public static nfloat MaxSrgbChroma(nfloat lightness, nfloat hueDegrees);
```

Returns the maximum chroma representable in sRGB for the given lightness and hue. Uses bisection search: for a candidate chroma, convert OKLCH to sRGB and check whether all channels are in [0, 1].

<a id="api-a08b066df909efbe"></a>

### [`Color Oklch.ToColor()`](#api-a08b066df909efbe)


```csharp
public Color ToColor();
```

Converts this OKLCH value back to an sRGB `Xui.Core.Canvas.Color`.

<a id="api-32ed2ec946dedd82"></a>

### [`Oklch.implicit operator Oklch(Color color)`](#api-32ed2ec946dedd82)


```csharp
public static implicit operator Oklch(Color color);
```

Converts an sRGB `Xui.Core.Canvas.Color` to OKLCH.

<a id="api-b9922153fe7e8ad1"></a>

### [`Oklch.implicit operator Color(Oklch oklch)`](#api-b9922153fe7e8ad1)


```csharp
public static implicit operator Color(Oklch oklch);
```

Converts this OKLCH value to an sRGB `Xui.Core.Canvas.Color`.


<a id="api-dd29a8bb7295370b"></a>

## `readonly struct OklchRamp`

A gamut-aware tonal ramp that maps t in [0, 1] to a color at lightness t. At each lightness, chroma is clamped to the sRGB gamut boundary for the hue, ensuring every output color is representable without clipping.

```csharp
public readonly struct OklchRamp
{
    public nfloat Hue { get; init; }
    public nfloat TargetChroma { get; init; }

    public OklchRamp(nfloat hueDegrees, nfloat targetChroma);
    public Color this[nfloat t] { get; }
}
```

<a id="api-534eb90689868933"></a>

### [`OklchRamp.OklchRamp(NFloat hueDegrees, NFloat targetChroma)`](#api-534eb90689868933)


```csharp
public OklchRamp(nfloat hueDegrees, nfloat targetChroma);
```

Creates a gamut-aware tonal ramp for the given hue and target chroma.

- **`hueDegrees`** — Hue angle in degrees (0–360).

- **`targetChroma`** — Desired chroma level (will be clamped to sRGB gamut at each lightness).

<a id="api-4b8822a26782fa61"></a>

### [`NFloat OklchRamp.Hue`](#api-4b8822a26782fa61)


```csharp
public nfloat Hue { get; init; }
```

Hue angle in degrees (0–360).

<a id="api-6881f238c08a5ece"></a>

### [`Color OklchRamp.this[NFloat t]`](#api-6881f238c08a5ece)


```csharp
public Color this[nfloat t] { get; }
```

Evaluates the ramp at position t in [0, 1], returning an sRGB Color. t maps to lightness; chroma is gamut-clamped.

<a id="api-2fc26f18738cf849"></a>

### [`NFloat OklchRamp.TargetChroma`](#api-2fc26f18738cf849)


```csharp
public nfloat TargetChroma { get; init; }
```

Requested target chroma (clamped to sRGB gamut at each lightness).


<a id="api-8e6c4351c707b87b"></a>

## `enum ShapePreset`

Predefined shape profiles that control corner radius tokens across the design system.

```csharp
public enum ShapePreset
{
    Square,
    Desktop,
    Rounded,
    RoundedPill,
    Soft,
}
```

<a id="api-8f60a2ca715b4b9b"></a>

### [`ShapePreset.Desktop`](#api-8f60a2ca715b4b9b)


```csharp
Desktop
```

Classic desktop style: slight container radius (~7pt), square buttons and inputs. Typical of macOS and Windows window chrome.

<a id="api-baab9455d4b0bad0"></a>

### [`ShapePreset.Rounded`](#api-baab9455d4b0bad0)


```csharp
Rounded
```

Modern dialog style: large outer radius, smaller inner radius, small button radius (3–5pt). Similar to macOS alerts and Android Material dialogs.

<a id="api-eefa9963ca467951"></a>

### [`ShapePreset.RoundedPill`](#api-eefa9963ca467951)


```csharp
RoundedPill
```

Same as Rounded but with fully-round (pill) buttons.

<a id="api-15d25882568476c3"></a>

### [`ShapePreset.Soft`](#api-15d25882568476c3)


```csharp
Soft
```

Maximum roundness: large container radius, pill buttons. High visual softness.

<a id="api-e9f2091dfd7c33a6"></a>

### [`ShapePreset.Square`](#api-e9f2091dfd7c33a6)


```csharp
Square
```

All corners square (0 radius everywhere).


<a id="api-dad5a2580cbcf72b"></a>

## `enum SizingPreset`

Predefined sizing profiles that control spacing tokens, minimum hit-test radius, and overall density of the UI.

```csharp
public enum SizingPreset
{
    Desktop,
    TouchEnabled,
    Mobile,
}
```

<a id="api-48ea7a9ceac60f5b"></a>

### [`SizingPreset.Desktop`](#api-48ea7a9ceac60f5b)


```csharp
Desktop
```

Compact desktop: small spacing, small hit targets (4pt), precise pointer assumed. Suitable for dense desktop applications with mouse input.

<a id="api-023e5d5a8dbbec30"></a>

### [`SizingPreset.Mobile`](#api-023e5d5a8dbbec30)


```csharp
Mobile
```

Mobile: generous spacing, large hit targets (22pt), finger-friendly. Suitable for phones and tablets.

<a id="api-cbc5b5b5cb8f7313"></a>

### [`SizingPreset.TouchEnabled`](#api-cbc5b5b5cb8f7313)


```csharp
TouchEnabled
```

Touch-enabled desktop: same compact layout as Desktop but with larger hit targets (22pt). Good for laptop touchscreens and stylus-enabled desktops.


<a id="api-f0a755b356358e11"></a>

## `readonly struct SpacingScale`

A set of spacing values on a geometric scale (S through XXXL). Used for both passive (layout/content) and active (interactive leaf) spacing.

```csharp
public readonly struct SpacingScale
{
    public nfloat S { get; init; }
    public nfloat M { get; init; }
    public nfloat L { get; init; }
    public nfloat XL { get; init; }
    public nfloat XXL { get; init; }
    public nfloat XXXL { get; init; }
    public nfloat MinHitTarget { get; init; }
}
```

<a id="api-d10651549975d227"></a>

### [`NFloat SpacingScale.L`](#api-d10651549975d227)


```csharp
public nfloat L { get; init; }
```

Large spacing.

<a id="api-e7014380e445160b"></a>

### [`NFloat SpacingScale.M`](#api-e7014380e445160b)


```csharp
public nfloat M { get; init; }
```

Medium spacing.

<a id="api-2b50c165b23a56ff"></a>

### [`NFloat SpacingScale.MinHitTarget`](#api-2b50c165b23a56ff)


```csharp
public nfloat MinHitTarget { get; init; }
```

Minimum hit-test dimension for small interactive elements (icon buttons, tree toggles, etc.). On Desktop this is small (e.g. 20pt), on touch it&#39;s finger-sized (e.g. 44pt). Use as MinimumWidth/MinimumHeight on compact clickable views.

<a id="api-f0cd82163a7ff822"></a>

### [`NFloat SpacingScale.S`](#api-f0cd82163a7ff822)


```csharp
public nfloat S { get; init; }
```

Small spacing.

<a id="api-1a98054afd74510d"></a>

### [`NFloat SpacingScale.XL`](#api-1a98054afd74510d)


```csharp
public nfloat XL { get; init; }
```

Extra-large spacing.

<a id="api-14e14e30c3c7e19f"></a>

### [`NFloat SpacingScale.XXL`](#api-14e14e30c3c7e19f)


```csharp
public nfloat XXL { get; init; }
```

2&#215; extra-large spacing.

<a id="api-bcb4ba9a46ab1acc"></a>

### [`NFloat SpacingScale.XXXL`](#api-bcb4ba9a46ab1acc)


```csharp
public nfloat XXXL { get; init; }
```

3&#215; extra-large spacing.


<a id="api-0e6a98f7c2fe7f8a"></a>

## `readonly struct SpringToken`

Spring physics parameters for animation.

```csharp
public readonly struct SpringToken
{
    public float Stiffness { get; init; }
    public float Damping { get; init; }
}
```

<a id="api-713344a1fe28bbbc"></a>

### [`float SpringToken.Damping`](#api-713344a1fe28bbbc)


```csharp
public float Damping { get; init; }
```

Damping ratio (1.0 = critically damped, less than 1.0 = bouncy).

<a id="api-b228a355b1cda62b"></a>

### [`float SpringToken.Stiffness`](#api-b228a355b1cda62b)


```csharp
public float Stiffness { get; init; }
```

Spring stiffness (higher = faster oscillation).


<a id="api-4f7ccbde5aa99716"></a>

## `readonly struct TextStyle`

An immutable snapshot of a single text style from the typography scale.

```csharp
public readonly struct TextStyle()
{
    public string FontFamily { get; init; }
    public nfloat FontSize { get; init; }
    public nfloat LineHeight { get; init; }
    public nfloat LetterSpacing { get; init; }
    public FontWeight FontWeight { get; init; }
    public FontStyle FontStyle { get; init; }
}
```

<a id="api-f78a704e13894f9f"></a>

### [`TextStyle.TextStyle()`](#api-f78a704e13894f9f)


```csharp
public TextStyle();
```

An immutable snapshot of a single text style from the typography scale.

<a id="api-9e126678114431cf"></a>

### [`string TextStyle.FontFamily`](#api-9e126678114431cf)


```csharp
public string FontFamily { get; init; }
```

Font family name.

<a id="api-f20f48bf27beb509"></a>

### [`NFloat TextStyle.FontSize`](#api-f20f48bf27beb509)


```csharp
public nfloat FontSize { get; init; }
```

Font size in points (pre-multiplied by accessibility scale).

<a id="api-a996321eab47f905"></a>

### [`FontStyle TextStyle.FontStyle`](#api-a996321eab47f905)


```csharp
public FontStyle FontStyle { get; init; }
```

Font style (normal, italic, oblique).

<a id="api-8a287ebdeb4bffb2"></a>

### [`FontWeight TextStyle.FontWeight`](#api-8a287ebdeb4bffb2)


```csharp
public FontWeight FontWeight { get; init; }
```

Font weight (100–900).

<a id="api-4e31a12e79e08333"></a>

### [`NFloat TextStyle.LetterSpacing`](#api-4e31a12e79e08333)


```csharp
public nfloat LetterSpacing { get; init; }
```

Additional letter spacing in points.

<a id="api-3933f9845590fb8f"></a>

### [`NFloat TextStyle.LineHeight`](#api-3933f9845590fb8f)


```csharp
public nfloat LineHeight { get; init; }
```

Line height in points.


<a id="api-3e8713f101bb9270"></a>

## `readonly struct TextStyleGroup`

A group of three related text styles at small, medium, and large sizes.

```csharp
public readonly struct TextStyleGroup
{
    public TextStyle S { get; init; }
    public TextStyle M { get; init; }
    public TextStyle L { get; init; }
}
```

<a id="api-de93913f6e5ac4f4"></a>

### [`TextStyle TextStyleGroup.L`](#api-de93913f6e5ac4f4)


```csharp
public TextStyle L { get; init; }
```

Large variant.

<a id="api-1681303728d08d81"></a>

### [`TextStyle TextStyleGroup.M`](#api-1681303728d08d81)


```csharp
public TextStyle M { get; init; }
```

Medium variant.

<a id="api-13ca5b7b4bb27e76"></a>

### [`TextStyle TextStyleGroup.S`](#api-13ca5b7b4bb27e76)


```csharp
public TextStyle S { get; init; }
```

Small variant.


<a id="api-32b8d8d8acafb4f6"></a>

## `class XuiDesignSystem`

Concrete implementation of [`Xui.ToolKit.UI.Design.IDesignSystem`](../xui-toolkit-ui-design/index.md#api-bf180554dd1b76ae) that derives a complete set of design tokens from a small number of seed properties and the current `Xui.Core.DI.IDeviceInfo`.

```csharp
public class XuiDesignSystem : IDesignSystem
{
    public XuiDesignSystem(XuiDesignSystemOptions options, IDeviceInfo device);
    public void Update(XuiDesignSystemOptions options, IDeviceInfo device);
    public IColorSystem Colors { get; }
    public ITypographySystem Typography { get; }
    public ISpacingSystem Spacing { get; }
    public IShapeSystem Shape { get; }
    public IMotionSystem Motion { get; }

    public event Action<DesignSystemChange>? Changed;
    public void NotifyChanged(DesignSystemChange changes = DesignSystemChange.All);
}
```

<a id="api-f7cdefcaa7656988"></a>

### [`XuiDesignSystem.XuiDesignSystem(XuiDesignSystemOptions options, IDeviceInfo device)`](#api-f7cdefcaa7656988)


```csharp
public XuiDesignSystem(XuiDesignSystemOptions options, IDeviceInfo device);
```

Creates a new design system from the given options and device info.

<a id="api-b97b618312cf1958"></a>

### [`event Action<DesignSystemChange>? XuiDesignSystem.Changed`](#api-b97b618312cf1958)


```csharp
public event Action<DesignSystemChange>? Changed;
```

Raised with the affected token groups after an update; consumers invalidate only the required passes.

<a id="api-c7c593d2827c6076"></a>

### [`IColorSystem XuiDesignSystem.Colors`](#api-c7c593d2827c6076)


```csharp
public IColorSystem Colors { get; }
```

Color tokens and palette math.

<a id="api-44e21c49788ba610"></a>

### [`IMotionSystem XuiDesignSystem.Motion`](#api-44e21c49788ba610)


```csharp
public IMotionSystem Motion { get; }
```

Motion tokens (curves and springs).

<a id="api-112185f60621afd7"></a>

### [`void XuiDesignSystem.NotifyChanged(DesignSystemChange changes = DesignSystemChange.All)`](#api-112185f60621afd7)


```csharp
public void NotifyChanged(DesignSystemChange changes = DesignSystemChange.All);
```

Raises the [`Xui.ToolKit.UI.Design.XuiDesignSystem.Changed`](../xui-toolkit-ui-design/index.md#api-b97b618312cf1958) event, causing widgets to re-query tokens.

<a id="api-6cf76ccd64dbcc16"></a>

### [`IShapeSystem XuiDesignSystem.Shape`](#api-6cf76ccd64dbcc16)


```csharp
public IShapeSystem Shape { get; }
```

Shape / corner-radius tokens.

<a id="api-d8aed3c846b02ddd"></a>

### [`ISpacingSystem XuiDesignSystem.Spacing`](#api-d8aed3c846b02ddd)


```csharp
public ISpacingSystem Spacing { get; }
```

Spacing tokens derived from the 4-pt grid.

<a id="api-23226dd9ae7491cb"></a>

### [`ITypographySystem XuiDesignSystem.Typography`](#api-23226dd9ae7491cb)


```csharp
public ITypographySystem Typography { get; }
```

Typography scale.

<a id="api-3f8e28ab920a538a"></a>

### [`void XuiDesignSystem.Update(XuiDesignSystemOptions options, IDeviceInfo device)`](#api-3f8e28ab920a538a)


```csharp
public void Update(XuiDesignSystemOptions options, IDeviceInfo device);
```

Updates the retained palette in place and rebuilds only other changed token groups.


<a id="api-c7af0b7bebb6e67a"></a>

## `readonly struct XuiDesignSystemOptions`

Value-type options for constructing or updating a [`Xui.ToolKit.UI.Design.XuiDesignSystem`](../xui-toolkit-ui-design/index.md#api-32b8d8d8acafb4f6) without allocating a configuration object.

```csharp
public readonly struct XuiDesignSystemOptions
{
    public XuiDesignSystemOptions();
    public nfloat PrimaryHue { get; init; }
    public nfloat? SecondaryHue { get; init; }
    public nfloat? TertiaryHue { get; init; }
    public nfloat? NeutralHue { get; init; }
    public ColorHarmony Harmony { get; init; }
    public nfloat Chroma { get; init; }
    public nfloat? PrimaryLightness { get; init; }
    public nfloat RoundnessFactor { get; init; }
    public ShapePreset Shape { get; init; }
    public SizingPreset Sizing { get; init; }
    public NeutralStyle NeutralStyle { get; init; }
    public MotionPreference MotionPreference { get; init; }
    public MotionPreset Motion { get; init; }
    public string DefaultFontFamily { get; init; }
}
```

<a id="api-954f48d1898ee79c"></a>

### [`XuiDesignSystemOptions.XuiDesignSystemOptions()`](#api-954f48d1898ee79c)


```csharp
public XuiDesignSystemOptions();
```

Initializes the default design-system settings.

<a id="api-d5ae4d9bdeacf9db"></a>

### [`NFloat XuiDesignSystemOptions.Chroma`](#api-d5ae4d9bdeacf9db)


```csharp
public nfloat Chroma { get; init; }
```

Target chroma for the primary palette (typical range 0.10–0.35). Default: 0.15.

<a id="api-7200b9cf12dab91d"></a>

### [`string XuiDesignSystemOptions.DefaultFontFamily`](#api-7200b9cf12dab91d)


```csharp
public string DefaultFontFamily { get; init; }
```

Default font family for all text styles. Default: system-ui.

<a id="api-4603e3d7b256d285"></a>

### [`ColorHarmony XuiDesignSystemOptions.Harmony`](#api-4603e3d7b256d285)


```csharp
public ColorHarmony Harmony { get; init; }
```

Color harmony used to derive secondary/tertiary hues. Default: SplitComplementary.

<a id="api-5a9df575711b47b9"></a>

### [`MotionPreset XuiDesignSystemOptions.Motion`](#api-5a9df575711b47b9)


```csharp
public MotionPreset Motion { get; init; }
```

Animation timing preset. Default: Normal.

<a id="api-a38edcae7e36d2cb"></a>

### [`MotionPreference XuiDesignSystemOptions.MotionPreference`](#api-a38edcae7e36d2cb)


```csharp
public MotionPreference MotionPreference { get; init; }
```

Preferred animation style. Default: Curve.

<a id="api-45658ca2e0f5fe8f"></a>

### [`NFloat? XuiDesignSystemOptions.NeutralHue`](#api-45658ca2e0f5fe8f)


```csharp
public nfloat? NeutralHue { get; init; }
```

Optional neutral hue override. If null, derived as primary hue desaturated.

<a id="api-c85ce73f636b57d8"></a>

### [`NeutralStyle XuiDesignSystemOptions.NeutralStyle`](#api-c85ce73f636b57d8)


```csharp
public NeutralStyle NeutralStyle { get; init; }
```

Controls the hue relationship between Application and Surface backgrounds. Default: Monochrome.

<a id="api-413a84bff235b292"></a>

### [`NFloat XuiDesignSystemOptions.PrimaryHue`](#api-413a84bff235b292)


```csharp
public nfloat PrimaryHue { get; init; }
```

Primary brand hue in degrees (0–360). Required.

<a id="api-f7004b1d53907e6b"></a>

### [`NFloat? XuiDesignSystemOptions.PrimaryLightness`](#api-f7004b1d53907e6b)


```csharp
public nfloat? PrimaryLightness { get; init; }
```

Optional primary action lightness (0–1). Null uses the appearance&#39;s default action tone.

<a id="api-7ca38c9a0dccd270"></a>

### [`NFloat XuiDesignSystemOptions.RoundnessFactor`](#api-7ca38c9a0dccd270)


```csharp
public nfloat RoundnessFactor { get; init; }
```

Global corner-radius multiplier (0.0 = square, 1.0 = default, 2.0 = very round). Default: 1.0.

<a id="api-711b30adaadbcb6a"></a>

### [`NFloat? XuiDesignSystemOptions.SecondaryHue`](#api-711b30adaadbcb6a)


```csharp
public nfloat? SecondaryHue { get; init; }
```

Optional secondary hue override. If null, derived from [`Xui.ToolKit.UI.Design.XuiDesignSystemOptions.Harmony`](../xui-toolkit-ui-design/index.md#api-4603e3d7b256d285).

<a id="api-abfe773611c27e8b"></a>

### [`ShapePreset XuiDesignSystemOptions.Shape`](#api-abfe773611c27e8b)


```csharp
public ShapePreset Shape { get; init; }
```

Shape preset controlling corner radius tokens. Default: Soft.

<a id="api-255f01258a98765e"></a>

### [`SizingPreset XuiDesignSystemOptions.Sizing`](#api-255f01258a98765e)


```csharp
public SizingPreset Sizing { get; init; }
```

Sizing preset controlling spacing and hit-test targets. Default: Mobile.

<a id="api-8f81f49faab3b001"></a>

### [`NFloat? XuiDesignSystemOptions.TertiaryHue`](#api-8f81f49faab3b001)


```csharp
public nfloat? TertiaryHue { get; init; }
```

Optional tertiary/accent hue override. If null, derived from [`Xui.ToolKit.UI.Design.XuiDesignSystemOptions.Harmony`](../xui-toolkit-ui-design/index.md#api-4603e3d7b256d285).

