> For the complete documentation index, see [llms.txt](https://docs.graphlit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlit.dev/api-guides/use-cases/views/view-create-custom.md).

# Create Custom Views

## User Intent

"How do I create custom views for organized content display? Show me view configuration."

## Operation

**SDK Method**: `createView()`\
**Use Case**: Organize content into custom views

***

## Code Example (TypeScript)

```typescript
import { Graphlit } from 'graphlit-client';
import { ContentTypes } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

// Create view for recent documents
const view = await graphlit.createView({
  name: "Recent Documents",
  description: "Documents from last 30 days",
  filter: {
    types: [ContentTypes.File],
    creationDateRange: {
      from: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString()
    }
  }
});

console.log(`View created: ${view.createView.id}`);

// Query view
const viewContents = await graphlit.queryContents({
  views: [{ id: view.createView.id }],
});
```

***
