Componentdata0.44 KB gzipZero dependencies
Split Screen
Split layout: left content and right emphasis panel with ratio control.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add split-screenOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { SplitScreen } from "@/components/ui/split-screen"; <SplitScreen />Source code
split-screen.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxsplit-screen.tsx42 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface SplitScreenProps extends React.HTMLAttributes<HTMLDivElement> { /** sol taraf (genelde metin/form) */ left: React.ReactNode; /** Right side slot (typically graphic or visual) */ right: React.ReactNode; /** Right side width fraction (0 to 1) */ rightRatio?: number; /** Hide right panel on mobile viewports */ hideRightOnMobile?: boolean;} /** Split screen layout: left main content + right visual panel. */export function SplitScreen({ left, right, rightRatio = 0.45, hideRightOnMobile = true, className, ...props }: SplitScreenProps) {Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { SplitScreen } from "@/components/ui/split-screen"; <SplitScreen />| Prop | Type | Description |
|---|---|---|
| left | React.ReactNode | sol taraf (genelde metin/form) |
| right | React.ReactNode | Right side slot (typically graphic or visual) |
| rightRatio | number | Right side width fraction (0 to 1) |
| hideRightOnMobile | boolean | Hide right panel on mobile viewports |