Shadix UIShadix UI

Segment Layout

A segment layout component for shadcn/ui. Easily create a segment layout with left and right items and a content area.

Who Developed This Component:

Installation

GitHub
pnpm dlx shadcn@latest add @shadix-ui/segment-layout

Usage

Basic Usage

Import the component

import { SegmentLayout, SegmentLayoutContent } from '@shadix-ui/segment-layout';

Use the component

<SegmentLayout
    leftItems={[
        {
            label: 'Back-End Developer ',
            value: 'back-end-developer'
        },
        {
            label: 'Front-End Developer',
            value: 'front-end-developer'
        },
        {
            label: 'Full-Stack Developer ',
            value: 'full-stack-developer'
        },
        {
            label: 'DevOps Engineer',
            value: 'devops-engineer',
            disabled: true
        }
    ]}
    classNames={{
        mainWrapper: 'sm:p-0',
        contentWrapper: 'min-w-80',
        itemsWrapper: 'w-50'
    }}
    rightItems={[
        {
            label: 'System Administrator',
            value: 'system-administrator',
            disabled: true
        },
        {
            label: 'Database Administrator',
            value: 'database-administrator'
        },
        {
            label: 'Network Administrator',
            value: 'network-administrator'
        },
        {
            label: 'Security Analyst',
            value: 'security-analyst'
        }
    ]}>
    <SegmentLayoutContent value="back-end-developer" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">Back-End Developer</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="front-end-developer" className="flex w-full h-40">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">Front-End Developer</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="full-stack-developer" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">Full-Stack Developer</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="devops-engineer" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">DevOps Engineer</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="system-administrator" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">System Administrator</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="database-administrator" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">Database Administrator</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="network-administrator" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">Network Administrator</h2>
    </SegmentLayoutContent>
    <SegmentLayoutContent value="security-analyst" className="flex w-full h-80">
        <h2 className="text-2xl !m-0 !p-0 font-semibold">Security Analyst</h2>
    </SegmentLayoutContent>
</SegmentLayout>

Props

Built by Gihan (apix-js) for Shadcn at Vercel. Source code on GitHub.