Skip to content

@bynary.composables.class.Interface.IBindModifierOptions

github-actions[bot] edited this page Jul 11, 2024 · 3 revisions

@bynary/composables / @bynary/composables/class / IBindModifierOptions

Interface: IBindModifierOptions

A set of options for bindModifier

Extended by

Properties

baseClass?

optional baseClass: string

The base class. There is usually one base class per component.

While you're always able to explicitly set a base class via the options, it's recommended to use the provideBaseClass function to provide the base class to the component. Especially, when using useModifier/bindModifier or useModifierGroup/bindModifierGroup multiple times in one directive or component.

WARNING: If you don't provide a base class either via options.baseClass or via provideBaseClass, an error will be thrown!

Example

const isLoading = signal(false);

bindModifier('is-loading', isLoading, { baseClass: 'my-button' }); // <my-component class="my-button"></my-component>

Defined in

class/src/modifier.composable.ts:26

Clone this wiki locally