Browse components

Button

import Button from "@shpaw415/mui-lite/Button";
import { ButtonGroup } from "@shpaw415/mui-lite/Button";

Why use it

Use Button for the main call-to-action in a view: submit, confirm, navigate, or trigger a primary workflow. Prefer it over raw <button> when you need Material variants (contained / outlined / text), theme colors, sizes, ripple, and consistent focus styles without writing CSS.

  • contained — primary actions (save, send)
  • outlined — secondary actions that still need emphasis
  • text — low-emphasis actions (cancel, learn more)
  • ButtonGroup — related actions that should share size/variant

Demo

Variants
Colors
Sizes
ButtonGroup

Example

import Button, { ButtonGroup } from "@shpaw415/mui-lite/Button";
 
export function Actions() {
  return (
    <>
      <Button variant="contained" color="primary" onClick={save}>
        Save
      </Button>
      <Button variant="outlined" onClick={cancel}>
        Cancel
      </Button>
      <ButtonGroup variant="outlined">
        <Button>Left</Button>
        <Button>Center</Button>
        <Button>Right</Button>
      </ButtonGroup>
    </>
  );
}

Props

PropTypeDefault
variantcontained | outlined | textcontained
colorprimary | secondary | error | warning | success
sizesmall | medium | large
fullWidthbooleanfalse
disableRipplebooleanfalse
startIcon / endIconReactNode
hrefstring
sxSxProps