> ## 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.

# Approve components for generation

> Choose which components and properties a model may request, then connect those contracts to your React implementations.

Rixx UI separates what a model may request from the React code your application
owns. `defineCatalog` describes the approved components and generation
instructions. `defineRegistry` connects those descriptions to your 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.


## Related topics

- [Evaluate Rixx UI locally](/getting-started/quickstart.md)
- [Renderer contract 0.1](/product/renderer-contract.md)
- [ADR 0001: Separate language, protocol, and runtime](/adr/0001-language-protocol-runtime.md)
- [Rixx UI Language 0.1](/spec/language.md)
- [@rixx-ui/react/server API](/reference/server.md)
