Skip to content
Guides / Getting started

Shims

shadcn primitives backed by Fabrials controls.

A shim is a shadcn primitive backed by a Fabrials control. It installs as components/ui/<name>.tsx and re-exports the @fabrials/ui component under the names shadcn uses:

components/ui/button.tsx
export { Button, buttonVariants } from "@fabrials/ui";

Code written for shadcn, including components from other libraries, imports @/components/ui/button and gets the Fabrials button: the same focus ring, density, dark mode and Stormlight accent as the rest of the app.

When a primitive gets a shim

Only when @fabrials/ui exports every name shadcn's file exports, checked against a recorded copy of shadcn's Base UI style. A primitive Fabrials covers only partly stays shadcn's, so nothing that imports it breaks. When Fabrials adds the missing parts, the shim appears on the next build.

The props follow Fabrials. Most match shadcn's Base UI style; where they differ, TypeScript tells you. Components from other libraries are only listed here when they compile against the shims.

Install

npx shadcn@latest add @fabrials/button @fabrials/dialog @fabrials/select

Every shim depends on @fabrials/styles, which imports the Fabrials CSS once.

Available shims

PrimitiveInstallExports
accordion@fabrials/accordionAccordion, AccordionContent, AccordionItem, AccordionTrigger
alert@fabrials/alertAlert, AlertAction, AlertDescription, AlertTitle
alert-dialog@fabrials/alert-dialogAlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger
breadcrumb@fabrials/breadcrumbBreadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator
button@fabrials/buttonButton, buttonVariants
button-group@fabrials/button-groupButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants
card@fabrials/cardCard, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle
carousel@fabrials/carouselCarousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel
checkbox@fabrials/checkboxCheckbox
collapsible@fabrials/collapsibleCollapsible, CollapsibleContent, CollapsibleTrigger
command@fabrials/commandCommand, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut
dialog@fabrials/dialogDialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger
dropdown-menu@fabrials/dropdown-menuDropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger
hover-card@fabrials/hover-cardHoverCard, HoverCardContent, HoverCardTrigger
input@fabrials/inputInput
input-group@fabrials/input-groupInputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea
item@fabrials/itemItem, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle
kbd@fabrials/kbdKbd, KbdGroup
label@fabrials/labelLabel
native-select@fabrials/native-selectNativeSelect, NativeSelectOptGroup, NativeSelectOption
navigation-menu@fabrials/navigation-menuNavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle
pagination@fabrials/paginationPagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious
popover@fabrials/popoverPopover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger
radio-group@fabrials/radio-groupRadioGroup, RadioGroupItem
resizable@fabrials/resizableResizableHandle, ResizablePanel, ResizablePanelGroup
scroll-area@fabrials/scroll-areaScrollArea, ScrollBar
select@fabrials/selectSelect, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue
separator@fabrials/separatorSeparator
sheet@fabrials/sheetSheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger
sidebar@fabrials/sidebarSidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar
skeleton@fabrials/skeletonSkeleton
sonner@fabrials/sonnerToaster
spinner@fabrials/spinnerSpinner
switch@fabrials/switchSwitch
table@fabrials/tableTable, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow
textarea@fabrials/textareaTextarea
toggle-group@fabrials/toggle-groupToggleGroup, ToggleGroupItem
tooltip@fabrials/tooltipTooltip, TooltipContent, TooltipProvider, TooltipTrigger