Function: createUIModule()
August 8, 2026 ยท View on GitHub
@plures/praxis / index / createUIModule
Function: createUIModule()
createUIModule<
TContext>(options):PraxisModule<TContext>
Defined in: packages/praxis-core/src/ui-rules.ts:298
Create a customized UI module with only the rules you need.
Type Parameters
TContext
TContext extends UIContext
Parameters
options
Selection options: which rule/constraint IDs to include, plus optional extra rules/constraints
constraints?
string[]
extraConstraints?
ConstraintDescriptor<TContext>[]
extraRules?
RuleDescriptor<TContext>[]
rules?
string[]
Returns
PraxisModule<TContext>
A PraxisModule with only the selected UI rules and constraints
Example
const myUI = createUIModule({
rules: ['ui/loading-gate', 'ui/dirty-guard'],
constraints: ['ui/must-be-initialized'],
});
registry.registerModule(myUI);