# MixinApplicator

Applies mixins to constructs.

- Source: [`core/lib/mixins/applicator.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/mixins/applicator.ts#L25)
- Type last changed: v2.241.0 · 2 Mar 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';

declare const constructSelector: cdk.IConstructSelector;
const mixinApplicator = new cdk.MixinApplicator(this, /* all optional props */ constructSelector);
```

## Initializer

```ts
new MixinApplicator(scope: IConstruct, selector?: IConstructSelector)
```

## Properties

- `report`: [MixinApplication](/cdk/api/v2/docs/aws-cdk-lib.MixinApplication.html)[] — Returns the successful mixin applications.

- `selectedConstructs`: [IConstruct](/cdk/api/v2/docs/constructs.IConstruct.html)[] — The constructs that match the selector in the given scope.

## Methods

- `apply(...mixins: IMixin[]): MixinApplicator // chainable` — Applies a mixin to selected constructs.

- `requireAll(): MixinApplicator // chainable` — Requires all selected constructs to support the applied mixins.

  Will only check for future call of `apply()`.
  Set this before calling `apply()` to take effect.

  ```ts
  Mixins.of(scope)
    .requireAll()
    .apply(new MyMixin());
  ```

- `requireAny(): MixinApplicator // chainable` — Requires at least one mixin to be successfully applied.

  Will only check for future call of `apply()`.
  Set this before calling `apply()` to take effect.

  ```ts
  Mixins.of(scope)
    .requireAny()
    .apply(new MyMixin());
  ```
