Skip to content

fix(button): Update button styles to align with Figma#53

Open
CiscoFran10 wants to merge 1 commit intocloudflare:mainfrom
CiscoFran10:fix/button-variants-styles
Open

fix(button): Update button styles to align with Figma#53
CiscoFran10 wants to merge 1 commit intocloudflare:mainfrom
CiscoFran10:fix/button-variants-styles

Conversation

@CiscoFran10
Copy link

@CiscoFran10 CiscoFran10 commented Feb 9, 2026

Summary

Updates the Button component to use unified state selectors (not-disabled, data-pressed), updates the focus ring, and extends the component registry to support data-pressed extraction.

image image

Changes

  • Adjusted Button variant and size styles to match Figma (primary, secondary, ghost, destructive, outline, secondary-destructive).
  • Refined focus, hover, and disabled styles using Kumo semantic tokens.
  • Focus ring: focus-visible:ring-1 ring-kumo-ringfocus-visible:ring-2 ring-kumo-brand.
  • Compact size: Icon sizing via [&_svg:not([class*='size-'])]:size-* for xs/sm/base/lg.
  • utils: extractStateClasses() now parses data-[pressed]: and populates stateClasses for registry output.

Closes: #35

- Use not-disabled and data-pressed for hover/focus/pressed states
- Focus ring: ring-2 ring-kumo-brand (was ring-1 ring-kumo-ring)
- Add compactSize icon sizing for SVG children
- Add data-pressed extraction in component-registry utils
- Regenerate component registry (Button variants and colors)
outline: {
classes: "bg-kumo-base text-kumo-default ring ring-kumo-line",
classes:
"bg-kumo-base text-kumo-default ring ring-kumo-line not-disabled:[:hover,[data-pressed]]:bg-kumo-control data-[state=open]:bg-kumo-control",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In light mode, the kumo-control and kumo-base colors are identical, which makes the hover state visually indistinguishable. This likely needs an update to the light-mode Figma styles. Waiting for maintainer guidance before proceeding.

return cn(
// Base styles
"group flex w-max shrink-0 items-center font-medium select-none",
"group flex w-max shrink-0 items-center font-medium select-none [&_svg]:shrink-0 [&_svg]:-mx-0.5",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[&_svg]:-mx-0.5

Minor optical alignment adjustment for SVG icons next to text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Button variants missing hover styles and using non-semantic color tokens

1 participant