0.0.6 • Published 8 months ago

@licuido-ui/ui_basic-button v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Button

Buttons are used as triggers for actions. They are used in forms, toolbars, dialog footers and as stand-alone action triggers.

Author

Link

Story Book Link Button

PlayGround

Try it have a fun codeBox

Installation

npm i @licuido-ui/ui_basic-button

Import component

import { BasicButton } from '@licuido-ui/ui_basic-button';

Usage

<BasicButton>button</BasicButton>

Image

alt text

Sample Code

<BasicButton
  id={''}
  type={'button'}
  name={''}
  onClick={undefined}
  inLineStyles={{}}
  size={'medium'}
  variant={'contained'}
  color={'primary'}
  children={null}
  className={'button'}
  disabled={false}
  href={''}
>
  button
</BasicButton>

Props

NameDescriptionDefaultControl
idThis id unique and Used to run BDD test , Its also applied for "data-testid"-string
childrenThe content of the component.ReactNode-"button"
classNamestring"button"Set string
classesOverride or extend the styles applied to the component.Partial<ButtonBaseClasses> & Partial<ClassNameMap<never>>-Set object
labelstring-Set string
idstring""Set string
tabIndexnumber0Set number
color"inherit""primary""secondary""success""error""info""warning""primary"Choose option...inheritprimarysecondarysuccesserrorinfowarning
onClickMouseEventHandler<HTMLButtonElement>-Function
actionA ref for imperative actions.Set object
centerRippleIf true, the ripples are centered.
They won't start at the cursor interaction position.booleanfalseSet boolean
disabledIf true, the component is disabled.booleanfalseSet boolean
disableRippleIf true, the ripple effect is disabled.Without a ripple there is no styling for :focus-visible by default. Be sureSet boolean
disableTouchRippleIf true, the touch ripple effect is disabled.booleanfalseSet boolean
focusRippleIf true, the base button will have a keyboard focus ripple.booleanfalseSet boolean
focusVisibleClassNameThis prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It's a polyfill for the CSS :focus-visible selector. The rationale for using this feature is explained here. A polyfill can be used to apply a focus-visible class to other components. if needed.string-Set string
LinkComponentThe component used to render a link when the href prop is provided.ElementType<any>'a'Set object
onFocusVisibleCallback fired when the component is focused with a keyboard.Function
sxThe system prop that allows defining system overrides as well as additional CSS styles.SxProps<Theme>-Set object
TouchRipplePropsProps applied to the TouchRipple element.Partial<TouchRippleProps>-Set object
touchRippleRefA ref that points to the TouchRipple element.Ref<TouchRippleActions>-Set object
namestring""Set string
type"button""submit""reset""button"buttonsubmitreset
inLineStylesCSSProperties{ }Set object
size"small""medium""large""medium"smallmediumlarge
variant"text""outlined""contained""contained"textoutlinedcontained
hrefstring""Set string
startIconReactNode-Set object
endIconReactNode-Set object
componentstring-Set string
rootSxSxProps<{}>-Set object