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:
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/selectEvery shim depends on @fabrials/styles, which imports the Fabrials CSS once.
Available shims
| Primitive | Install | Exports |
|---|---|---|
accordion | @fabrials/accordion | Accordion, AccordionContent, AccordionItem, AccordionTrigger |
alert | @fabrials/alert | Alert, AlertAction, AlertDescription, AlertTitle |
alert-dialog | @fabrials/alert-dialog | AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger |
breadcrumb | @fabrials/breadcrumb | Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator |
button | @fabrials/button | Button, buttonVariants |
button-group | @fabrials/button-group | ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants |
card | @fabrials/card | Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle |
carousel | @fabrials/carousel | Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel |
checkbox | @fabrials/checkbox | Checkbox |
collapsible | @fabrials/collapsible | Collapsible, CollapsibleContent, CollapsibleTrigger |
command | @fabrials/command | Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut |
dialog | @fabrials/dialog | Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger |
dropdown-menu | @fabrials/dropdown-menu | DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger |
hover-card | @fabrials/hover-card | HoverCard, HoverCardContent, HoverCardTrigger |
input | @fabrials/input | Input |
input-group | @fabrials/input-group | InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea |
item | @fabrials/item | Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle |
kbd | @fabrials/kbd | Kbd, KbdGroup |
label | @fabrials/label | Label |
native-select | @fabrials/native-select | NativeSelect, NativeSelectOptGroup, NativeSelectOption |
navigation-menu | @fabrials/navigation-menu | NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle |
pagination | @fabrials/pagination | Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious |
popover | @fabrials/popover | Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger |
radio-group | @fabrials/radio-group | RadioGroup, RadioGroupItem |
resizable | @fabrials/resizable | ResizableHandle, ResizablePanel, ResizablePanelGroup |
scroll-area | @fabrials/scroll-area | ScrollArea, ScrollBar |
select | @fabrials/select | Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue |
separator | @fabrials/separator | Separator |
sheet | @fabrials/sheet | Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger |
sidebar | @fabrials/sidebar | Sidebar, 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/skeleton | Skeleton |
sonner | @fabrials/sonner | Toaster |
spinner | @fabrials/spinner | Spinner |
switch | @fabrials/switch | Switch |
table | @fabrials/table | Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow |
textarea | @fabrials/textarea | Textarea |
toggle-group | @fabrials/toggle-group | ToggleGroup, ToggleGroupItem |
tooltip | @fabrials/tooltip | Tooltip, TooltipContent, TooltipProvider, TooltipTrigger |