Search
Search for a page

Button Group

A container that groups related buttons together with consistent styling.

bunx shadcn-svelte@latest add https://ui.grgurevic.click/r/button-group.json

Sizes

The default size is medium.

Variants

The default size is translucent.

Icons

Grouped buttons with icons.

Best practices

The best practices when using button groups.

  • Always use the logoButton component for children inside the group.
  • Ensure all nested buttons within the group share the same size.
  • Only group buttons that are logically related, such as view switchers or pagination.
  • Keep the button count between 2 to 5 items to prevent crowding on mobile.
  • Use the same visual variant for all buttons inside a group.
  • Clearly highlight the active button when using the group as a segmented control.

Props

The props available for the Button Group component.

PropTypeDefaultDescription
variant"prominent" | "bordered" | "secondary" | "translucent" | "ghost" | "destructive""translucent"The visual style variant of the group container.
size"xs" | "sm" | "default" | "lg""default"Tuning heights and internal child spacing gaps.
magneticbooleantrueEnables the physics-based elastic magnetic pulling effect towards the cursor.
scalebooleantrueEnables tactile spring scaling response when pressed.
specularbooleantrueEnables dynamic 3D specular highlight reflections that track cursor movement.
specularAnglenumberundefinedOptional fixed angle for the specular light reflection.
liquidGlassbooleanfalseEnables physical liquid glass refraction distortion (Chromium only).
refractiveIndexnumber1.5Index of refraction (IOR) for the glass surface curvature. Range 1.0 (air) to 2.4.
bezelWidthnumber20Depth of the glass bezel refraction boundary zone (px).
displacementScalenumber40Strength of the physical refraction displacement offset.
surfaceProfile"circle" | "squircle" | "concave" | "lip""squircle"3D bezel outline profile contour style.
chromaticAberrationbooleanfalseEnables realistic RGB channel prism splitting refraction at bezel edges.
saturationBoostnumber1.3Color saturation boost multiplier inside refracted zone.
backgroundBlurnumber0.3Pre-blur factor applied to background to hide SVG rendering artifacts.
Previous Button
Give feedback
Next Card