Work Experience
ncdai/work-experienceUnverifiedComponent
Display work experiences with role details, company logos, and durations.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/Sumeet011/Portfolio/main/public/r/work-experience.jsonSource
1"use client"23import { useCallback, useRef, type ComponentProps } from "react"4import { differenceInMonths, parse } from "date-fns"5import ReactMarkdown from "react-markdown"67import { cn } from "@/lib/utils"8import {9 Collapsible,10 CollapsibleContent,11 CollapsibleTrigger,12} from "@/components/ui/collapsible"13import { Separator } from "@/components/ui/separator"14import type { ChevronsUpDownIconHandle } from "@/registry/components/chevrons-up-down-icon"15import { ChevronsUpDownIcon } from "@/registry/components/chevrons-up-down-icon"16import { IconPlaceholder } from "@/registry/icons/icon-placeholder"1718export type ExperiencePositionItemType = {19 /** Unique identifier for the position */20 id: string21 /** The job title or position name */22 title: string23 /**24 * Employment period of the position.25 * Use "MM.YYYY" or "YYYY" format. Omit `end` for current roles.26 */27 employmentPeriod: {28 /** Start date (e.g., "10.2022" or "2020"). */29 start: string30 /** End date; leave undefined for "Present". */31 end?: string32 }33 /** The type of employment (e.g., "Full-time", "Part-time", "Contract") */34 employmentType?: string35 /** A brief description of the position or responsibilities */36 description?: string37 /** An icon representing the position */38 icon?: React.ReactElement39 /** A list of skills associated with the position */40 skills?: string[]41 /** Indicates if the position details are expanded in the UI */42 isExpanded?: boolean43}4445export type ExperienceItemType = {46 /** Unique identifier for the experience item */47 id: string48 /** Name of the company where the experience was gained */49 companyName: string50 /** URL or path to the company's logo image */51 companyLogo?: string52 /** URL to the company's website. */53 companyWebsite?: string54 /**55 * List of positions held at the company56 * @fumadocsHref #experiencepositionitemtype57 * */58 positions: ExperiencePositionItemType[]59 /** Indicates if this is the user's current employer */60 isCurrentEmployer?: boolean61}6263export type WorkExperienceProps = {64 className?: string65 /** @fumadocsHref #experienceitemtype */66 experiences: ExperienceItemType[]67}6869export function WorkExperience({70 className,71 experiences,72}: WorkExperienceProps) {73 return (74 <div className={cn("bg-background px-4 text-foreground", className)}>75 {experiences.map((experience) => (76 <ExperienceItem key={experience.id} experience={experience} />77 ))}78 </div>79 )80}8182// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from ncdai
All 48 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Apple Hello Effectapple-hello-effect | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Hindiapple-hello-effect-hindi | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Spanishapple-hello-effect-spanish | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Vietnameseapple-hello-effect-vietnamese | ncdai | Components | Unverified | 1 dep | |
| Brand Assets Menubrand-assets-menu | ncdai | Components | Unverified | 1 dep | |
| chevrons-up-down-iconchevrons-up-down-icon | ncdai | Components | Unverified | 1 dep | |
| Code Block Commandcode-block-command | ncdai | Components | Unverified | 4 deps · 2 files | |
| Consent Managerconsent-manager | ncdai | Components | Unverified | 1 dep |
