# Tailwind CSS & shadcn/ui Integration
React Split Pane works seamlessly with Tailwind CSS and shadcn/ui. The component uses plain CSS and inline styles (no CSS-in-JS), so there are no conflicts with utility-first frameworks.
## Using Tailwind Classes
Apply Tailwind classes directly via `className` props. Skip importing the default stylesheet for full Tailwind control:
```tsx
import { SplitPane, Pane } from 'react-split-pane';
// Don't import 'react-split-pane/styles.css' if using Tailwind
```
## shadcn/ui Integration
Use shadcn's CSS variables and utilities for consistent theming:
```tsx
import { SplitPane, Pane } from 'react-split-pane';
```
## Custom Divider with shadcn
Create a themed divider component using shadcn's `cn` utility:
```tsx
import { cn } from '@/lib/utils';
import type { DividerProps } from 'react-split-pane';
function ThemedDivider(props: DividerProps) {
const {
direction,
isDragging,
disabled,
onMouseDown,
onTouchStart,
onTouchEnd,
onKeyDown,
} = props;
return (
);
}
Left
Right
```
## CSS Variables with Tailwind
Override the default CSS variables in your `globals.css` to match your Tailwind theme:
```css
/* globals.css */
@layer base {
:root {
--split-pane-divider-size: 4px;
--split-pane-divider-color: theme('colors.gray.200');
--split-pane-divider-color-hover: theme('colors.gray.300');
--split-pane-focus-color: theme('colors.blue.500');
}
.dark {
--split-pane-divider-color: theme('colors.gray.700');
--split-pane-divider-color-hover: theme('colors.gray.600');
}
}
```
Or with shadcn/ui CSS variables:
```css
@layer base {
:root {
--split-pane-divider-color: hsl(var(--border));
--split-pane-divider-color-hover: hsl(var(--accent));
--split-pane-focus-color: hsl(var(--ring));
}
}
```