Skip to content

@graphty/graphty-element / extend / OptionDefinition

Interface: OptionDefinition<T> ​

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:31

Definition for a single algorithm option

Type Parameters ​

T ​

T = unknown

The type of the option value

Properties ​

advanced? ​

optional advanced?: boolean

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:57

Hide in basic mode, show only in advanced UI (defaults to false)


default ​

default: T

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:35

Default value when option is not provided


description ​

description: string

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:39

Detailed description explaining what this option does


group? ​

optional group?: string

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:59

Group related options together in UI


label ​

label: string

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:37

Human-readable label for UI display


max? ​

optional max?: number

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:47

Maximum allowed value (for number/integer types)


min? ​

optional min?: number

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:45

Minimum allowed value (for number/integer types)


options? ​

optional options?: SelectOption<T>[]

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:53

Available choices for select type options


required? ​

optional required?: boolean

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:41

Whether this option must be provided (defaults to false)


step? ​

optional step?: number

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:49

Suggested step increment for UI sliders (for number/integer types)


type ​

type: OptionType

Defined in: graphty-element/src/algorithms/types/OptionSchema.ts:33

The data type of this option