InputStyleOptions

The InputStyleOptions type lets you style the three visual parts of an Input component independently — the input field itself, the label, and the border.

Type Definition

  • input: A StyleOptions object applied to the text inside the input field.
  • label: A StyleOptions object applied to the label text.
  • border: A StyleOptions object applied to the border surrounding the input.
type InputStyleOptions = {
  input?: StyleOptions;
  label?: StyleOptions;
  border?: StyleOptions;
}

Usage

import { Input } from "ts-better-console";

const input = new Input({
label: "Username",
styles: {
input: { color: "white" },
label: { color: "cyan", styles: ["bold"] },
border: { color: "green" },
},
});

Want to support this project?

If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.

Want to contribute to this project?

Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!