@muten/shadcn 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +108 -0
- package/globals.css +14 -6
- package/package.json +3 -2
- package/registry/bento.muten +9 -0
- package/registry/button-group.muten +4 -0
- package/registry/button.muten +8 -0
- package/registry/feature-rows.muten +8 -0
- package/registry/input-group.muten +4 -0
- package/registry/input.muten +7 -0
- package/registry/kbd.muten +3 -0
- package/registry/link-btn.muten +7 -0
- package/registry/navpill.muten +10 -0
- package/registry/skeleton.muten +4 -0
- package/registry/stat-band.muten +9 -0
- package/registry.json +78 -10
package/AGENTS.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# @muten/shadcn - component catalog (for an AI assembling a muten app)
|
|
2
|
+
|
|
3
|
+
## Setup (once): `plugins { shadcn {} }` in muten.config + `@import "@muten/shadcn/globals.css";` in src/styles.css. Then everything below is usable directly; `muten add <name>` only ejects a source.
|
|
4
|
+
|
|
5
|
+
## PLUG-AND-PLAY (zero class props)
|
|
6
|
+
- **Btn**(variant, onClick) { slot } · **LinkBtn**(to, variant) { slot } · **Input**(value, placeholder)
|
|
7
|
+
- **DataTable** @rows columns(a, b) - STYLED BY DEFAULT, no class needed.
|
|
8
|
+
- + every Part / Custom below.
|
|
9
|
+
|
|
10
|
+
## Parts (64) - imported by plugins {}
|
|
11
|
+
|
|
12
|
+
- **Card** - A surface with CardHeader / CardTitle / CardDescription / CardContent / CardFooter sub-components. · +CardHeader, CardTitle, CardDescription, CardContent, CardFooter
|
|
13
|
+
- **Badge** - A small status descriptor. variant: default | secondary | destructive | outline.
|
|
14
|
+
- **Alert** - A callout with AlertTitle / AlertDescription. variant: default | destructive. · +AlertTitle, AlertDescription
|
|
15
|
+
- **Avatar** - A user's initials in a circle (AvatarFallback).
|
|
16
|
+
- **Switch** - A toggle; the page owns the bool + the action.
|
|
17
|
+
- **Spinner** - A loading indicator (animate-spin loader).
|
|
18
|
+
- **Progress** - A determinate progress bar; value is 0-100.
|
|
19
|
+
- **Separator** - A thin divider line.
|
|
20
|
+
- **Empty** - An empty-state placeholder (title + description in a dashed border).
|
|
21
|
+
- **Breadcrumb** - A breadcrumb trail with BreadcrumbLink / BreadcrumbSeparator / BreadcrumbPage. · +BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator
|
|
22
|
+
- **Pagination** - Page navigation with PaginationLink / Previous / Next / Ellipsis. · +PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis
|
|
23
|
+
- **Field** - A labelled form control: FieldLabel / FieldDescription / FieldError. · +FieldLabel, FieldDescription, FieldError
|
|
24
|
+
- **Item** - A bordered row: ItemContent / ItemTitle / ItemDescription. · +ItemContent, ItemTitle, ItemDescription
|
|
25
|
+
- **Checkbox** - A checkbox; the page owns the bool + the toggle action.
|
|
26
|
+
- **Toggle** - A two-state button; the page owns the bool + the toggle action.
|
|
27
|
+
- **ToggleGroup** - Single-select toolbar with ToggleGroupItem; page owns a text state. · +ToggleGroupItem
|
|
28
|
+
- **RadioGroup** - Single choice with RadioGroupItem; page owns a text state. · +RadioGroupItem
|
|
29
|
+
- **Collapsible** - A trigger + content shown when open; page owns the bool.
|
|
30
|
+
- **Accordion** - Stacked expandable sections with AccordionItem; page owns a bool per item. · +AccordionItem
|
|
31
|
+
- **TabsList** - Tab bar (TabsList/TabsTrigger) + TabsContent panels; page owns the active-tab text. · +TabsTrigger, TabsContent
|
|
32
|
+
- **Dialog** - A modal with DialogTitle/Description/Footer; page owns the open bool. Backdrop click closes. · +DialogTitle, DialogDescription, DialogFooter
|
|
33
|
+
- **Tooltip** - A hover tooltip (pure CSS, no state). The slot is the trigger.
|
|
34
|
+
- **DropdownMenu** - A menu below a trigger with DropdownItem/Label/Separator; page owns the open bool. · +DropdownItem, DropdownLabel, DropdownSeparator
|
|
35
|
+
- **Popover** - A floating panel below a trigger; page owns the open bool.
|
|
36
|
+
- **AlertDialog** - A modal requiring an explicit choice (no backdrop dismiss); page owns the open bool. · +AlertDialogTitle, AlertDialogDescription, AlertDialogFooter
|
|
37
|
+
- **Sheet** - A panel that slides in from the right; page owns the open bool. · +SheetTitle, SheetDescription
|
|
38
|
+
- **Drawer** - A panel that slides up from the bottom; page owns the open bool.
|
|
39
|
+
- **HoverCard** - Richer content shown on hover (pure CSS, no state).
|
|
40
|
+
- **Select** - A value picker with SelectItem; page owns the value text + open bool. · +SelectItem
|
|
41
|
+
- **ScrollArea** - A scrollable region with styled scrollbars.
|
|
42
|
+
- **Message** - Chat Message + Bubble + Marker (variant: sent | received). · +Bubble, Marker
|
|
43
|
+
- **MessageScroller** - A scrollable column of chat messages.
|
|
44
|
+
- **Attachment** - A file attachment chip (icon + name + size).
|
|
45
|
+
- **Menubar** - A bar of menus (File/Edit/View); page owns which is open via a text state. · +MenubarMenu, MenubarItem, MenubarSeparator
|
|
46
|
+
- **NavigationMenu** - A nav bar with hover-revealed panels (pure CSS, no state). · +NavigationMenuItem, NavigationMenuLink
|
|
47
|
+
- **Combobox** - A Select with a search box; page filters items with `each … where`. · +ComboboxItem
|
|
48
|
+
- **Command** - A command palette (search + grouped CommandItem list). · +CommandList, CommandGroup, CommandItem, CommandShortcut
|
|
49
|
+
- **SegmentedControl** - A single-select toolbar (SegmentedItem); page owns a text state. · +SegmentedItem, SegmentedTabs, IconTab
|
|
50
|
+
- **VectorField** - Paired NumberFields (X/Y) for position or size.
|
|
51
|
+
- **Toolbar** - A grouped button bar with ToolbarGroup / ToolbarSeparator. · +ToolbarGroup, ToolbarSeparator
|
|
52
|
+
- **StatusBar** - A thin bottom bar with StatusItem / StatusSpacer. · +StatusItem, StatusSpacer
|
|
53
|
+
- **ZoomControl** - A - 100% + zoom widget; page owns the zoom number.
|
|
54
|
+
- **SplitButton** - A main action + a caret dropdown; page owns the open bool.
|
|
55
|
+
- **SwatchPalette** - A grid of selectable color swatches (Swatch); page owns the selected hex + colors. · +Swatch
|
|
56
|
+
- **AppSidebar** - AppSidebar - a collapsible nav panel (SidebarHeader / SidebarGroup / SidebarItem). Named AppSidebar so it never shadows muten's core Sidebar <aside> primitive. · +SidebarHeader, SidebarGroup, SidebarGroupLabel, SidebarItem
|
|
57
|
+
- **Inspector** - Property grid: InspectorSection (collapsible) / InspectorRow (label : value slot). · +InspectorSection, InspectorRow
|
|
58
|
+
- **CommandPalette** - A top-anchored modal holding a Command; page owns the open bool.
|
|
59
|
+
- **Stepper** - Horizontal or vertical step progress indicator; done steps show a check, the current step is ringed (parts: Stepper, StepperVertical, Step). · +StepperVertical, Step
|
|
60
|
+
- **Timeline** - Vertical event timeline: a dot on a connector line + title/time/description per item (parts: Timeline, TimelineItem). · +TimelineItem
|
|
61
|
+
- **Pill** - A hero eyebrow chip (rounded-full, bigger than Badge); slot-based for an icon + text.
|
|
62
|
+
- **FeatureGrid** - BLOCK: responsive grid of feature cards (icon + title + copy). Parts: FeatureGrid, FeatureCard. · +FeatureCard
|
|
63
|
+
- **Pricing** - BLOCK: a row of pricing tiers (name/price/features/CTA), featured highlight. Parts: Pricing, PricingTier, PricingFeature. · +PricingTier, PricingTierFeatured, PricingFeature
|
|
64
|
+
- **LogoCloud** - BLOCK: a 'trusted by' strip of logos, muted + grayscale until hover. Parts: LogoCloud, LogoCloudItem. · +LogoCloudItem
|
|
65
|
+
- **NavPill** - BLOCK: the floating glass navbar (sticky wrapper + glass pill + scroll animation baked in). Drop logo/links/CTA inside.
|
|
66
|
+
- **StatBand** - BLOCK: a divided row of KPI stats. Parts: StatBand, Stat(label) - value goes in the slot (Span or Custom CountUp). · +Stat
|
|
67
|
+
- **FeatureRows** - BLOCK: numbered feature/schedule rows with side gutters (12-col grid inside). Parts: FeatureRows, FeatureRow. · +FeatureRow
|
|
68
|
+
- **BentoGallery** - BLOCK: fixed-row-height tiling gallery; cells pick their col-span. Parts: BentoGallery, BentoCell. · +BentoCell
|
|
69
|
+
- **ButtonGroup** - A segmented row of buttons that share borders. Put btn-outline buttons inside.
|
|
70
|
+
- **InputGroup** - An input with a leading icon/addon in one bordered field.
|
|
71
|
+
- **Skeleton** - A loading placeholder (pulse). Add size via class: Skeleton class("h-4 w-32").
|
|
72
|
+
- **Kbd** - A keyboard key hint. Kbd { Span "Ctrl" }.
|
|
73
|
+
- **Btn** - Plug-and-play button (part Btn - Button is a primitive). `Btn(variant: "default", onClick: save) { Span "Save" }`. variant: default|secondary|outline|ghost|destructive|link.
|
|
74
|
+
- **Input** - Plug-and-play text input (part Input wraps SearchField). `Input(value: q, placeholder: "...")` - value is two-way bound. For typed/validated fields use a Form.
|
|
75
|
+
- **LinkBtn** - A navigation link styled as a button. `LinkBtn(to: "/signup", variant: "default") { Span "Get started" }`.
|
|
76
|
+
|
|
77
|
+
## Customs (21) - importable; some need a dep
|
|
78
|
+
|
|
79
|
+
- **Slider** (`slider`) - A draggable range slider (Custom). Page owns the value number.
|
|
80
|
+
- **InputOtp** (`input-otp`) - N single-character boxes synced to one value (Custom). Page owns the value text.
|
|
81
|
+
- **Calendar** (`calendar`) - A month-grid date picker (Custom). Page owns the selected ISO date text.
|
|
82
|
+
- **Toaster** (`toaster`) - Fixed toast notifications (Custom). Page bumps a trigger counter to fire one.
|
|
83
|
+
- **Carousel** (`carousel`) - A slide carousel over a list (Custom). Page owns the slides list.
|
|
84
|
+
- **Chart** (`chart`) - An SVG bar chart over a list of { label, value } (Custom).
|
|
85
|
+
- **GradientBlinds** (`gradient-blinds`) · **needs npm: ogl** - Animated WebGL gradient + diagonal-blinds hero background that follows the cursor and fades into the page (needs ogl).
|
|
86
|
+
- **Resizable** (`resizable`) - Two panels with a draggable splitter (Custom).
|
|
87
|
+
- **ContextMenu** (`context-menu`) - Right-click an area to open a menu of items (Custom).
|
|
88
|
+
- **NumberField** (`number-field`) - A numeric input with -/+ steppers, min/max/step (Custom).
|
|
89
|
+
- **FileInput** (`file-input`) - A click/drag-drop file dropzone (Custom); emits file names.
|
|
90
|
+
- **ColorPicker** (`color-picker`) - A swatch + saturation/value + hue popover (Custom); page owns the hex.
|
|
91
|
+
- **TreeView** (`tree-view`) - A nested folder/file tree (Custom): expandable, selectable, icons + indent.
|
|
92
|
+
- **CanvasHost** (`canvas-viewport`) - A <canvas> with pan/zoom (Custom) + a muten toolbar slot floating on top.
|
|
93
|
+
- **TagInput** (`tag-input`) - Chips you add by typing + Enter (Custom); page owns a comma-joined text.
|
|
94
|
+
- **RangeSlider** (`range-slider`) - A two-thumb range slider (Custom); page owns the low + high numbers.
|
|
95
|
+
- **SortableList** (`sortable-list`) - Drag rows to reorder (Custom); page owns a comma-joined order.
|
|
96
|
+
- **FolderPicker** (`folder-picker`) - Connect a local folder via showDirectoryPicker (Custom); emits the name.
|
|
97
|
+
- **Hotkey** (`hotkey`) - A global keyboard shortcut (Cmd/Ctrl+key), invisible (Custom).
|
|
98
|
+
- **Code** (`code`) - Syntax-highlighted code block that understands muten (shared highlight.js, same grammar as the VS Code extension).
|
|
99
|
+
- **CountUp** (`count-up`) - Animate a formatted number (2.4M / 94% / 40ms / 99.99%) from 0 when it scrolls into view; lands on the exact target. Custom. Styled form (takes the class): `Custom CountUp inputs(to: "2.4M") class("text-4xl font-bold")`. For stat bands + hero metrics.
|
|
100
|
+
|
|
101
|
+
## Class recipes (4) - style a primitive (Table is default-styled; typography/textarea/motion)
|
|
102
|
+
|
|
103
|
+
- **textarea** - class("textarea") · label: class("label") · native select: class("native-select")
|
|
104
|
+
- **typography** - Title "Docs" h1 class("prose-h1") (prose-h1..h4 · prose-p|lead|large|small|muted|blockquote|code|list)
|
|
105
|
+
- **table** - DataTable @rows columns(name, email, status) - STYLED BY DEFAULT (no class needed). `class("data-table")` still works as an explicit alias. Raw cells; for badge/formatted cells build with each + Stack.
|
|
106
|
+
- **motion** - Page animations, all CSS + reduced-motion safe. Entrance: animate-fade-up|fade-in|scale-in|slide-in (+ d1..d6 stagger). Scroll: reveal|reveal-left|reveal-scale, and nav-scroll on a navbar. Hover/press: hover-lift, hover-glow, arrow-hover (nudges a trailing Icon), link-underline, press, float.
|
|
107
|
+
|
|
108
|
+
### Gotcha: a part can not be named after a primitive (Button/Link/Form/Image/SearchField/DataTable/Icon/Text/Title/Span) - hence Btn/Input/LinkBtn. `Part(...) class(...)` is a syntax error.
|
package/globals.css
CHANGED
|
@@ -435,12 +435,14 @@
|
|
|
435
435
|
.command-shortcut { @apply ml-auto text-xs tracking-widest text-muted-foreground; }
|
|
436
436
|
|
|
437
437
|
/* ---- Table - style muten's DataTable to look shadcn: DataTable @rows columns(...) class("data-table") ---- */
|
|
438
|
-
.
|
|
439
|
-
|
|
440
|
-
.data-table
|
|
441
|
-
.data-table
|
|
442
|
-
.data-table
|
|
443
|
-
.data-table
|
|
438
|
+
/* .mu-datatable is the base class the DataTable primitive always gets, so a bare `DataTable @rows columns(...)`
|
|
439
|
+
is styled out of the box (no class needed). Safe: DataTable is a leaf, never reused with another class. */
|
|
440
|
+
.data-table, .mu-datatable { @apply w-full caption-bottom text-sm; }
|
|
441
|
+
.data-table thead tr, .mu-datatable thead tr { @apply border-b; }
|
|
442
|
+
.data-table th, .mu-datatable th { @apply h-11 px-3 text-left align-middle font-medium text-muted-foreground whitespace-nowrap; }
|
|
443
|
+
.data-table tbody tr, .mu-datatable tbody tr { @apply border-b transition-colors duration-200 hover:bg-muted/50; }
|
|
444
|
+
.data-table tbody tr:last-child, .mu-datatable tbody tr:last-child { @apply border-0; }
|
|
445
|
+
.data-table td, .mu-datatable td { @apply p-3 align-middle whitespace-nowrap; }
|
|
444
446
|
|
|
445
447
|
/* ---- Slider (Custom; the host JS builds .slider-range + .slider-thumb inside .slider) ---- */
|
|
446
448
|
.slider { @apply relative h-2 w-full rounded-full bg-primary/20 cursor-pointer select-none; touch-action: none; }
|
|
@@ -715,6 +717,12 @@
|
|
|
715
717
|
.pricing-features { @apply flex flex-col gap-2.5 flex-1; }
|
|
716
718
|
.pricing-feature { @apply flex flex-row items-center gap-2 text-sm; }
|
|
717
719
|
|
|
720
|
+
/* ---- StatBand: a divided row of KPI stats (value + label), uniform, 2-up on mobile ---- */
|
|
721
|
+
.stat-band { @apply grid grid-cols-4 gap-px border-y border-border bg-border overflow-hidden max-sm:grid-cols-2; }
|
|
722
|
+
.stat { @apply flex flex-col items-center gap-1 bg-background px-6 py-10 text-center; }
|
|
723
|
+
.stat-value { @apply text-4xl font-bold tracking-tight; }
|
|
724
|
+
.stat-label { @apply text-sm text-muted-foreground; }
|
|
725
|
+
|
|
718
726
|
/* ---- LogoCloud: the "trusted by" strip - a wrapping row of logos, muted until hover. GENERIC: an item holds
|
|
719
727
|
ANY logo type - an <img>, an inline SVG/Icon, or a text wordmark - and each is normalized to the same height. ---- */
|
|
720
728
|
.logo-cloud { @apply flex flex-row flex-wrap items-center justify-center gap-x-10 gap-y-6; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muten/shadcn",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "shadcn-style component registry for muten - own-the-source parts you add with `muten add`.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"registry",
|
|
16
16
|
"registry.json",
|
|
17
17
|
"globals.css",
|
|
18
|
-
"README.md"
|
|
18
|
+
"README.md",
|
|
19
|
+
"AGENTS.md"
|
|
19
20
|
],
|
|
20
21
|
"exports": {
|
|
21
22
|
"./globals.css": "./globals.css",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# BentoGallery - a tiling gallery on a fixed row-height grid, so cells of different column widths always line up.
|
|
2
|
+
# Each BentoCell picks its own col-span (and bg / content) via class:
|
|
3
|
+
# BentoGallery {
|
|
4
|
+
# BentoCell class("col-span-4 bg-muted") { Span "01" }
|
|
5
|
+
# BentoCell class("col-span-2 bg-accent") { Span "02" }
|
|
6
|
+
# }
|
|
7
|
+
# shadcn-for-muten · block · no deps · uses .bento-gallery / .bento-cell from globals.css.
|
|
8
|
+
part BentoGallery() { Stack class("bento-gallery") { slot } }
|
|
9
|
+
part BentoCell() { Stack class("bento-cell") { slot } }
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# ButtonGroup - segmented row of buttons that share borders. Put `btn btn-outline` buttons inside:
|
|
2
|
+
# ButtonGroup { Button "Bold" -> b class("btn btn-outline") Button "Italic" -> i class("btn btn-outline") }
|
|
3
|
+
# shadcn-for-muten · part · no deps · uses .btn-group from globals.css.
|
|
4
|
+
part ButtonGroup() { Stack class("btn-group") { slot } }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Button (part name Btn - `Button` is a muten primitive, so a part can't reuse that name) - a plug-and-play
|
|
2
|
+
# button. No class props: pass a `variant` + your action, put the label/icon in the slot.
|
|
3
|
+
# Btn(variant: "default", onClick: save) { Span "Save" }
|
|
4
|
+
# Btn(variant: "outline", onClick: cancel) { Icon "lucide:x" class("size-4") Span "Cancel" }
|
|
5
|
+
# variant: default | secondary | outline | ghost | destructive | link. For a link that looks like a button use
|
|
6
|
+
# `Link "..." -> "/path" class("btn btn-default")`; for sizes add btn-sm|btn-lg on the primitive.
|
|
7
|
+
# shadcn-for-muten · part · no deps · wraps the Button primitive + the .btn recipe.
|
|
8
|
+
part Btn(variant: text, onClick: action) { Button -> $onClick class("btn btn-{$variant}") { slot } }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# FeatureRows - a divided list of numbered feature/schedule rows, each with its own side gutters so the index
|
|
2
|
+
# never kisses the edge. A FeatureRow is a 12-col grid (index · title · copy); it stacks on mobile.
|
|
3
|
+
# FeatureRows {
|
|
4
|
+
# FeatureRow { Span "01" class("col-span-1") Title "One command" h3 class("col-span-4") Text "..." class("col-span-7") }
|
|
5
|
+
# }
|
|
6
|
+
# shadcn-for-muten · block · no deps · uses .feature-rows / .feature-row from globals.css.
|
|
7
|
+
part FeatureRows() { Stack class("feature-rows") { slot } }
|
|
8
|
+
part FeatureRow() { Stack class("feature-row") { slot } }
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# InputGroup - an input with a leading icon / addon in one bordered field:
|
|
2
|
+
# InputGroup { Icon "lucide:search" SearchField bind(q) "Search..." class("input-group-control") }
|
|
3
|
+
# shadcn-for-muten · part · no deps · uses .input-group from globals.css.
|
|
4
|
+
part InputGroup() { Stack class("input-group") { slot } }
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Input (part name Input - muten's text-input primitive is `SearchField`, so this wraps it) - a plug-and-play
|
|
2
|
+
# text input. No class props: pass a state to `value` (two-way bound) + a placeholder.
|
|
3
|
+
# state { email = "" : text }
|
|
4
|
+
# Input(value: email, placeholder: "you@example.com")
|
|
5
|
+
# For typed fields (email/number/password/date) or validation, use a `Form` over an entity instead.
|
|
6
|
+
# shadcn-for-muten · part · no deps · wraps SearchField + the .input recipe.
|
|
7
|
+
part Input(value: text, placeholder: text) { SearchField bind($value) "{$placeholder}" class("input") }
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# LinkBtn - a navigation link that looks like a button (plug-and-play, no class props). For CTAs that go to a
|
|
2
|
+
# route. Put the label/icon in the slot.
|
|
3
|
+
# LinkBtn(to: "/signup", variant: "default") { Span "Get started" }
|
|
4
|
+
# LinkBtn(to: "/docs", variant: "outline") { Span "Read the docs" Icon "lucide:arrow-right" class("size-4") }
|
|
5
|
+
# variant: default | secondary | outline | ghost | destructive | link.
|
|
6
|
+
# shadcn-for-muten · part · no deps · wraps the Link primitive + the .btn recipe.
|
|
7
|
+
part LinkBtn(to: text, variant: text) { Link -> "{$to}" class("btn btn-{$variant}") { slot } }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# NavPill - the floating glass navbar, batteries included: a sticky + padded wrapper, the glass pill, AND the
|
|
2
|
+
# scroll animation (settles + returns to rest at the top). Just drop your logo / links / CTA inside; it lays them
|
|
3
|
+
# out with space-between (logo left, the rest right).
|
|
4
|
+
# NavPill {
|
|
5
|
+
# Stack class("flex flex-row items-center gap-2") { Icon "lucide:hexagon" class("size-5 text-primary") Span "Acme" class("font-bold") }
|
|
6
|
+
# Stack class("flex flex-row items-center gap-6 text-sm text-muted-foreground max-md:hidden") { Link "Features" -> "/" class("link-underline") Link "Pricing" -> "/" class("link-underline") }
|
|
7
|
+
# Link "Get started" -> "/" class("btn btn-default btn-sm press")
|
|
8
|
+
# }
|
|
9
|
+
# shadcn-for-muten · part · no deps · uses .nav-pill + nav-scroll from globals.css.
|
|
10
|
+
part NavPill() { Stack class("sticky top-0 z-50 px-4 pt-4") { Header class("nav-pill nav-scroll mx-auto w-full max-w-5xl") { slot } } }
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Skeleton - a loading placeholder. Add the size utilities via class (paramless part, so class() works):
|
|
2
|
+
# Skeleton class("h-4 w-32") · Skeleton class("size-10 rounded-full")
|
|
3
|
+
# shadcn-for-muten · part · no deps · uses .skeleton (pulse) from globals.css.
|
|
4
|
+
part Skeleton() { Stack class("skeleton") { slot } }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# StatBand - a divided row of stats (KPIs), uniform + responsive (2-up on mobile). Each Stat holds its value in
|
|
2
|
+
# the slot (a Span, or a `Custom CountUp` for the count-up animation) plus a label:
|
|
3
|
+
# StatBand {
|
|
4
|
+
# Stat(label: "trees planted") { Custom CountUp inputs(to: "2.4M") class("stat-value") }
|
|
5
|
+
# Stat(label: "countries") { Span "58" class("stat-value") }
|
|
6
|
+
# }
|
|
7
|
+
# shadcn-for-muten · block · no deps · uses .stat-band / .stat / .stat-value / .stat-label from globals.css.
|
|
8
|
+
part StatBand() { Stack class("stat-band") { slot } }
|
|
9
|
+
part Stat(label: text) { Stack class("stat") { slot Span "{$label}" class("stat-label") } }
|
package/registry.json
CHANGED
|
@@ -545,22 +545,90 @@
|
|
|
545
545
|
"component": "CountUp",
|
|
546
546
|
"description": "Animate a formatted number (2.4M / 94% / 40ms / 99.99%) from 0 when it scrolls into view; lands on the exact target. Custom. Styled form (takes the class): `Custom CountUp inputs(to: \"2.4M\") class(\"text-4xl font-bold\")`. For stat bands + hero metrics.",
|
|
547
547
|
"deps": []
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "navpill",
|
|
551
|
+
"part": "NavPill",
|
|
552
|
+
"file": "registry/navpill.muten",
|
|
553
|
+
"description": "BLOCK: the floating glass navbar (sticky wrapper + glass pill + scroll animation baked in). Drop logo/links/CTA inside.",
|
|
554
|
+
"deps": []
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "stat-band",
|
|
558
|
+
"part": "StatBand",
|
|
559
|
+
"file": "registry/stat-band.muten",
|
|
560
|
+
"description": "BLOCK: a divided row of KPI stats. Parts: StatBand, Stat(label) - value goes in the slot (Span or Custom CountUp).",
|
|
561
|
+
"deps": []
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"name": "feature-rows",
|
|
565
|
+
"part": "FeatureRows",
|
|
566
|
+
"file": "registry/feature-rows.muten",
|
|
567
|
+
"description": "BLOCK: numbered feature/schedule rows with side gutters (12-col grid inside). Parts: FeatureRows, FeatureRow.",
|
|
568
|
+
"deps": []
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "bento",
|
|
572
|
+
"part": "BentoGallery",
|
|
573
|
+
"file": "registry/bento.muten",
|
|
574
|
+
"description": "BLOCK: fixed-row-height tiling gallery; cells pick their col-span. Parts: BentoGallery, BentoCell.",
|
|
575
|
+
"deps": []
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"name": "button-group",
|
|
579
|
+
"part": "ButtonGroup",
|
|
580
|
+
"file": "registry/button-group.muten",
|
|
581
|
+
"description": "A segmented row of buttons that share borders. Put btn-outline buttons inside.",
|
|
582
|
+
"deps": []
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"name": "input-group",
|
|
586
|
+
"part": "InputGroup",
|
|
587
|
+
"file": "registry/input-group.muten",
|
|
588
|
+
"description": "An input with a leading icon/addon in one bordered field.",
|
|
589
|
+
"deps": []
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"name": "skeleton",
|
|
593
|
+
"part": "Skeleton",
|
|
594
|
+
"file": "registry/skeleton.muten",
|
|
595
|
+
"description": "A loading placeholder (pulse). Add size via class: Skeleton class(\"h-4 w-32\").",
|
|
596
|
+
"deps": []
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"name": "kbd",
|
|
600
|
+
"part": "Kbd",
|
|
601
|
+
"file": "registry/kbd.muten",
|
|
602
|
+
"description": "A keyboard key hint. Kbd { Span \"Ctrl\" }.",
|
|
603
|
+
"deps": []
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "button",
|
|
607
|
+
"part": "Btn",
|
|
608
|
+
"file": "registry/button.muten",
|
|
609
|
+
"description": "Plug-and-play button (part Btn - Button is a primitive). `Btn(variant: \"default\", onClick: save) { Span \"Save\" }`. variant: default|secondary|outline|ghost|destructive|link.",
|
|
610
|
+
"deps": []
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"name": "input",
|
|
614
|
+
"part": "Input",
|
|
615
|
+
"file": "registry/input.muten",
|
|
616
|
+
"description": "Plug-and-play text input (part Input wraps SearchField). `Input(value: q, placeholder: \"...\")` - value is two-way bound. For typed/validated fields use a Form.",
|
|
617
|
+
"deps": []
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"name": "link-btn",
|
|
621
|
+
"part": "LinkBtn",
|
|
622
|
+
"file": "registry/link-btn.muten",
|
|
623
|
+
"description": "A navigation link styled as a button. `LinkBtn(to: \"/signup\", variant: \"default\") { Span \"Get started\" }`.",
|
|
624
|
+
"deps": []
|
|
548
625
|
}
|
|
549
626
|
],
|
|
550
627
|
"classComponents": {
|
|
551
628
|
"note": "Size/spacing-driven primitives ship as classes in globals.css (no `muten add` needed once you @import it). Style the muten primitive with these:",
|
|
552
|
-
"button": "Button \"Save\" -> save class(\"btn btn-default\") (variants: btn-default|btn-secondary|btn-outline|btn-ghost|btn-destructive|btn-link · sizes: btn-sm|btn-lg|btn-icon)",
|
|
553
|
-
"input": "SearchField bind(q) class(\"input\")",
|
|
554
629
|
"textarea": "class(\"textarea\") · label: class(\"label\") · native select: class(\"native-select\")",
|
|
555
|
-
"skeleton": "Stack class(\"skeleton h-4 w-32\") (add the size utilities)",
|
|
556
|
-
"kbd": "Span \"Ctrl\" class(\"kbd\")",
|
|
557
630
|
"typography": "Title \"Docs\" h1 class(\"prose-h1\") (prose-h1..h4 · prose-p|lead|large|small|muted|blockquote|code|list)",
|
|
558
|
-
"
|
|
559
|
-
"input-group": "Stack class(\"input-group\") { Icon \"lucide:search\" SearchField bind(q) class(\"input-group-control\") }",
|
|
560
|
-
"nav-pill": "Header class(\"nav-pill\") - the floating glass navbar; wrap in Stack class(\"sticky top-0 z-50 px-4 pt-4\"). Add `nav-scroll` so it settles + deepens its shadow on scroll and returns to rest at the top.",
|
|
561
|
-
"feature-rows": "Stack class(\"feature-rows\") { Stack class(\"feature-row\") { Span \"01\" ... } } - numbered feature/schedule rows with baked side gutters (grid-cols-12 inside, stacks on mobile).",
|
|
562
|
-
"bento-gallery": "Stack class(\"bento-gallery\") { Stack class(\"bento-cell col-span-4\") {} Stack class(\"bento-cell col-span-2\") {} } - a fixed-row-height tiling gallery; children pick their col-span so every row lines up.",
|
|
563
|
-
"logo-cloud": "LogoCloud { LogoCloudItem { Span \"Acme\" } LogoCloudItem { Icon \"lucide:hexagon\" Span \"Northwind\" } } - a 'trusted by' strip, muted+grayscale until hover; accepts any logo type (image / icon / wordmark).",
|
|
631
|
+
"table": "DataTable @rows columns(name, email, status) - STYLED BY DEFAULT (no class needed). `class(\"data-table\")` still works as an explicit alias. Raw cells; for badge/formatted cells build with each + Stack.",
|
|
564
632
|
"motion": "Page animations, all CSS + reduced-motion safe. Entrance: animate-fade-up|fade-in|scale-in|slide-in (+ d1..d6 stagger). Scroll: reveal|reveal-left|reveal-scale, and nav-scroll on a navbar. Hover/press: hover-lift, hover-glow, arrow-hover (nudges a trailing Icon), link-underline, press, float."
|
|
565
633
|
}
|
|
566
634
|
}
|