Skip to content

Button

Button

Modified button component (type=button by default), it can do loading and add Addons to itself 💪

jsx
import Button from 'intergalactic/button';
<Button />;
import Button from 'intergalactic/button';
<Button />;

ButtonProps

& & & {...}
NameTypeDescription
use"primary" | "secondary" | "tertiary"Button type
theme"info" | "success" | "warning" | "danger" | "muted" | "invert"Button theme
activebooleanButton activity state
sizeButton size
disabledbooleanDisabled button state
loadingbooleanLoading button state
addonLeftReact.ElementTypeTag for the left Addon
addonRightReact.ElementTypeTag for the right Addon

Button.Addon

The addon is inside the button (most often it is an icon), it sets the correct margins depending on the size. It takes all properties of the Box.

jsx
import Button from 'intergalactic/button';
<Button.Addon />;
import Button from 'intergalactic/button';
<Button.Addon />;

Button.Text

Plain text, it sets the correct margins depending on the button size. If the button uses just text without addons, it will automatically turn into the Button.Text. It takes all properties of the Box.

jsx
import Button from 'intergalactic/button';
<Button.Text />;
import Button from 'intergalactic/button';
<Button.Text />;

Released under the MIT License.

Released under the MIT License.