diff --git a/docs/ai/context/ui-components.md b/docs/ai/context/ui-components.md index 072481e8b..ae924f957 100644 --- a/docs/ai/context/ui-components.md +++ b/docs/ai/context/ui-components.md @@ -114,11 +114,15 @@ surface, border, shape, or color styling. | `label` | `string?` | — | Button text | | `disabled` | `boolean?` | `false` | Disabled state | | `loading` | `boolean?` | `false` | Loading state | -| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size | +| `size` | `'sm' \| 'md' \| 'lg' \| 'unset'` | `'md'` | Preset size; `unset` leaves sizing to the caller | | `block` | `boolean?` | `false` | Full width | **Slots**: `default` (fallback when no `label`) +`size="unset"` omits the preset padding and text-size classes in `BasicButton`, +`Button`, and `GhostButton`. Callers must supply any required sizing, including +fixed dimensions for circular buttons. + ### Button Solid general-purpose action. It has no border and shows offset outlines on diff --git a/packages/ui/src/components/misc/button.vue b/packages/ui/src/components/misc/button.vue index 35939ece4..d24d3125c 100644 --- a/packages/ui/src/components/misc/button.vue +++ b/packages/ui/src/components/misc/button.vue @@ -24,6 +24,7 @@ const circleSizeClasses: Record = { sm: 'h-8 w-8', md: 'h-10 w-10', lg: 'h-12 w-12', + unset: '', } const colorClasses: Record> = { diff --git a/packages/ui/src/components/misc/ghost-button.vue b/packages/ui/src/components/misc/ghost-button.vue index a2695e351..abcbfe339 100644 --- a/packages/ui/src/components/misc/ghost-button.vue +++ b/packages/ui/src/components/misc/ghost-button.vue @@ -19,6 +19,7 @@ const sizeClasses: Record = { sm: 'min-h-7 px-2! py-1! text-xs', md: 'min-h-8 px-3! py-1.5! text-sm', lg: 'min-h-10 px-4! py-2! text-base', + unset: '', } const basicProps = computed(() => ({