### Clone LiftKit Template Project
Source: https://github.com/chainlift/liftkit/blob/main/README.md
Clones the LiftKit template project to quickly set up a Next.js environment with LiftKit Core's config files pre-installed. This is the fastest way to get started.
```bash
git clone https://github.com/Chainlift/liftkit-template.git
cd liftkit-template
npm install
# Install components as needed
# Import LiftKit's CSS into your app's globals.css:
# @import url("@/lib/css/index.css");
```
--------------------------------
### Initialize LiftKit CLI
Source: https://context7.com/chainlift/liftkit/llms.txt
Commands to install the LiftKit CLI, initialize the project configuration, and add UI components to your Next.js application.
```bash
npm install @chainlift/liftkit --save-dev
npx liftkit init
npm run add all
npm run add button
npm run add card
npm run add badge
```
--------------------------------
### TextInput Component Examples (React/TypeScript)
Source: https://context7.com/chainlift/liftkit/llms.txt
Demonstrates the TextInput component for creating input fields with label positioning options, help text, and icon support. Includes examples for floating labels and custom background colors.
```tsx
import TextInput from "@/registry/nextjs/components/text-input";
// Basic input
// Label on input (floating label style)
// With help text
// Custom end icon
// With background color for floating label
```
--------------------------------
### Grid Component Examples (React/TypeScript)
Source: https://context7.com/chainlift/liftkit/llms.txt
Illustrates the responsive Grid component for creating layouts with configurable columns and gap spacing. Supports auto-responsiveness and custom class overrides.
```tsx
import Grid from "@/registry/nextjs/components/grid";
// Basic 2-column grid
Item 1
Item 2
Item 3
Item 4
// Multi-column with gap
Card 1Card 2Card 3
// Auto-responsive grid
{items.map(item => {item.name})}
// Custom grid with className override
Wide item
Normal item
```
--------------------------------
### Apply CSS Utility Classes
Source: https://context7.com/chainlift/liftkit/llms.txt
Examples of applying LiftKit utility classes for background colors, text colors, margins, shadows, overflow, and flexbox layouts.
```tsx
Primary background
Primary text
Vertical margins
Subtle shadow
Horizontal flex
```
--------------------------------
### Add LiftKit to Existing Next.js Project
Source: https://github.com/chainlift/liftkit/blob/main/README.md
Installs LiftKit CLI as a dev dependency and initializes LiftKit in an existing Next.js project. This process adds necessary configuration files like `components.json` and `tailwind.config.ts`.
```bash
npm install @chainlift/liftkit --save-dev
npx liftkit init
# If prompted, add an 'add' script to package.json and install shadcn
# Install components as needed
# Import LiftKit's CSS into your app's globals.css:
# @import url("@/lib/css/index.css");
```
--------------------------------
### Use Button Component
Source: https://context7.com/chainlift/liftkit/llms.txt
Examples of the Button component showing support for variants, sizes, semantic colors, and Lucide icon integration.
```tsx
import Button from "@/registry/nextjs/components/button";
```
--------------------------------
### Badge Component Examples (React/TypeScript)
Source: https://context7.com/chainlift/liftkit/llms.txt
Demonstrates the usage of the Badge component for displaying icons with customizable colors, sizes, and stroke widths. It automatically calculates contrasting text/icon colors.
```tsx
import Badge from "@/registry/nextjs/components/badge";
// Basic badge
// Colored badges
// Sizes
// With scrim overlay
// Custom icon stroke width
```
--------------------------------
### Use Card Component
Source: https://context7.com/chainlift/liftkit/llms.txt
Examples of the Card component demonstrating different materials, variants, scaling factors, and optical correction settings.
```tsx
import Card from "@/registry/nextjs/components/card";
Card Title
Card content goes here.
Filled CardGlassmorphism Card
Large Title
Long scrollable content...
```
--------------------------------
### Icon Component Examples (React/TypeScript)
Source: https://context7.com/chainlift/liftkit/llms.txt
Showcases the Icon component for rendering Lucide icons with automatic sizing based on font classes and theme-aware colors. Supports optical shift and custom stroke widths.
```tsx
import Icon from "@/registry/nextjs/components/icon";
// Basic icon
// Colored icons (uses LkColor tokens)
// Font class sizing
// Optical shift (pulls icon up slightly for alignment)
// Custom stroke width
```
--------------------------------
### Import LiftKit CSS
Source: https://github.com/chainlift/liftkit/blob/main/README.md
Demonstrates how to import LiftKit's core CSS styles into your Next.js application's global CSS file to apply the framework's styling.
```css
@import url("@/lib/css/index.css");
```
--------------------------------
### Implement Responsive NavBar Component
Source: https://context7.com/chainlift/liftkit/llms.txt
Demonstrates how to use the NavBar component with customizable materials, navigation buttons, icon buttons, and call-to-action buttons. It supports both flat and glass material styles.
```tsx
import NavBar from "@/registry/nextjs/components/navbar";
import Button from "@/registry/nextjs/components/button";
import IconButton from "@/registry/nextjs/components/icon-button";
>
}
iconButtons={
<>
>
}
ctaButtons={
<>
>
}
/>
```
--------------------------------
### Implement ThemeProvider for Dynamic Theming
Source: https://context7.com/chainlift/liftkit/llms.txt
Wrap your application with the ThemeProvider to enable Material Design 3 dynamic theming. This includes light/dark mode support and hooks to manipulate the color palette.
```tsx
import ThemeProvider, { useTheme } from "@/registry/nextjs/components/theme";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
{children}
);
}
function ThemeControls() {
const { theme, palette, setPalette, colorMode, setColorMode, updateTheme, updateThemeFromMaster } = useTheme();
const handleColorChange = async (hexCode: string) => {
await updateThemeFromMaster(hexCode, setPalette);
};
return (
);
}
```
--------------------------------
### Grid Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A responsive CSS grid layout component with configurable columns and gaps.
```APIDOC
## Grid Component
### Description
A responsive CSS grid component with configurable columns and gap spacing.
### Usage
```tsx
import Grid from "@/registry/nextjs/components/grid";
Item 1
```
```
--------------------------------
### ThemeProvider API
Source: https://context7.com/chainlift/liftkit/llms.txt
The ThemeProvider component manages dynamic Material Design 3 theming, providing context for color modes and palette generation.
```APIDOC
## ThemeProvider Context API
### Description
The ThemeProvider wraps the application to manage light/dark modes and dynamic color palettes based on Material Design 3 specifications.
### Parameters
#### Hook: useTheme()
- **theme** (object) - Current theme colors (light/dark).
- **palette** (object) - Current source palette colors.
- **setPalette** (function) - Updates the current palette.
- **colorMode** (string) - Current mode: "light" | "dark".
- **setColorMode** (function) - Toggles between light and dark modes.
- **updateTheme** (function) - Regenerates theme from current palette.
- **updateThemeFromMaster** (function) - Generates a full palette from a single hex code.
### Response Example
{
"colorMode": "light",
"theme": { "primary": "#6750A4", "surface": "#FEF7FF" }
}
```
--------------------------------
### Icon Component
Source: https://context7.com/chainlift/liftkit/llms.txt
Renders Lucide icons with theme-aware colors and font-based sizing.
```APIDOC
## Icon Component
### Description
Renders Lucide icons with automatic sizing based on font class and theme-aware colors.
### Usage
```tsx
import Icon from "@/registry/nextjs/components/icon";
```
```
--------------------------------
### Text and Heading Components
Source: https://context7.com/chainlift/liftkit/llms.txt
Typography components supporting LiftKit font classes and color tokens.
```APIDOC
## Text and Heading Components
### Description
Typography components with LiftKit font classes and color tokens.
### Usage
```tsx
import Heading from "@/registry/nextjs/components/heading";
Main Title
```
```
--------------------------------
### Row and Column Layout Components (React/TypeScript)
Source: https://context7.com/chainlift/liftkit/llms.txt
Demonstrates the Row and Column components for flexible horizontal and vertical layouts using Flexbox. Includes options for alignment, gap control, and wrapping children.
```tsx
import Row from "@/registry/nextjs/components/row";
import Column from "@/registry/nextjs/components/column";
// Basic row layout
// Row with alignment
Title
// Row with wrapping children
{tags.map(tag => )}
// Column layout
// Nested layouts
Section 1
Content here
Section 2
More content
```
--------------------------------
### Row and Column Components
Source: https://context7.com/chainlift/liftkit/llms.txt
Flexbox layout components for horizontal and vertical arrangements.
```APIDOC
## Row and Column Components
### Description
Flexbox layout components for horizontal (Row) and vertical (Column) arrangements with alignment and gap controls.
### Usage
```tsx
import Row from "@/registry/nextjs/components/row";
```
```
--------------------------------
### Implement Dropdown Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A generic menu component used for navigation or action lists. It supports custom triggers like buttons or icon buttons and contains multiple menu items.
```tsx
import { Dropdown, DropdownTrigger, DropdownMenu } from "@/registry/nextjs/components/dropdown";
import MenuItem from "@/registry/nextjs/components/menu-item";
```
--------------------------------
### Card Component API
Source: https://context7.com/chainlift/liftkit/llms.txt
The Card component provides a flexible container with support for glassmorphism, variants, and optical scaling.
```APIDOC
## Card Component
### Description
A container component that supports various materials and automatic scaling based on typography.
### Props
- **variant** (string) - Optional - "fill" | "outline" | "transparent".
- **material** (string) - Optional - "flat" | "glass".
- **materialProps** (object) - Optional - Configuration for material effects (e.g., scrimThickness).
- **scaleFactor** (string) - Optional - Scales content based on typography tokens.
- **opticalCorrection** (string) - Optional - "x" | "y" | "none".
- **isClickable** (boolean) - Optional - Adds hover/click interaction styles.
- **isScrollable** (boolean) - Optional - Enables internal scrolling.
### Usage Example
Content
```
--------------------------------
### Select Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A custom select dropdown component that offers accessible keyboard navigation and seamless integration with forms. It supports custom options and can be configured with various triggers.
```APIDOC
## Select Component
A custom select dropdown with accessible keyboard navigation and form compatibility.
### Description
This component provides a customizable select dropdown functionality.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Request Example
```tsx
import { Select, SelectTrigger, SelectMenu, SelectOption } from "@/registry/nextjs/components/select";
import Button from "@/registry/nextjs/components/button";
const [selectedValue, setSelectedValue] = useState("");
const options = [
{ label: "Option 1", value: "opt1" },
{ label: "Option 2", value: "opt2" },
{ label: "Option 3", value: "opt3" },
];
// With icons on options
Settings
```
### Response
N/A (Component Usage)
#### Success Response (200)
N/A
#### Response Example
N/A
```
--------------------------------
### Badge Component
Source: https://context7.com/chainlift/liftkit/llms.txt
The Badge component displays an icon with customizable colors and scales, featuring automatic contrast calculation.
```APIDOC
## Badge Component
### Description
A badge component displaying an icon with customizable color and scale. Automatically calculates contrasting text/icon colors.
### Usage
```tsx
import Badge from "@/registry/nextjs/components/badge";
```
```
--------------------------------
### TextInput Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A text input field with support for labels, help text, and icons.
```APIDOC
## TextInput Component
### Description
A text input field with label positioning options, help text, and icon support.
### Usage
```tsx
import TextInput from "@/registry/nextjs/components/text-input";
```
```
--------------------------------
### Tabs Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A component for creating tabbed interfaces that automatically handle content switching. It supports basic usage, state callbacks, and scrollable content areas.
```APIDOC
## Tabs Component
A tabbed interface with automatic content switching.
### Description
This component allows for the creation of tabbed navigation and content display.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Request Example
```tsx
import Tabs from "@/registry/nextjs/components/tabs";
// Basic tabs
Overview content here
Details content here
Settings content here
// With state callback
const [activeTab, setActiveTab] = useState(0);
setActiveTab(index)}
>
Content for Tab 1Content for Tab 2Content for Tab 3
// Scrollable content
Long scrollable feed...
Message list...
```
### Response
N/A (Component Usage)
#### Success Response (200)
N/A
#### Response Example
N/A
```
--------------------------------
### Implement Snackbar Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A notification component for displaying transient messages. Supports global color theming, icons, action buttons, and dismiss functionality.
```tsx
import Snackbar from "@/registry/nextjs/components/snackbar";
import Text from "@/registry/nextjs/components/text";
Operation completed successfully!
```
--------------------------------
### Text and Heading Typography Components (React/TypeScript)
Source: https://context7.com/chainlift/liftkit/llms.txt
Showcases the Text and Heading components for semantic typography using LiftKit font classes and color tokens. Supports various heading levels, text styles, and semantic tags.
```tsx
import Text from "@/registry/nextjs/components/text";
import Heading from "@/registry/nextjs/components/heading";
// Headings with semantic tags
Main TitleSection TitleSubsection
// Text component
Regular body textBold primary textMuted caption
// Text with semantic tags
Paragraph textInline labelconst code = "example";
// Available font classes:
// display1, display2, title1, title2, title3, heading, subheading,
// body, callout, label, caption, capline
// Add -bold or -mono suffix for variants: body-bold, heading-mono
```
--------------------------------
### Implement Tabs Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A tabbed interface component for organizing content. Supports automatic content switching, state callbacks for active tabs, and scrollable content areas.
```tsx
import Tabs from "@/registry/nextjs/components/tabs";
Overview content here
Details content here
Settings content here
```
--------------------------------
### Button Component API
Source: https://context7.com/chainlift/liftkit/llms.txt
The Button component supports multiple variants, sizes, and semantic color states with built-in icon support.
```APIDOC
## Button Component
### Description
A highly customizable button component supporting variants, semantic colors, and Lucide icon integration.
### Props
- **label** (string) - Required - The button text.
- **variant** (string) - Optional - "fill" | "outline" | "text".
- **size** (string) - Optional - "sm" | "md" | "lg".
- **color** (string) - Optional - "primary" | "secondary" | "tertiary" | "success" | "warning" | "error" | "info".
- **startIcon** (string) - Optional - Lucide icon name.
- **endIcon** (string) - Optional - Lucide icon name.
- **stateLayerOverride** (object) - Optional - Custom style overrides for hover/focus states.
### Usage Example
```
--------------------------------
### Implement Switch Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A toggle switch component for boolean state management. Features include controlled state, custom color themes, and label integration.
```tsx
import Switch from "@/registry/nextjs/components/switch";
const [isEnabled, setIsEnabled] = useState(false);
setIsEnabled(newState)} />
```
--------------------------------
### Implement Select Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A custom accessible dropdown component for form inputs. It supports controlled state, custom trigger buttons, and icon-enhanced options.
```tsx
import { Select, SelectTrigger, SelectMenu, SelectOption } from "@/registry/nextjs/components/select";
import Button from "@/registry/nextjs/components/button";
const [selectedValue, setSelectedValue] = useState("");
const options = [{ label: "Option 1", value: "opt1" }, { label: "Option 2", value: "opt2" }, { label: "Option 3", value: "opt3" }];
```
--------------------------------
### Switch Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A toggle switch component that allows for customization of on/off colors and can be controlled programmatically or used with a label.
```APIDOC
## Switch Component
A toggle switch with customizable on/off colors.
### Description
This component provides a toggle switch for binary state selection.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Request Example
```tsx
import Switch from "@/registry/nextjs/components/switch";
// Basic switch
// Controlled switch
const [isEnabled, setIsEnabled] = useState(false);
setIsEnabled(newState)} />
// Custom colors
// With label
Dark Mode setIsDarkMode(enabled)}
/>
```
### Response
N/A (Component Usage)
#### Success Response (200)
N/A
#### Response Example
N/A
```
--------------------------------
### Dropdown Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A versatile dropdown menu component designed for navigation and action menus. It can be triggered by buttons or icon buttons and contains menu items.
```APIDOC
## Dropdown Component
A generic dropdown menu component for navigation and action menus.
### Description
This component provides a dropdown menu for displaying navigation or action items.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Request Example
```tsx
import { Dropdown, DropdownTrigger, DropdownMenu } from "@/registry/nextjs/components/dropdown";
import Button from "@/registry/nextjs/components/button";
import MenuItem from "@/registry/nextjs/components/menu-item";
// Icon button trigger
```
### Response
N/A (Component Usage)
#### Success Response (200)
N/A
#### Response Example
N/A
```
--------------------------------
### Snackbar Component
Source: https://context7.com/chainlift/liftkit/llms.txt
A notification component that displays temporary messages to the user. It supports icons, text, action buttons, and automatic color theming based on severity.
```APIDOC
## Snackbar Component
A notification component supporting icons, text, and action buttons with automatic color theming.
### Description
This component displays temporary, non-intrusive messages or notifications to the user.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Request Example
```tsx
import Snackbar from "@/registry/nextjs/components/snackbar";
import Text from "@/registry/nextjs/components/text";
import Button from "@/registry/nextjs/components/button";
import Icon from "@/registry/nextjs/components/icon";
import IconButton from "@/registry/nextjs/components/icon-button";
// Basic snackbar
Your changes have been saved.
// With global color (auto-colors children)
Operation completed successfully!
// With action button
Connection lost.
// With dismiss button
An error occurred. setShowSnackbar(false)} />
```
### Response
N/A (Component Usage)
#### Success Response (200)
N/A
#### Response Example
N/A
```
--------------------------------
### Define LiftKit TypeScript Types
Source: https://context7.com/chainlift/liftkit/llms.txt
Defines core TypeScript types for consistent styling, including size units, color tokens, font classes, and container widths. These types ensure design system compliance across the application.
```typescript
type LkSizeUnit = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
type LkColor = "primary" | "onprimary" | "primarycontainer" | "secondary" | "surface" | "onsurface" | "error" | "success" | "warning" | "info";
type LkColorWithOnToken = "primary" | "secondary" | "tertiary" | "error" | "surface" | "surfacecontainer" | "success" | "warning" | "info";
type LkFontClass = "display1" | "display2" | "title1" | "title2" | "title3" | "heading" | "subheading" | "body" | "callout" | "label" | "caption" | "capline" | "body-bold" | "heading-mono";
type LkContainerWidth = "xs" | "sm" | "md" | "lg" | "xl" | "none" | "auto";
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.