Foundation
Main View
Components
Charts
Dialogs
Framer Animations
Forms
Grids
Typography
Tools
Package: @uireact/button
An actionable element, commonly used in forms
1. Make sure you install peer dependencies first:
2. Install package:
npm i -S @uireact/button
We have 3 different button levels
These buttons already have and uses a cohesive styling that helps improve the user experience and give clarity of their respective level.
<UiPrimaryButton> Primary button </UiPrimaryButton>
<UiFlexGrid alignItems="center" gap="four"> <UiSecondaryButton> Secondary button </UiSecondaryButton> <UiSecondaryButton icon> <UiIcon icon="UserSettings" category="secondary" /> </UiSecondaryButton> </UiFlexGrid>
<UiFlexGrid alignItems="center" gap="four"> <UiTertiaryButton> Tertiary button </UiTertiaryButton> <UiTertiaryButton rounded size="large"> Button </UiTertiaryButton> </UiFlexGrid>
This is simulating a disabled button that is waiting on a triggered action:
<UiPrimaryButton disabled> <UiIcon icon="LoadingSpinner" category="secondary" weight="200" /> </UiPrimaryButton>
The UiButton allows for customization of the styling and colorations, this component can be used to create your own level components in your applications:
<UiGrid cols={{ small: 1, medium: 5, large: 7, xlarge: 7 }} colsGap="three" rowsGap="three" justifyItems="center"> <UiButton fullWidth> Button! 🐬 </UiButton> <UiButton fullWidth category="secondary"> Button! 🐉 </UiButton> <UiButton fullWidth category="tertiary"> Button! 🌹 </UiButton> <UiButton fullWidth category="positive"> Button! 🌎 </UiButton> <UiButton fullWidth category="negative" disabled> Button! 🌈 </UiButton> <UiButton fullWidth category="error"> Button! ⚡️ </UiButton> <UiButton fullWidth category="warning"> Button! 🌋 </UiButton> </UiGrid>
These are options available to the different button components to customize their fit and finish to your use cases:
<UiGrid cols={2} rows={1} colsGap='four' justifyItems="center"> <UiButton fullWidth> Button! 💅🏾 </UiButton> <UiButton fullWidth category="tertiary"> Button! 💅🏾 </UiButton> </UiGrid>
<form> <UiButton category="secondary" type="submit"> Button! 💅🏾 </UiButton> </form>
<UiCard weight="200" category="positive"> <UiFlexGrid gap="three" alignItems="center"> <UiButton rounded> <UiText>Button 🌜</UiText> </UiButton> <UiButton rounded styling="outlined" category="secondary"> <UiText>Button 🍻</UiText> </UiButton> <UiButton rounded styling="clear" category="tertiary"> <UiText>Button 📡</UiText> </UiButton> </UiFlexGrid> </UiCard>
<UiCard category="primary"> <UiFlexGrid gap="three" alignItems="center"> <UiButton category="tertiary" styling="clear"> <UiText> Button! ✨ </UiText> </UiButton> <UiText>Some content</UiText> </UiFlexGrid> </UiCard>
<UiCard weight="10"> <UiFlexGrid gap="three" alignItems="center"> <UiButton styling="icon" category="primary"> <UiIcon icon="EarthAmericas" size="xlarge" /> </UiButton> <UiButton styling="icon" category="secondary"> <UiIcon icon="EarthEuropa" size="large" /> </UiButton> <UiButton styling="icon" category="tertiary"> <UiIcon icon="EarthAsia" size="regular" /> </UiButton> <UiButton styling="icon" category="positive"> <UiIcon icon="EarthAfrica" size="small" /> </UiButton> <UiButton styling="icon" category="error"> <UiIcon icon="BadgeCheck" size="xsmall" /> </UiButton> </UiFlexGrid> </UiCard>
<UiCard category="primary" weight="10"> <UiFlexGrid gap="three"> <UiButton styling="outlined" category="tertiary"> <UiText>Button 🐼</UiText> </UiButton> <UiButton styling="outlined" category="secondary"> <UiText>Button</UiText> <UiIcon icon="Refresh" /> </UiButton> <UiButton styling="outlined" rounded category="positive"> <UiText>Button</UiText> <UiIcon icon="VideoCameraVintage" /> </UiButton> </UiFlexGrid> </UiCard>