> ## Documentation Index
> Fetch the complete documentation index at: https://flex-fields.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Examples target Filament 5. Verify optional dependencies before configuring integrations.
> Upload transfer completion, permanent storage and record acceptance are separate milestones. Native and Spatie image conversions retain the original.

# Register your extension

> Register typed definitions and local outputs during service-provider boot.

Register the family in your package service provider's `boot()` method, after FLEX has registered its services. Supply the built local files that your package ships.

Register catalog recommendations through `FlexCatalog::registerPlugin()` in the
same provider-boot phase. Both component collection and catalog registration freeze
after providers have booted. A request or queue job cannot add recommendations to
the process registry. Catalog services remain lazy on pages that do not use them.

> [!TIP]
>
> **Watch this in the workshop:** [15:11 — register dependencies and ownership](https://www.youtube.com/watch?v=m4V_R7YxTP4\&t=911s) · [1:03:07 — install the package through Composer](https://www.youtube.com/watch?v=m4V_R7YxTP4\&t=3787s).

```php theme={"theme":{"light":"github-light","dark":"github-dark"}}
use Bjanczak\FilamentFlexFields\Support\Components\ComponentDefinition;
use Bjanczak\FilamentFlexFields\Support\Components\ComponentKind;
use Bjanczak\FilamentFlexFields\Support\Components\ComponentRegistrar;
use Bjanczak\FilamentFlexFields\Support\Components\ComponentRegistration;

public function boot(ComponentRegistrar $components): void
{
    $components->registerFamily([
        new ComponentRegistration(
            new ComponentDefinition(
                id: 'acme-rating-field',
                kind: ComponentKind::Field,
                stylesFrom: ['acme-rating-display'],
                entry: 'acme-rating-field',
            ),
            entryPath: __DIR__.'/../resources/dist/rating.js',
        ),
        new ComponentRegistration(
            new ComponentDefinition(
                id: 'acme-rating-column',
                kind: ComponentKind::Column,
                stylesFrom: ['acme-rating-display'],
            ),
        ),
        new ComponentRegistration(
            new ComponentDefinition(
                id: 'acme-rating-entry',
                kind: ComponentKind::Entry,
                stylesFrom: ['acme-rating-display'],
            ),
        ),
        new ComponentRegistration(
            new ComponentDefinition(
                id: 'acme-rating-display',
                kind: ComponentKind::Display,
                styles: ['acme-rating-display'],
            ),
            styles: [
                'acme-rating-display' =>
                    __DIR__.'/../resources/dist/rating.css',
            ],
        ),
    ]);
}
```

The shared display may be declared last. FLEX checks the complete family before committing its registration. An invalid file, duplicate identity, missing dependency, dependency cycle or asset collision rejects the family without registering its earlier members. Registration supports up to 128 members per family. Use the [package generator](https://flex-fields.bjanczak.com/docs/extensions/generate-package.md) and [asset build](https://flex-fields.bjanczak.com/docs/extensions/build.md) to prepare the classes and files.

> [!NOTE]
>
> Use a unique vendor prefix. Extensions cannot replace built-in aliases, shared JavaScript chunks, global styles, registered asset identities or the official FLEX badge.

For a single surface, `register($definition, styles: [...], entryPath: ...)` uses the same validation.

## Continue reading

[Extension guides](https://flex-fields.bjanczak.com/docs/extensions.md) · [Definition and registration reference](https://flex-fields.bjanczak.com/docs/extensions/definition-reference.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.