6-8 Sports6-8UI Framework

Components / Actions

Buttons

Every call to action in the broadcast. Condensed uppercase type, a real bevel-and-glow for depth, a hover that lifts and a press that seats. Seven intents, five sizes, plus a square IconButton and a segmented ButtonGroup — all built on one cva recipe.

6-8 UI

Variants

Seven intents mapped to the brand. Teal leads, yellow marks live and high-priority actions, and the rest recede so the primary read stays clear.

Primary
Secondary
Outline
Ghost
Glass
Danger
Link

6-8 UI

Sizes

Five steps from xs to lg, plus a square icon size. Height, padding, type scale, and glyph size move together so density stays balanced.

Primary scale
Outline scale

6-8 UI

States

Hover lifts with a deeper glow; active seats the chip down. Disabled dims and drops interaction, and loading swaps in a spinner while it works.

Hover / active
Hover to lift, press to seat.
Disabled
Loading

6-8 UI

Icons

Pass leftIcon or rightIcon on any Button, or reach for a square IconButton when the glyph is the whole story. IconButtons require an aria-label so the control still has a name.

Leading + trailing
Icon-only Button
IconButton variants
IconButton sizes
IconButton loading

6-8 UI

Button group

A segmented control with exactly one active choice. The active pill is teal and slides between segments on select, so a switch reads as one continuous motion.

View switcher
Period (sm)
Stat (lg)

6-8 UI

API

Props for each component. Button and IconButton spread native button attributes; ButtonGroup spreads native div attributes.

Copy
import { Button } from "@/components/ui/button";

<Button variant="primary" size="md" leftIcon={<Play />}>
  Start game
</Button>

<Button variant="outline" loading>Syncing</Button>

Button

PropTypeDefaultDescription
variant"primary" | "secondary" | "outline" | "ghost" | "glass" | "danger" | "link""primary"Visual intent.
size"xs" | "sm" | "md" | "lg" | "icon""md"Height, padding, and type scale. icon is a square footprint.
leftIconReactNodeIcon rendered before the label.
rightIconReactNodeIcon rendered after the label.
loadingbooleanfalseSwaps in a spinner, disables the button, and sets aria-busy.
asChildbooleanfalseRender the child element as the button via Radix Slot.
...propsButtonHTMLAttributesAll native button attributes (onClick, type, disabled…).

IconButton

PropTypeDefaultDescription
aria-labelstringRequired — names the control for assistive tech.
iconReactNodeThe glyph to render (a lucide icon).
variantsame as Button"primary"Shares Button's full variant palette.
size"xs" | "sm" | "md" | "lg""md"Square footprint.
loadingbooleanfalseSwaps the glyph for a spinner and disables the button.
asChildbooleanfalseRender the child element as the button via Radix Slot.

ButtonGroup

PropTypeDefaultDescription
items{ value; label; icon?; disabled? }[]The segments, left to right.
valuestringControlled active value.
defaultValuestringitems[0].valueUncontrolled initial active value.
onValueChange(value: string) => voidFires when a segment is selected.
size"sm" | "md" | "lg""md"Track and segment scale.
aria-labelstringRequired — names the group for assistive tech.