Actions

Button.

A considered starting point for every action.

Live preview

Live preview
Made for your next bright idea.
tsx
import { Button } from "luminescent";
import "luminescent/style.css";


export function Example() {
  return <Button startIcon={<span>+</span>}>Create project</Button>;
}

Installation

bash
npm install luminescent

Import luminescent/style.css once at your application root. The example above uses the same package implementation as Storybook.

Variants and states

Use the preview controls to explore the supported variants, sizes, disabled/loading states and reduced motion. Controls appear only where the component exposes the corresponding prop. Theme and glow apply to every component.

API reference

Generated from the source TypeScript interfaces. Native attributes, className, style, aria-* and data-* also pass through to the documented element. Import ButtonProps from the package for the full inherited contract.

PropTypeDetails
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive'Optional unless marked required.
size'sm' | 'md' | 'lg'Optional unless marked required.
childrenrequiredReact.ReactNodeOptional unless marked required.
loadingbooleanOptional unless marked required.
loadingLabelstringOptional unless marked required.
startIconReact.ReactNodeOptional unless marked required.
endIconReact.ReactNodeOptional unless marked required.
glowColorGlowColorOptional unless marked required.
glowGlowIntensityOptional unless marked required.

Accessibility and keyboard

Native button: Enter and Space activate. Default type is button; set type="submit" for forms. Loading disables activation and exposes aria-busy. Icon-only buttons need an aria-label.

Keep labels meaningful and test application-level contrast, focus order and screen-reader output. See the accessibility guide for composition requirements.

Theme customization

tsx
import { LuminescentProvider, Button } from "luminescent";
import "luminescent/style.css";


export function Example() {
  return (
    <LuminescentProvider theme="light" accent="violet" glow="subtle">
      <Button startIcon={<span>+</span>}>Create project</Button>
    </LuminescentProvider>
  );
}

Switch between light and dark in the preview, or open the playground for a larger workspace. Custom CSS variables can override spacing, color, typography and effects.

Related components