Overview
Openlane UI is fully typed with TypeScript, providing comprehensive type definitions for all components, utilities, and hooks.Chart Types
ColorUtility
Utility types for chart colors. Location:packages/ui/lib/chartUtils.tsx:1
AvailableChartColorsKeys
Available color keys for charts. Location:packages/ui/lib/chartUtils.tsx:52
Pagination Types
TPaginationQuery
Cursor-based pagination query parameters. Location:packages/ui/src/pagination/types.ts:1
first- Number of items to fetch from the startafter- Cursor to fetch items afterlast- Number of items to fetch from the endbefore- Cursor to fetch items before
TPagination
Combined pagination state. Location:packages/ui/src/pagination/types.ts:8
page- Current page number (1-indexed)pageSize- Number of items per pagequery- Cursor-based query parameters
TPageInfo
Pagination metadata from GraphQL-style APIs. Location:packages/ui/src/pagination/types.ts:14
endCursor- Cursor of the last item in the current pagestartCursor- Cursor of the first item in the current pagehasNextPage- Whether more items exist after the current pagehasPreviousPage- Whether items exist before the current page
TPaginationMeta
Complete pagination metadata including loading state. Location:packages/ui/src/pagination/types.ts:21
File Upload Types
UploadedFile
Metadata for an uploaded file. Location:packages/ui/hooks/use-upload-file.ts:10
key- Unique file identifiername- Original file namesize- File size in bytestype- MIME typeurl- Public URL to access the fileappUrl- Application-specific URL
UseUploadFileProps
Configuration for the useUploadFile hook. Location:packages/ui/hooks/use-upload-file.ts:12
Component Variant Types
Openlane UI components use class-variance-authority for type-safe variants.ButtonVariants
variant- Visual style variantsize- Size variantstate- Interaction state
InputVariants
BadgeVariants
Editor Types
TPlateEditorStyleVariant
Visual variants for the Plate editor. Location:packages/ui/src/components/ui/editor.tsx:40
TPlateEditorVariants
Functional variants for the Plate editor. Location:packages/ui/src/components/editor/use-create-editor.ts:99
basic- Minimal formatting optionsstandard- Common formatting featuresadvanced- Full feature set including tables and embedsminimal- Plain text onlyreadonly- View-only mode
TComment
Comment data structure for collaborative editing. Location:packages/ui/src/components/ui/comment.tsx:31
Data Table Types
SortCondition
Sort configuration for data tables. Location:packages/ui/src/data-table/data-table.tsx:80
Utility Types
ClassValue
Accepted class name types for thecn utility.