xellanix-react
v2.2.4
Published
A react stylesheet and components from xellanix
Downloads
104
Maintainers
Readme
Xellanix Stylesheets and Components for React
Installation and Setup
- To install this package, run this command on the terminal:
pnpm i xellanix-react
- Before using any component, you must import the default stylesheet into the first line of your
main.tsx
file or the starting point of your React application that is used for initial rendering and setup.
import "xellanix-react/style.css";
- Add the
light-theme
ordark-theme
class in thebody
tag. - Add the
body-wrapper
class to thediv
tag, which is a child of thebody
tag (commonly used as the root for React), so that it looks at least like this. - Once all the required classes have been added, it should at least look like this.
<body class="light-theme">
<div class="body-wrapper" id="root"></div>
<!-- OTHER SCRIPTS -->
</body>
Usage
- To use the component, just import it like this:
import { Slider } from "xellanix-react";
- Add the imported component to the layout:
return (
<div>
{/* other elements */}
<Slider min={0}
max={1000}
step={2}
initialValue={20}
/>
{/* other elements */}
</div>
)
For more information, please see the available documentation.
Available Components
InfoBox
PopupProvider
Slider
SliderInput
(slider text input forSlider
component)ToggleSwitch
Available Types and Enums
InfoStatus
(forInfoBox
componentstatus
)
Available Hooks
usePopup
(PopupProvider
hook)useSlider
(Slider
ref hook)