### Cubitt Project Navigation
Source: https://cubitt-docs.vercel.app/icon-gallery
Provides links to different sections of the Cubitt documentation, including releases, introduction, installation, core features, guides, and components.
```html
Data Table
OverviewFeaturesAdvancedFilterColumn ViewSelection ToolbarAPI ReferenceTilt Mark
`⌘``K`
Releases
```
--------------------------------
### Install Cubitt Packages
Source: https://cubitt-docs.vercel.app/installation
Installs the latest versions of Cubitt icons, components, and logos using pnpm.
```bash
pnpm add @tilt-legal/cubitt-icons @tilt-legal/cubitt-components @tilt-legal/cubitt-logos
```
--------------------------------
### Install Cubitt Icons
Source: https://cubitt-docs.vercel.app/core/icons
Installs the Cubitt icons package using pnpm. This is the first step to using the icon components in your project.
```bash
pnpm add @tilt-legal/cubitt-icons
```
--------------------------------
### Basic Textarea Example
Source: https://cubitt-docs.vercel.app/components/textarea
A simple example of rendering a Textarea component with a placeholder.
```jsx
```
--------------------------------
### Cubitt Basic Card Example
Source: https://cubitt-docs.vercel.app/components/card
A basic example of the Cubitt Card component, showcasing its structure with a title, description, content, and footer.
```typescript
Card(
Card TitleCard Description,
Card Content,
Card Footer
)
```
--------------------------------
### Cubitt Alert Component Examples
Source: https://cubitt-docs.vercel.app/components/alert
Provides examples of the Cubitt Alert component with different variants: default, destructive, info, warning, and success. Each example shows a typical use case for displaying user feedback.
```typescript
Heads up!
You can add components and dependencies to your app using the CLI.
```
```typescript
New features available
We've added new components to the library. Check out the latest documentation for details.
```
```typescript
Unable to process your payment
Please verify your billing information and try again.
```
```typescript
Storage space running low
You're using 85% of your available storage. Consider upgrading your plan or deleting unused files.
```
```typescript
Successfully deployed
Your application has been deployed to production. All systems are running normally.
```
--------------------------------
### Install NuqsProvider for URL State Management
Source: https://cubitt-docs.vercel.app/guides/url-state
Wrap your application with NuqsProvider in the root layout to enable URL state management for Cubitt components. This is a necessary setup step for the feature to work across your application.
```tsx
// app/layout.tsx
import { NuqsProvider } from "@tilt-legal/cubitt-components";
export default function RootLayout({ children }) {
return (
{children}
);
}
```
--------------------------------
### Stepper Examples
Source: https://cubitt-docs.vercel.app/components/stepper
Demonstrates various configurations of the Stepper component, including basic usage with titles and descriptions, vertical orientation, mixed elements, progress bar style, and URL state synchronization.
```javascript
1
### Step One
Desc for step one
2
### Step Two
Desc for step two
3
### Step Three
Desc for step three
```
```javascript
1
### Step One
Desc for step one
2
### Step Two
Desc for step two
3
### Step Three
Desc for step three
```
```javascript
2
Shuffle
```
```javascript
1
### Step One
2
### Step Two
3
### Step Three
4
### Step Four
```
```javascript
1
### Account
2
### Profile
3
### Settings
```
--------------------------------
### URL State Management Example
Source: https://cubitt-docs.vercel.app/components/pagination
Demonstrates how to implement URL state management for the Pagination component. This requires client-side rendering.
```javascript
import { Pagination, PaginationContent, PaginationLink, PaginationRoot } from "@cubitt/react";
function MyPaginatedComponent() {
const [page, setPage] = React.useState(1);
const totalPages = 10;
return (
setPage(page - 1)} disabled={page === 1}>Previous
{[...Array(totalPages)].map((_, index) => (
setPage(index + 1)}
>
{index + 1}
))}
setPage(page + 1)} disabled={page === totalPages}>Next
);
}
```
--------------------------------
### Tabs Component Usage Examples
Source: https://cubitt-docs.vercel.app/components/tabs
Illustrates various configurations and states of the Tabs component, including size, orientation, disabled state, animations, and URL state synchronization.
```javascript
// Example for Sizes
// ...
// Example for Vertical orientation
// ...
// Example for Direction
// ...
// Example for Disabled state
// Account...
// Example for Height Animation
// ...
// Example for URL State
// ...
```
--------------------------------
### Label Component Examples
Source: https://cubitt-docs.vercel.app/components/label
Illustrates various use cases and configurations for the Label component, including association with input fields, switches, select dropdowns, and textareas. It also showcases different size and orientation options.
```html
Email
```
```html
Enable notifications
```
```html
Accept terms and conditions
```
```html
Vertical orientation
Horizontal orientation
```
```html
Country
Select a country
```
```html
Message
```
--------------------------------
### Mime Type Icon Examples
Source: https://cubitt-docs.vercel.app/components/mime-type
Provides visual examples of the MimeTypeIcon component in action, showcasing its ability to display icons for various file types (PDF, DOC, JPEG, ZIP, XLSX, PPTX, MP4, RAR) using both MIME types and file names, as well as demonstrating different size variations and a file list integration.
```html
```
```html
```
```html
```
```html
contract.pdf 2.4 MB
budget.xlsx 1.2 MB
presentation.pptx 5.8 MB
logo.png 384 KB
backup.zip 12.5 MB
```
--------------------------------
### SelectionToolbar Usage Example
Source: https://cubitt-docs.vercel.app/data-table/selection-toolbar
Demonstrates how to import and use the SelectionToolbar component with various action types like edit, archive, and delete. It includes configuration for action labels, icons, confirmation messages, and success messages.
```typescript
import { SelectionToolbar } from "@tilt-legal/cubitt-components";
function MyToolbar() {
const actions = [
{
id: "edit",
label: "Edit",
icon: PenWriting,
onClick: () => {},
successMessage: "Items updated successfully",
},
{
id: "archive",
label: "Archive",
icon: Archive,
onClick: () => {},
successMessage: "Items archived",
},
{
id: "delete",
label: "Delete",
icon: Trash2,
variant: "destructive" as const,
confirmationMessage: `Are you sure you want to delete these items?`,
confirmText: "Delete",
cancelText: "Cancel",
onClick: () => {},
successMessage: "Items deleted successfully",
},
];
return (
setSelectedCount(0)}
position="container"
/>
);
}
```
--------------------------------
### DataTableV2 Usage Example
Source: https://cubitt-docs.vercel.app/data-table/overview
Demonstrates how to import and use the DataTableV2 component with custom data and column definitions. Requires '@tilt-legal/cubitt-components'.
```typescript
import { DataTableV2, ColumnDef } from "@tilt-legal/cubitt-components";
// Define your data type
type Employee = {
id: string;
name: string;
email: string;
role: string;
status: "Active" | "Inactive";
};
// Define your columns
const columns: ColumnDef[] = [
{
header: "Name",
accessorKey: "name",
},
{
header: "Email",
accessorKey: "email",
},
{
header: "Role",
accessorKey: "role",
},
{
header: "Status",
accessorKey: "status",
},
];
// Basic table
function MyTable() {
return ;
}
```
--------------------------------
### Cubitt Card with Actions Example
Source: https://cubitt-docs.vercel.app/components/card
Demonstrates how to use `CardAction` within the Cubitt Card component's header to include contextual buttons or controls.
```typescript
Card(
Notification SettingsChoose what you want to be notified aboutPush notificationsEmail notifications
)
```
--------------------------------
### Tooltip Usage
Source: https://cubitt-docs.vercel.app/components/tooltip
Demonstrates how to use the Tooltip component from the @tilt-legal/cubitt-components library. It requires importing Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, and Button components. The example shows a button that triggers a tooltip with custom content on hover.
```javascript
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
Button,
} from "@tilt-legal/cubitt-components";
```
```javascript