MVP Verson: 0.8.3 beta
Lang Icon
Toggle Icon
Button
The Button component is used to trigger an action or event, such as submitting a form, opening a
dialog, canceling an action, or performing a delete operation.
Default
PreviewCode
Success
PreviewCode
Danger
PreviewCode
Transparent
PreviewCode
Material
PreviewCode
Neumorphism
PreviewCode
Diasbled
PreviewCode
Loading
PreviewCode
Usage
Basic Loading
loading={true}
loading="light"
loading="dark"
Array Format Loading

Use array format [showLoading, type] for dynamic control

loading={[true, "dark"]}
loading={[true, "light"]}
Loading States Reference
ValueTypeColorDescription
trueBooleanDarkDefault dark loading spinner
"light"StringLightLight theme (Dark color loading spinner)
"dark"StringDarkDark theme (Light color loading spinner)
[true, "dark"]ArrayDarkArray format with dark spinner
[true, "light"]ArrayLightArray format with light spinner
[false, "dark"]Array-Loading disabled
Important Notes:
  • • When loading=true, it defaults to dark spinner
  • • Array format is useful for dynamic state control: [isLoading, "dark"] (useState)
  • • The first element in array controls visibility (boolean)
  • • The second element in array controls spinner type ("light" or "dark")
  • • If second element is omitted or invalid, defaults to "light"
Icon
PreviewCode
Usage
Basic Icon Usage
icon="/setting.png"
icon={<FiSettings />}
icon={FiSettings}
icon={<FiSearch />}(Icon-only button)
Icon with Loading State
icon={<FiUpload />}
loading={[true, "dark"]}
Note:

When loading is active, the icon will be replaced by the loading spinner.

Supported Icon Types
TypeFormatExampleDescription
StringImage path"/icons/user.png"Renders as <img> tag
React ElementJSX<FiHome />Cloned with additional props
React ComponentComponent referenceFiHomeRendered as component
Real-world Examples
Social Login Button:
icon="/google.png"
type="default"
Important Notes:
  • • Icon size is automatically adjusted based on button size
  • • Custom styles on icon elements are preserved and merged
  • • When loading is active, icon is replaced by loading spinner
  • • For React elements, className and style props are intelligently merged
  • • All icon types automatically get the .btn-icon CSS class
Props
Universal Props
PropTypeAccepted ValuesDescriptionDefaultVersion
typestringdefault | transparent | danger | successSpecifies the button style. Supports four predefined types. Custom styles can be applied via the "sx" prop.default-
sizestringsmall | medium | large | hugeSpecifies the button size. Supports four preset sizes. Custom sizes can be defined using the "sx" prop.medium-
sxobjectobjectInline styles for customizing the button appearance. Note: Inline styles defined via the "style" prop take precedence over "sx".{}-
disabledbooleantrue | falseDisables the button if set to true.false-
outlinebooleantrue | falseApplies an outline style to the button.false-
enubooleantrue | falseApplies neumorphic styling when enabled.false0.3.0
onClick(event: React.MouseEvent<HTMLElement, MouseEvent>) => void-Callback function triggered when the button is clicked.--
classNamestring-Custom CSS class name(s) applied to the button.--
loadingbooleantrue | falseIndicates that the button is loading.true0.6.0
iconobjectobjectIcon to display in the button.-0.6.0
iconPositionstringleft | rightPosition of the icon within the button.left0.6.0
RippleColorstringrgba|rgb|#hexcustomize the color of the ripple effect.rgba(255, 255, 255, 0.6)0.8.3