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

# Catalog and registry

> Define framework-neutral component contracts, then bind them to typed trusted React implementations.

Rixx UI separates what a model may request from what React may render.
`defineCatalog` creates data-only contracts and generation instructions.
`defineRegistry` binds those contracts to trusted React components.

```tsx theme={null}
import {
  defineCatalog,
  defineComponent,
  defineRegistry,
  defineRUI,
} from "@rixx-ui/react";

interface WeatherProps {
  location: string;
  temperature: number;
}

export const catalog = defineCatalog({
  id: "acme.weather@0.1",
  components: {
    WeatherCard: defineComponent<WeatherProps>({
      category: "data",
      description: "Current weather for one location.",
      keywords: ["weather", "forecast"],
      propsSchema: {
        type: "object",
        additionalProperties: false,
        properties: {
          location: { type: "string" },
          temperature: { type: "number" },
        },
        required: ["location", "temperature"],
      },
    }),
  },
});

const registry = defineRegistry(catalog, {
  WeatherCard: ({ props }) => (
    <article>
      <strong>{props.location}</strong>: {props.temperature} C
    </article>
  ),
});

export const rui = defineRUI({ catalog, registry });
```

Although `defineCatalog` is re-exported from the React package, the resulting
definition is framework-neutral data. `defineRegistry` is the React-specific
step. `defineRUI` rejects mismatched catalog and registry objects.

## Contract rules

* Catalog IDs use `namespace.name@major.minor` or
  `namespace.name@major.minor.patch`.
* Component names start with an uppercase letter.
* Component prop schemas must be valid, closed object schemas with
  `additionalProperties: false`.
* Core components are included unless `includeCore: false` is explicit.
* Descriptions and keywords drive compact relevance retrieval.

Call `rui.instructions(userPrompt)` to obtain catalog-aware generation
instructions for your host's model request. The returned string contains no
provider configuration and does not perform a network request.
