
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@pikas-ui/styles
Advanced tools
This package contains a styles parameters.
The library is based on Stitches.
With npm:
npm install @pikas-ui/styles
With yarn:
yarn add @pikas-ui/styles
With pnpm:
pnpm add @pikas-ui/styles
For handling global styles in your application you can use the globalCss
function.
You must call it in your application.
import { globalCss, createTheme, customGlobalCss } from '@pikas-ui/styles';
const globalCssCustom = globalCss({
'html, body, #__next': {
color: '$BLACK',
fontFamily: '$roboto',
minWidth: 300,
scrollBehavior: 'smooth',
},
'*': {
margin: 0,
padding: 0,
boxSizing: 'border-box',
},
li: {
listStyle: 'none',
},
a: {
textDecoration: 'none',
},
'::-webkit-scrollbar': {
width: '7px',
height: '7px',
borderRadius: '10px',
},
'::-webkit-scrollbar-track': {
borderRadius: '10px',
backgroundColor: '$WHITE',
},
'::-webkit-scrollbar-thumb': {
background: '$GRAY',
borderRadius: '10px',
},
})
const myTheme = createTheme({
colors: {
PRIMARY_DARKER: '#083358',
PRIMARY_DARK: '#0D4C84',
PRIMARY: '#1166B0',
PRIMARY_LIGHT: '#88B3D7',
PRIMARY_LIGHTER: '#C3D9EB',
PRIMARY_LIGHTEST_2: '#E7F0F7',
PRIMARY_LIGHTEST_1: '#F3F4F6',
}
});
const App: React.FC = () => {
customGlobalCss()
return (
<PikasUIProvider lightTheme={myTheme}>
<h1>Hello World</h1>
</PikasUIProvider>
);
}
import { styled } from '@pikas-ui/styles';
const Button = styled('button', {
background: '$PRIMARY',
color: 'white',
border: 'none',
padding: '0.5rem',
br: 'sm',
fontSize: '$EM-SMALL',
fontWeight: '$BOLD',
cursor: 'pointer',
outline: 'none',
transition: 'all 0.2s ease-in-out',
'&:hover': {
background: '$PRIMARY_LIGHT',
},
})
import { createTheme } from '@pikas-ui/styles';
const themeDark = createTheme({
colors: {
PRIMARY_DARKER: '#083358',
PRIMARY_DARK: '#0D4C84',
PRIMARY: '#1166B0',
PRIMARY_LIGHT: '#88B3D7',
PRIMARY_LIGHTER: '#C3D9EB',
PRIMARY_LIGHTEST_2: '#E7F0F7',
PRIMARY_LIGHTEST_1: '#F3F4F6',
}
});
Properties for border radius.
"none" | "xs" | "sm" | "md" | "lg" | "xl" | "round"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
br: 'sm',
})
Properties for font size.
"EM-XXX-SMALL" | "EM-XX-SMALL" | "EM-X-SMALL" | "EM-SMALL" | "EM-MEDIUM" | "EM-LARGE" | "EM-X-LARGE" | "EM-XX-LARGE" | "EM-XXX-LARGE"
"REM-XXX-SMALL" | "REM-XX-SMALL" | "REM-X-SMALL" | "REM-SMALL" | "REM-MEDIUM" | "REM-LARGE" | "REM-X-LARGE" | "REM-XX-LARGE" | "REM-XXX-LARGE"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
fontSize: '$EM-SMALL',
})
Properties for font weight.
"THIN" | "EXTRA-LIGHT" | "LIGHT" | "NORMAL" | "MEDIUM" | "SEMI-BOLD" | "BOLD" | "EXTRA-BOLD" | "BLACK"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
fontWeight: '$BOLD',
})
Properties for letter spacing.
"XX-SMALL" | "X-SMALL" | "SMALL" | "MEDIUM" | "LARGE" | "X-LARGE" | "XX-LARGE"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
letterSpacing: '$XX-SMALL',
})
Properties for line height.
"EM-XXX-SMALL" | "EM-XX-SMALL" | "EM-X-SMALL" | "EM-SMALL" | "EM-MEDIUM" | "EM-LARGE" | "EM-X-LARGE" | "EM-XX-LARGE" | "EM-XXX-LARGE"
"REM-XXX-SMALL" | "REM-XX-SMALL" | "REM-X-SMALL" | "REM-SMALL" | "REM-MEDIUM" | "REM-LARGE" | "REM-X-LARGE" | "REM-XX-LARGE" | "REM-XXX-LARGE"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
lineHeight: '$EM-SMALL',
})
Properties for box shadow.
"ELEVATION_1" | "ELEVATION_2" | "ELEVATION_3" | "ELEVATION_4"
"ELEVATION_TOP_1" | "ELEVATION_TOP_2" | "ELEVATION_TOP_3" | "ELEVATION_TOP_4" | "ELEVATION_TOP_5" | "ELEVATION_TOP_6"
"ELEVATION_BOTTOM_1" | "ELEVATION_BOTTOM_2" | "ELEVATION_BOTTOM_3" | "ELEVATION_BOTTOM_4" | "ELEVATION_BOTTOM_5" | "ELEVATION_BOTTOM_6"
"DIMINUTION_1" | "DIMINUTION_2" | "DIMINUTION_3" | "DIMINUTION_4" | "DIMINUTION_5"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
boxShadow: '$ELEVATION_1',
})
Properties for size.
"XXX-SMALL" | "XX-SMALL" | "X-SMALL" | "SMALL" | "MEDIUM" | "LARGE" | "X-LARGE" | "XX-LARGE" | "XXX-LARGE"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
size: '$XXX-SMALL',
})
Properties for z-index.
"XXX-LOW" | "XX-LOW" | "X-LOW" | "LOW" | "MEDIUM" | "HIGH" | "X-HIGH" | "XX-HIGH" | "XXX-HIGH"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
zIndex: '$XXX-LOW',
})
Properties for custom gap for resolve Safari gap issue.
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
customGap: 8,
// or
customColumnGap: 8,
// or
customRowGap: 8,
})
Properties for color.
"PRIMARY_DARKER" | "PRIMARY_DARK" | "PRIMARY" | "PRIMARY_LIGHT" | "PRIMARY_LIGHTER" | "PRIMARY_LIGHTEST_2" | "PRIMARY_LIGHTEST_1"
"SECONDARY_DARKER" | "SECONDARY_DARK" | "SECONDARY" | "SECONDARY_LIGHT" | "SECONDARY_LIGHTER" | "SECONDARY_LIGHTEST_2" | "SECONDARY_LIGHTEST_1"
"TERTIARY_DARKER" | "TERTIARY_DARK" | "TERTIARY" | "TERTIARY_LIGHT" | "TERTIARY_LIGHTER" | "TERTIARY_LIGHTEST_2" | "TERTIARY_LIGHTEST_1"
"BLACK" | "BLACK_LIGHT" | "BLACK_LIGHTER" | "BLACK_LIGHTEST_2" | "BLACK_LIGHTEST_1"
"BLACK_FIX" | "BLACK_FIX_LIGHT" | "BLACK_FIX_LIGHTER" | "BLACK_FIX_LIGHTEST_2" | "BLACK_FIX_LIGHTEST_1"
"WHITE" | "WHITE_LIGHT" | "WHITE_LIGHTER" | "WHITE_LIGHTEST_2" | "WHITE_LIGHTEST_1"
"WHITE_FIX" | "WHITE_FIX_LIGHT" | "WHITE_FIX_LIGHTER" | "WHITE_FIX_LIGHTEST_2" | "WHITE_FIX_LIGHTEST_1"
"GRAY_DARKER" | "GRAY_DARK" | "GRAY" | "GRAY_LIGHT" | "GRAY_LIGHTER" | "GRAY_LIGHTEST_2" | "GRAY_LIGHTEST_1"
"SUCCESS_DARKER" | "SUCCESS_DARK" | "SUCCESS" | "SUCCESS_LIGHT" | "SUCCESS_LIGHTER" | "SUCCESS_LIGHTEST_2" | "SUCCESS_LIGHTEST_1"
"WARNING_DARKER" | "WARNING_DARK" | "WARNING" | "WARNING_LIGHT" | "WARNING_LIGHTER" | "WARNING_LIGHTEST_2" | "WARNING_LIGHTEST_1"
"DANGER_DARKER" | "DANGER_DARK" | "DANGER" | "DANGER_LIGHT" | "DANGER_LIGHTER" | "DANGER_LIGHTEST_2" | "DANGER_LIGHTEST_1"
"TRANSPARENT" | "BACKGROUND"
import { styled } from '@pikas-ui/styles';
const Div = styled('div', {
color: '$PRIMARY',
backgroundColor: '$BACKGROUND',
borderColor: '$PRIMARY',
borderWidth: 1,
borderStyle: 'solid',
})
You can find the change log here.
FAQs
A library that provides the styling parameters for the components in the pikas-ui library.
The npm package @pikas-ui/styles receives a total of 5 weekly downloads. As such, @pikas-ui/styles popularity was classified as not popular.
We found that @pikas-ui/styles demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.