Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/input-group-label-margin-reset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/kumo": patch
---

Fix `InputGroup` label wrappers to enforce `mb-0`, preventing inherited label margins from shifting layout and click-target overlays.
6 changes: 3 additions & 3 deletions packages/kumo/src/components/input-group/input-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const Root = forwardRef<
<label
htmlFor={inputId}
// Positioned behind children (z-0) so it catches clicks on empty space
className="absolute inset-0 z-0 cursor-text"
className="absolute inset-0 z-0 cursor-text !mb-0"
aria-hidden="true"
/>
)}
Expand Down Expand Up @@ -283,7 +283,7 @@ const Root = forwardRef<
<label
htmlFor={inputId}
// Positioned behind children (z-0) so it catches clicks on empty space
className="absolute inset-0 z-0"
className="absolute inset-0 z-0 !mb-0"
aria-hidden="true"
/>
{children}
Expand All @@ -293,7 +293,7 @@ const Root = forwardRef<
<label
ref={forwardedRef as React.Ref<HTMLLabelElement>}
{...dataProps}
className={containerClassName}
className={cn(containerClassName, "!mb-0")}
{...rest}
>
{children}
Expand Down
Loading