Kosmesis

Kosmesis

Copy-paste UI components for PraxisJS, built on top of Morphos.

Kosmesis

Welcome! Kosmesis (κόσμησις, Greek: adornment, ornamentation) is a collection of copy-paste UI components for PraxisJS, in the same spirit as shadcn/ui. If you've used shadcn/ui before, you'll feel right at home — same idea, rebuilt for PraxisJS and built on top of Morphos instead of Radix UI / Base UI.

You don't install a dependency. You own the code.

Running kosmesis add button copies button.tsx straight into src/components/ui/button.tsx in your own repository — no package to add, no version to track, no props API to negotiate with. Every component ships fully styled and accessible, in whichever of two independent style systems you chose during kosmesis init: Tailwind CSS or @praxisjs/css.

New here? Start with the guide below — it walks through installing the CLI, understanding how Kosmesis relates to Morphos, and adding your first component.

Browse components

Design philosophy

  • Copy-paste, not installedkosmesis add writes source files into your project. There's no @kosmesis/* runtime package, so there's nothing to keep in sync with a future release.
  • Two style systems, chosen once — Tailwind CSS + class-variance-authority, or @praxisjs/css (typed CSS-in-TS via the PraxisJS decorator model). Picked once in kosmesis init, never mixed within a project.
  • Presentation over Morphos's behavior — every interactive component wraps the matching Morphos primitive, reusing its keyboard navigation, ARIA roles, and data-* state exposure rather than reimplementing any of it.
  • You can change anything — variants, tokens, and markup all live in the file that was copied into your project. Editing it is the intended workflow, not an escape hatch.

Not sure where to start? Getting Started has a full working example, including the compound-component pattern (dialog={this.dialog}-style props) every overlay and grouped-input component inherits directly from Morphos.

Full component list

Inputs — wrapping @morphos/inputs

ComponentDescription
ButtonPolymorphic button with shadcn-style variants
InputSingle-line text input
NumberFieldDecrement/input/increment stepper
CheckboxCheckbox with indeterminate support
SwitchToggle switch
RadioGroupRadio group with keyboard navigation
SelectCustom listbox select with keyboard support
ToggleTwo-state toggle button
ToggleGroupSingle- or multiple-selection toggle group
SliderRange slider
FieldForm field wrapper with label, description, and error message
InputOTPOne-time password input
ComboboxSearchable select with text filtering

Overlays — wrapping @morphos/overlays

ComponentDescription
TooltipHover/focus-activated tooltip
PopoverClick-toggled floating panel
DialogModal dialog with focus trap and scroll lock
AlertDialogConfirmation dialog for destructive/important actions
DropdownMenuMenu with full keyboard navigation
ContextMenuRight-click context menu
HoverCardHover-activated preview card
DrawerSide panel sliding in from any edge
DatePickerPopover + Calendar composition for picking a single date
Commandcmdk-style, always-filtered command list

Layout — wrapping @morphos/layout

ComponentDescription
SeparatorHorizontal or vertical divider
TabsTab panel with keyboard navigation
AccordionCollapsible item list, single or multiple open at once
CollapsibleSingle expand/collapse toggle
NavigationMenuSite navigation with submenus
MenubarHorizontal menu bar with dropdown menus
ScrollAreaCustom-styled scroll container with a proportional thumb
SidebarCollapsible application sidebar, composing a mobile sheet and a desktop rail

Feedback — wrapping @morphos/feedback

ComponentDescription
AvatarImage with automatic fallback on load failure
AlertStatic inline notification
ProgressProgress bar with an indeterminate mode
SpinnerLoading indicator
SonnerAuto-dismissing notification queue with a global toast() helper

Presentational — no Morphos primitive

Radix UI / Base UI don't cover these either — shadcn/ui builds them from scratch, and so does Kosmesis:

ComponentDescription
BadgeSmall status/label pill
SkeletonPulsing placeholder for loading content
CardBordered content container with Header/Title/Description/Content/Footer parts
AspectRatioConstrains content to a fixed width/height ratio
LabelAccessible label, typically paired with Field
TextareaMulti-line text input
TableResponsive table with Header/Body/Footer/Row/Head/Cell/Caption parts
TypographyProse text primitives (headings, lead, muted, inline code, blockquote)
KbdRepresents a keyboard key or shortcut
NativeSelectPlain, styled native <select>
ButtonGroupVisually groups adjacent buttons into one control
InputGroupPairs an Input with leading/trailing addons
ItemGeneric list-row layout with media/content/actions slots
EmptyBlank/empty-state layout with header, media, title, description slots
MarkerSmall positional dot/pin
DirectionSets ambient text direction (ltr/rtl) via the native dir attribute
SheetSide panel sliding in from any edge — a thin re-export of Drawer
ToastClassic toast API — a thin re-export of Sonner
CalendarMonth-grid date picker with real date math
DataTableSortable, paginated table composing Table, no external table library
CarouselScroll-snap-based slideshow, no Embla dependency
ChartLightweight SVG bar/line chart, no Recharts dependency
PaginationPage navigation links, composing Button's variants
ResizableDrag-resizable panel group using native pointer events
BreadcrumbBreadcrumb trail with separators and an ellipsis
AttachmentFile/media attachment chip, typically used inside Message
BubbleSingle chat message bubble
MessageComposes Bubble with an optional avatar and role-based layout
MessageScrollerScrollable chat viewport with an imperative scrollToBottom()

Getting help

  • Every component page states which Morphos primitive backs it (or whether it's built from scratch), and the source itself is a single file — open it and read it.
  • See a bug or want a feature? Open an issue on GitHub.
  • Check the changelog for what's new in each release.

On this page