sagu-ui v2.3.3

It's a simple and faster React UI
Installation π οΈ
sagu-ui is available as an npm package.
To install it, run:
//with npm
npm install sagu-ui
//with yarn
yarn add sagu-uistyled-components package is required
Usage π
Here is a quick example to get you started, it's all you need:
import React from 'react'
import { theme, SaguGlobalStyles, SaguProvider, Button } from 'sagu-ui'
function App() {
return (
<SaguProvider theme={theme}>
<SaguGlobalStyles />
<Button>Click me</Button>
</SaguProvider>
)
}
export default AppTheme customization βοΈ
You can easily override the values of the theme object
import { theme, SaguProvider } from 'sagu-ui'
function App() {
Object.assign(theme.colors.primary, { medium: "#510763" });
return <SaguProvider theme={theme}>...</SaguProvider>
}Also you can add an entire custom object and it will be available on the Provider
import { theme, SaguProvider } from 'sagu-ui'
import { CustomWrapper } from './components/CustomWrapper'
function App() {
const customColors = {
tertiary: {
lighter: "#fb973a",
light: "#e37c1d",
medium: "#da710f",
dark: "#9e4c01"
}
};
Object.assign(theme.colors, customColors);
return (
<SaguProvider theme={theme}>
<CustomWrapper>...</CustomWrapper>
</SaguProvider>
)
}// components/CustomWrapper.ts
import styled, { css } from 'styled-components'
export const CustomWrapper = styled.div`
${({ theme }) => css`
background: ${theme.colors.tertiary.medium};
`}
`Component customization π§
You have too many ways to customize the Sagu components
Using styled-components
import styled from 'styled-components'
import { Button } from 'sagu-ui'
const MyCustomButton = styled(Button)`
background: red;
`
...
<MyCustomButton>My Button</MyCustomButton>Using inline styles
import { Button } from 'sagu-ui'
...
<Button
style={{
background: 'yellow'
}}
>
My Button
</Button>Using CSS classes
.button-green {
background: green;
}import { Button } from 'sagu-ui'
import './styles.css'
...
<Button className="button-green">My Button</Button>Examples βοΈ
Take a look at some examples using Sagu-UI
Contributing π€
You can contribute to this project by opening an issue or creating a pull request.
What is insideβ
Available commands β¬οΈ
build: build the files in thelibdirectorysb: run the storybook at the addresslocalhost:6006prettier:check: check formatting on allsrcdirectoryprettier:format: formats allsrcdirectorygenerate <Component name>: create a component boilerplatetest: test all components
Project structure π§¬
/.storybook
/lib
/src
βββ index.ts
βββ animations
| βββ placeholder.ts
βββ hooks
| βββ ...
βββ packages
| βββ index.ts
| βββ Button
| | βββ index.tsx
| | βββ stories.tsx
| | βββ styles.ts
| | βββ test.tsx
βββ styles
| βββ global.ts
| βββ theme.ts
| βββ provider.tsOur Amazing Contributors π
Thanks for all who is contributing with us.
Be part of this amazing team, contribute as well
License π
This project is licensed under the MIT License.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago