3.0.4 • Published 3 years ago

vbocxjs v3.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Create banners, badges, toasts and more with speed.

vbocxjs is a ReactJS library for creating banners, badges, toasts and more with zero dependencies. It uses inline styling by reducing the amount of look up time for the CSS engine.

Getting Started!

Install vbocxjs

$ npm install vbocxjs
or
$ yarn add vbocxjs

Badges

Default Badge
import { Badge } from "vbocxjs";

<Badge
    type="solid"
    variant="default"
    message="solid"
/>

<Badge
    type="outline"
    variant="default"
    message="outline"
/>
Info Badge
import { Badge } from "vbocxjs";

<Badge
    type="solid"
    variant="info"
    message="solid"
/>

<Badge
    type="outline"
    variant="info"
    message="outline"
/>
Success Badge
import { Badge } from "vbocxjs";

<Badge
    type="solid"
    variant="success"
    message="solid"
/>

<Badge
    type="outline"
    variant="success"
    message="outline"
/>
Warning Badge
import { Badge } from "vbocxjs";

<Badge
    type="solid"
    variant="warning"
    message="solid"
/>

<Badge
    type="outline"
    variant="warning"
    message="outline"
/>
Error Badge
import { Badge } from "vbocxjs";

<Badge
    type="solid"
    variant="error"
    message="solid"
/>

<Badge
    type="outline"
    variant="error"
    message="outline"
/>
Custom Badge
import { CustomBadge, Colors } from "vbocxjs";

<CustomBadge
    type="solid"
    message="solid"
    backgroundColor={Colors["purple-400"]}
    color="#FFFFFF"
/>

<CustomBadge
    type="outline"
    message="outline"
    color={Colors["orange-400"]}
/>

Props

Badges Props
NameTypeMandatoryDescription
typesolid, outlineyesDisplay type of the badge.
variantdefault, info, success, warning, erroryesThe variant of the badge style to use.
messagestringyesMessage to be displayed.
Custom Badge Props
NameTypeMandatoryDescription
typesolid, outlineyesDisplay type of the badge.
messagestringyesMessage to be displayed.
backgroundColorstring, Colors[value]yes(solid), no(outline)Background color of badge.
colorstring, Colors[value]yesFont Color of Badge.

Banners

Default Banner
import { Banner } from "vbocxjs";

<Banner
 variant="default"
  message="This is a Default Banner."
/>
Info Banner
import { Banner } from "vbocxjs";

<Banner
 variant="info"
 message="This is an Info Banner."
/>
Success Banner
import { Banner } from "vbocxjs";

<Banner
 variant="success"
 message="This is a Success Banner."
/>
Warning Banner
import { Banner } from "vbocxjs";

<Banner
 variant="warning"
 message="This is a Warning Banner."
/>
Error Banner
import { Banner } from "vbocxjs";

<Banner
 variant="error"
 message="This is an Error Banner."
/>
Custom Banner
import { CustomBanner, Colors } from "vbocxjs";

<CustomBanner
 message="This is a Custom Banner."
 backgroundColor={Colors["pink-600"]}
 color="#FFFFFF"
 bannerIcon={<i className="fa fa-heart" aria-hidden="true"></i>}
 closeIcon={<i className="fa fa-times" aria-hidden="true"></i>}
/>

Props

Banner Props
NameTypeMandatoryDescription
variantdefault, info, success, warning, erroryesThe variant of the banner style to use.
positiontop, middle, bottom, XX%noPopup out position of the banner.
messagestringyesMessage to be displayed.
timernumbernoDisplay time of banner in milliseconds.
animatefade-in-out, zoom-in-out, stretch-in-outnoPopup out animation of the banner.
Custom Banner Props
NameTypeMandatoryDescription
positiontop, middle, bottom, XX%noPopup out position of the banner.
messagestringyesMessage to be displayed.
backgroundColorstring, Colors[<value>]yesBackground Color of banner.
colorstring, Colors[<value>]yesText Color of banner.
bannerIconJSX.Element, Font Awesome IconsnoIcon indicating banner type.
closeIconJSX.Element, Font Awesome IconsnoIcon replacing default close icon.
timernumbernoDisplay time of banner in milliseconds.
animatefade-in-out, zoom-in-out, stretch-in-outnoPopup out animation of the banner.

Progress

Donut
import { Donut, Colors } from "vbocxjs";

<Donut
    size={80}
    percent={69}
    theme={[Colors["pink-500"], "#000000", Colors["gray-50"]]}
/>

<Donut
    size={100}
    percent={32}
    theme={[Colors["blue-500"], "#000000", Colors["gray-50"]]}
    hidePercentText={true}
/>

<Donut
    size={120}
    percent={54}
    theme={[Colors["green-500"], "#000000", Colors["gray-50"]]}
    curvedEdge={true}
/>

<Donut
    size={140}
    percent={80}
    gradient={["#12c2e9", "#c471ed", "", Colors["gray-50"]]}
    hidePercentText={true}
    curvedEdge={true}
/>

--------------------------------------------------------------------------

{/*
    theme={[
        Completed Background Color,
        Percentage Font Color,
        Remaining Background Color
    ]}
*/}
    
{/*
    gradient={[
        Gradient 1 Color,
        Gradient 2 Color,
        Percentage Font Color
        Remaining Background Color
    ]}
*/}
Kulfi
import { Kulfi, Colors } from "vbocxjs";

<Kulfi
    length={350}
    percent={32}
    theme={["#3DB4EA", "#FFFFFF", Colors["gray-100"]]}
    hidePercentText={true}
/>

<Kulfi
    length={600}
    percent={66}
    gradient={["#DE24B1", "#4C6ADD", "#FFFFFF", Colors["gray-100"]]}
/>

<Kulfi
    length={500}
    percent={88}
    theme={["#D04427", "#FFFFFF", Colors["gray-100"]]}
    curvedEdge={true}
/>

--------------------------------------------------------------------------

{/*
    theme={[
        Completed Background Color,
        Percentage Font Color,
        Remaining Background Color
    ]}
*/}
    
{/*
    gradient={[
        Gradient 1 Color,
        Gradient 2 Color,
        Percentage Font Color
        Remaining Background Color
    ]}
*/}

Props

Donut Props
NameTypeMandatoryDescription
sizenumberyesThe size of donut..
percentnumbernoProgress Percentage..
themearrayyes(for flat background)Theme of donut(explained in component declaration).
gradientarrayyes(for gradient background)Gradient combination of donut(explained in component declaration).
hidePercentTextbooleannoShow/Hide donut percentage.
curvedEdgebooleannoRounded Corners of donut.
Kulfi Props
NameTypeMandatoryDescription
lengthnumberyesThe length of Kulfi.
percentnumbernoProgress Percentage..
themearrayyes(for flat background)Theme of Kulfi(explained in component declaration).
gradientarrayyes(for gradient background)Gradient combination of Kulfi(explained in component declaration).
hidePercentTextbooleannoShow/Hide Kulfi percentage..
curvedEdgebooleannoRounded Corners of Kulfi.

Toasts

Default Toast
import { Toast } from "vbocxjs";

<Toast
 variant="default"
 message="This is a Default Toast."
/>
Info Toast
import { Toast } from "vbocxjs";

<Banner
 variant="info"
 message="This is an Info Banner."
/>
Success Toast
import { Toast } from "vbocxjs";

<Toast
 variant="success"
 message="This is a Success Toast."
/>
Warning Toast
import { Toast } from "vbocxjs";

<Toast
 variant="warning"
 message="This is a Warning Toast."
/>
Error Toast
import { Toast } from "vbocxjs";

<Toast
 variant="error"
 message="This is an Error Toast."
/>
Custom Toast
import { CustomToast, Colors } from "vbocxjs";

<CustomToast
 message="This is a Custom Toast."
 backgroundColor={Colors["pink-600"]}
 color="#FFFFFF"
 toastIcon={<i className="fa fa-heart" aria-hidden="true"></i>}
 closeIcon={<i className="fa fa-times" aria-hidden="true"></i>}
/>

Props

Toast Props
NameTypeMandatoryDescription
variantdefault, info, success, warning, erroryesThe variant of the toast style to use.
positiontop, middle, bottom, XX%noPopup out position of the Toast.
messagestringyesMessage to be displayed.
timernumbernoDisplay time of Toast in milliseconds.
animatefade-in-out, zoom-in-out, stretch-in-outnoPopup out animation of the Toast.
Custom Toast Props
NameTypeMandatoryDescription
positiontop, middle, bottom, XX%noPopup out position of the Toast.
messagestringyesMessage to be displayed.
backgroundColorstring, Colors[<value>]yesBackground Color of Toast.
colorstring, Colors[<value>]yesText Color of Toast.
toastIconJSX.Element, Font Awesome IconsnoIcon indicating Toast type.
closeIconJSX.Element, Font Awesome IconsnoIcon replacing default close icon.
timernumbernoDisplay time of Toast in milliseconds.
animatefade-in-out, zoom-in-out, stretch-in-outnoPopup out animation of the Toast.

Colors

RedPinkPurpleBlueGreenYellowOrangeGray
redpinkpurplebluegreenyelloworangegray
red-50pink-50purple-50blue-50green-50yellow-50orange-50gray-50
red-100pink-100purple-100blue-100green-100yellow-100orange-100gray-100
red-200pink-200purple-200blue-200green-200yellow-200orange-200gray-200
red-300pink-300purple-300blue-300green-300yellow-300orange-300gray-300
red-400pink-400purple-400blue-400green-400yellow-400orange-400gray-400
red-500pink-500purple-500blue-500green-500yellow-500orange-500gray-500
red-600pink-600purple-600blue-600green-600yellow-600orange-600gray-600
red-700pink-700purple-700blue-700green-700yellow-700orange-700gray-700
red-800pink-800purple-800blue-800green-800yellow-800orange-800gray-800
red-900pink-900purple-900blue-900green-900yellow-900orange-900gray-900

Note: vbocxjs comes with Font Awesome v4.7 out of the box.

3.0.4

3 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.5

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.8

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago