Button is a wrapper of button
element.
Other than specified props, any other props will be spreaded to the button
element.
Color
Size
Demo of useScrollOnMount
<CarouselIndicators />
should be used within <Carousel />
components.
It will display the dots similar to the number of slides
Refer to Carousel
for example.
<Carousel />
is a compound component that should be used in conjunction with <CarouselIndicators />
, <Slides />
, and <Slide />
.
Next and Previous Navigation
Use CarouselBtn
to show Prev and Next at two ends of the Carousel.
Auto Transition
If you would like the Carousel to auto progress, pass down interval
props.
<Slide />
renders a specific section of <Carousel />
.
It must be direct child of <Slides />
component.
Refer to Carousel
for example.
<Slides />
is the component that wrap around <Slide />
.
<Slides />
must be used within <Carousel />
component.
Refer to Carousel
for example.
ChatHistory
should be the parent of ChatMessage
.
In addition of styling, ChatHistory
will measure the scroll position everytime new child is appended,
and scroll to bottom if the scroll position is already at bottom.
DateInput
is a wrapper over jquery.datepick plugin.
Simple Usage
Controlled Element
Use with Field
Custom Format
Value is
Field
is a component that provides contextual styling
of the Input
and Label
within it. In addition, it will
provides default props to Input
and Label
for accessibility.
Props not specified will be spreaded to the underlying div
element.
Field
is usually used in conjunction with Input
, Label
and HelpText
.
Field
provides styling to those components as well as inject default properties to improve accessibility.
Composition with Input, Label, and HelpText
Customized Input
FileRecord
is used by FileUpload
to show uploaded image.
You could use it to render uploaded file if you use FileUpload
as controlled component.
FileUpload
upload files and show progress for each individual upload.
It handles upload cancellation correctly.
Unspecified props will be spreaded to the underlying input
element.
Note: This component does not work at the moment because the backend server is not ready.
Simple Usage
Drop file here
Clear After Upload
Use this when you show the uploaded image separately.
Drop file here
Image is a component that allows you to specify image with its standard format (jpg/png/gif) and webp format. It will fallback to use the standard format if browser doesn't support webp.

Input
is a wrapper around input
element.
It accepts all props an input
element in addition of the stated props.
ref
will be forwarded to the underlying input
element.
Most of the time you want to wrap this within Field
component so it will provides
contextual styling and good defaults on props
Controlled Example
Label is just a wrapper around html label
element.
It accepts all props label
element accepts.
However, it will sync its htmlFor
with the id of the input within same Field
component
Refer to Field
component for example.
ListGroup
renders a list of items.
All props except variant
and items
will be spreaded to the underlying container.
- React❤
- Angular
- Ember
- Vue
- Svelte
Button
When variant is button
, you can add any props to the underlying button by adding additonal props to the items
array, e.g. onClick
.
Link
Some content, e.g. secret of top 10% richest people in the world.
Color
RadioGroup
is like a select
, but you can pass string, boolean, number, or object as value in options
.
When the option is selected, onChangeValue
will be called with the value you pass without convert it to string.
String value
Value:
Type of value: string
Number Value
Object Value
<RemoteComponent />
allows us to load module federated modules in webpack 4.
It achieves this by using some webpack undocumented API and monkey patching window
object.
If you want to use in production, use at your own risk. 🚨
SelectField is just a composition of Field
, Select
, Label
, and HelpText
.
Props not specified will be spreaded to Select
element, including ref
.
If you need more control, compose them yourself.
Controlled Component
Select
is a wrapper around select
element.
It accepts all props an select
element in addition of the stated props.
ref
will be forwarded to the underlying select
element.
Most of the time you want to wrap this within Field
component so it will provides
contextual styling and good defaults on props
Pass options as props
Pass option as children
All props of native select will be supported.
A button to share an URL using Web Share API. Fallback to copy to clipboard when Web Share API is not supported.
Spinner is used to indicate busy status, e.g. waiting for API response
You can set delayShow
for delaying the spinner to appear.
This is an example of `delayShow` of 1000 (1 sec).
TextField is just a composition of Field
, Input
, Label
, and HelpText
.
Props not specified will be spreaded to Input
element, including ref
.
If you need more control, compose them yourself.
Controlled Component
Textarea
is a wrapper around textarea
element.
It accepts all props an textarea
element in addition of the stated props.
ref
will be forwarded to the underlying textarea
element.
Most of the time you want to wrap this within Field
component so it will provides
contextual styling and good defaults on props