Skip to content

SusRadialMenu

SusRadialMenu

Circular action menu — center activator + items arranged by Radius.

Package

SusKit · Molecules (commercial)

Open in Playground

SusKit · Molecules

Props

NameTypeDefault
ModelProp<bool>falsev-model
DisabledProp<bool>falsev-model
CenterTextProp<string>"+"v-model
RadiusProp<float>72fv-model

Slots

Name
activator

Events

NameFieldPayload
SelectOnSelectstring
OpenOnOpen
CloseOnClose

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-radial-menu
  • sus-radial-menu__center
  • sus-radial-menu__item
  • sus-radial-menu__items
  • sus-radial-menu--disabled
  • sus-radial-menu--open
  • sus-slot

Usage

Items are set in code (List<RadialMenuItem>). Toggle open with Model or the center activator.

csharp
var radial = new SusRadialMenu();
radial.Items.Value = new List<SusRadialMenu.RadialMenuItem>
{
    new() { Label = "Home", Value = "home", Icon = "home" },
    new() { Label = "Party", Value = "party", Icon = "users" },
    new() { Label = "Shop", Value = "shop", Icon = "shop" },
    new() { Label = "Map", Value = "map", Icon = "map" },
};
radial.CenterText.Value = "+";
radial.Radius.Value = 72f;
radial.Model.Value = true; // open — segments visible
radial.OnSelect += value => { /* … */ };
xml
<template>
  <sus:SusRadialMenu :Model="Open.Value"
                     CenterText="+"
                     :Radius="Radius.Value"
                     :Disabled="Disabled.Value"
                     @select="OnSelect"
                     @open="OnOpen"
                     @close="OnClose" />
</template>

<script>
public Prop<bool> Open = new(false);
public Prop<float> Radius = new(72f);
public Prop<bool> Disabled = new(false);
void OnSelect(string value) { /* … */ }
void OnOpen() { }
void OnClose() { }
// Populate Items in code.
</script>
PropRole
ItemsList<RadialMenuItem> — wedge buttons
ModelOpen (true) / closed
CenterTextDefault activator label (slot activator overrides)
RadiusDistance from center to items
DisabledBlock open / select

Notes

  • Item fields: Label, Value, Icon, Disabled.
  • Selecting an item fires OnSelect and closes (Model = false).
  • Custom activator: put content in slot activator instead of relying on CenterText.