Sstepkit
foundations · Original · MIT

Button

A confident action primitive with solid, soft, outline, ghost, and danger states.

Live preview

Adjust a setting to update the preview and usage code together.

Usage & source

import type { CSSProperties } from "react";
import { Button } from "./components/stepkit/Button";
import "./components/stepkit/styles.css";

const themeStyle = {"--stepkit-bg":"#f7f7f8","--stepkit-surface":"#ffffff","--stepkit-surface-muted":"#f0f0f3","--stepkit-fg":"#17181c","--stepkit-muted":"#626572","--stepkit-border":"#e3e4e9","--stepkit-border-strong":"#c8cad3","--stepkit-code":"#f1f1f4","--stepkit-shadow":"0 20px 60px rgba(31, 26, 64, .10)","--stepkit-accent":"#6950df","--stepkit-accent-strong":"#5137c7","--stepkit-accent-soft":"#eeeafd","--stepkit-accent-on-soft":"#5137c7","--stepkit-accent-text":"#ffffff","--stepkit-error":"#b43145","--stepkit-placeholder":"#626572","--stepkit-radius":"16px","--stepkit-space":"16px","--stepkit-control-height":"44px","--stepkit-font-sans":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif"} as CSSProperties;

export default function Example() {
  return (
    <div className="stepkit-theme" data-stepkit-preset="modern" style={themeStyle}>
      <Button
      variant={"solid"}
      size={"md"}
      label={"Continue"}
      loading={false}
      />
    </div>
  );
}

Dependencies

[email protected]
[email protected]

Install

Use the released registry entry or download the complete archive.

npx [email protected] add https://vstepanov.com/stepkit/r/button.json

Integration prompt

Install Stepkit Button 0.2.0 from the registry and preserve the included MIT notice.
npx [email protected] add https://vstepanov.com/stepkit/v0.2.0/r/button.json
Install the tested runtime dependencies exactly: npm install [email protected] [email protected]
Keep the component source, shared styles, NOTICE.md, and provenance files together. Apply the theme tokens on a wrapper rather than passing theme keys as component props.

Usage:
```tsx
import type { CSSProperties } from "react";
import { Button } from "./components/stepkit/Button";
import "./components/stepkit/styles.css";

const themeStyle = {"--stepkit-bg":"#f7f7f8","--stepkit-surface":"#ffffff","--stepkit-surface-muted":"#f0f0f3","--stepkit-fg":"#17181c","--stepkit-muted":"#626572","--stepkit-border":"#e3e4e9","--stepkit-border-strong":"#c8cad3","--stepkit-code":"#f1f1f4","--stepkit-shadow":"0 20px 60px rgba(31, 26, 64, .10)","--stepkit-accent":"#6950df","--stepkit-accent-strong":"#5137c7","--stepkit-accent-soft":"#eeeafd","--stepkit-accent-on-soft":"#5137c7","--stepkit-accent-text":"#ffffff","--stepkit-error":"#b43145","--stepkit-placeholder":"#626572","--stepkit-radius":"16px","--stepkit-space":"16px","--stepkit-control-height":"44px","--stepkit-font-sans":"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif"} as CSSProperties;

export default function Example() {
  return (
    <div className="stepkit-theme" data-stepkit-preset="modern" style={themeStyle}>
      <Button
      variant={"solid"}
      size={"md"}
      label={"Continue"}
      loading={false}
      />
    </div>
  );
}
```

Selected bounded settings: {"variant":"solid","size":"md","label":"Continue","loading":false}.
Selected theme: {"mode":"light","accent":"violet","radius":"soft","density":"comfortable","preset":"modern"}.

Props

NameTypeDefaultDescription
variant"solid" | "outline" | "ghost" | "soft" | "danger""solid"Controls the action's visual weight.
size"sm" | "md" | "lg""md"Sets control height and padding.
loadingbooleanfalseShows a bounded loading state.
disabledbooleanfalsePrevents interaction.

Accessibility & limits

  • Uses a native button with an explicit type.
  • Loading and disabled states are communicated to assistive technology.
  • The shared focus-visible rule remains visible in every theme.

Limitations

  • The component does not manage async state; pass loading from the consuming app.

Provenance

Original source under the MIT licence.

Original Stepkit implementation.

Required notices: NOTICE.md, PROVENANCE-stepkit-button.md

  • 2 source files in the release
  • Version 0.2.0