Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

987 B
Raw Blame
/* Copyright 2026 Marimo. All rights reserved. */
import type { VariantProps } from "class-variance-authority";
import clsx from "clsx";
import React from "react";
import * as styles from "./Inputs.styles";

type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
  VariantProps<typeof styles.button>;

export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
  ({ color, shape, size, className, ...props }, ref) => {
    return (
      <button
        ref={ref}
        className={clsx(styles.button({ color, shape, size }), className)}
        {...props}
      >
        {props.children}
      </button>
    );
  },
);
Button.displayName = "Button";

type InputProps = React.HtmlHTMLAttributes<HTMLInputElement>;

export const Input = React.forwardRef<HTMLInputElement, InputProps>(
  ({ className, ...props }, ref) => {
    return (
      <input ref={ref} className={clsx(styles.input(), className)} {...props} />
    );
  },
);
Input.displayName = "Input";