alexander-rukin

Button Group

Buttons

About

A set of buttons fused edge-to-edge into one segmented control, usable either as a single-choice radio-style switch or as a wrapper that joins existing buttons into one toolbar.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Button Group to your project and fits it to your theme.

Code

How Button Group is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import ButtonGroup from "@/components/ui/button-group";
import { Icon } from "@/components/ui/button-group-utils/icon";

const btn = {
  display: "inline-flex",
  alignItems: "center",
  gap: 6,
  padding: "10px 16px",
  fontSize: 14,
  fontWeight: 600,
  fontFamily: "inherit",
  border: "1.5px solid var(--border)",
  background: "var(--card)",
  color: "var(--foreground)",
  cursor: "pointer",
};

export default function ButtonGroupWrapperDemo() {
  return (
    <div
      style={{
        display: "flex",
        alignItems: "center",
        justifyContent: "center",
        minHeight: 240,
        width: "100%",
        background: "var(--background)",
        color: "var(--foreground)",
      }}
    >
      <ButtonGroup>
        <button type="button" style={btn}>
          <Icon name="chevron-left" size={16} />
          Back
        </button>
        <button type="button" style={btn}>
          Forward
          <Icon name="chevron-right" size={16} />
        </button>
      </ButtonGroup>
    </div>
  );
}

More by alexander-rukin

View all
  • Carousel

    Carousel

    16
  • Filter Chip

    Filter Chip

    1
  • Combobox

    Combobox

  • Textarea

    Textarea

  • Tooltip

    Tooltip

  • Card

    Card

  • Range Slider

    Range Slider

  • Progress

    Progress

More in Buttons

View all
  • Button Group

    Button Group

    4
  • Button

    Button

    20
  • Texture Button

    Texture Button

    111
  • Button

    Button

    4
  • Hero Button

    Hero Button

    23
  • Button

    Button

    143
  • Astryx Chat Send Button

    Astryx Chat Send Button

    5
  • Button Group

    Button Group