# Connect components

> Add a second view to the Ticket project using shared typed component references.

Add a Ticket titles view to the Support tools project. Import the same Ticket definition in a second module so both views use the object's typed fields. Then include the new view in the root manifest, validate it, and deploy it.

## Start with the Ticket project

Use the project from [Build and deploy a project](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/guides/create-custom-object). Its `custom-objects/ticket.ts` exports `Ticket` and `TicketListView`, and Ticket has `title__c` and `notes__c` fields. The project starts with this scaffold command.

```bash
rippling project init --name support-tools --with custom-object:ticket
cd support-tools
```

If you are creating the project now, apply the complete Ticket source from the build guide before continuing. If you already have the project, open its directory and skip initialization. For a project created by pull, use the Ticket module path imported by its generated manifest. No authentication is needed to edit the local definitions.

## Reuse Ticket in another view

Create a `views` directory in the project.

```bash
mkdir -p views
```

Save this complete module as `views/ticket-titles.ts`.

views/ticket-titles.ts

```ts
import { defineListView } from '@rippling/rippling-sdk';
import { Ticket } from '../custom-objects/ticket';

export const TicketTitles = defineListView(Ticket, {
  apiName: 'ticket_titles__c',
  name: 'Ticket titles',
  description: 'A compact view of support ticket titles',
  fields: [Ticket.fields.title__c],
  orderBy: Ticket.fields.title__c,
  sortOrder: 'ASC',
  isPublic: true,
});
```

`Ticket.fields.title__c` identifies the Title field on Ticket. Passing the object and field definitions keeps their relationship available to TypeScript; you do not repeat the field's API name as a string. The original All tickets view still shows both Title and Notes.

## Include the new view in the project

Update `rippling.manifest.ts` to import the second view and keep all three components.

rippling.manifest.ts

```ts
import { defineManifest } from '@rippling/rippling-sdk';
import { Ticket, TicketListView } from './custom-objects/ticket';
import { TicketTitles } from './views/ticket-titles';
// rippling:imports

export default defineManifest({
  components: [
    Ticket,
    TicketListView,
    TicketTitles,
    // rippling:components
  ],
});
```

An imported file alone does not mean every definition in that file will be deployed. Add each independently defined view, action or other desired component to `components`. Keep the insertion markers so future `rippling project add` commands can update the file.

Some related definitions are included automatically. An object's fields are included with the object, and a list view that references a local object includes that object. A category passed as a local definition is included through its object reference. API-name strings refer to existing resources; they do not create local definitions. If SQL, RQL or JSON mentions a new local component, include that component explicitly.

## Review and deploy the added view

Check that the root manifest includes `Ticket`, `TicketListView` and `TicketTitles`. Keep the same API names when changing display labels or descriptions. Conflicting definitions for the same component cause validation to fail.

To apply the added view to a sandbox, use the same context as the build guide. Replace `sandbox` with your configured sandbox context.

```bash
rippling --context sandbox project validate
rippling --context sandbox project deploy
```

Review the plan and deployment prompt. In the sandbox, check that Ticket offers All tickets and Ticket titles views.

## Continue with the project

-   [Package and release the project](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/packages-and-versions) to version the complete set of components.
-   [Supported components](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference) links to helper properties and accepted references.

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/guides/components-and-references

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
