Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@highlight-ui/tokens
Advanced tools
Provides set of design tokens in multiple formats. The source files use the Tokens Studio for Figma JSON format.
Tokens are exposed in the following formats:
Using npm:
npm install --save-dev @highlight-ui/tokens
Using yarn:
yarn add -D @highlight-ui/tokens
Using pnpm:
pnpm add --D @highlight-ui/tokens
Tokens are exported as a set of CSS variables. To use it, import this file:
@import '~@highlight-ui/tokens/dist/tokens.css';
Once imported, define your styles by using one of the tokens:
.my-class {
background-color: var(--background-success-hover);
}
Tokens are exported as a set of SASS variables. To use it, import this file:
@use '~@highlight-ui/tokens/dist/tokens';
Once imported, define your styles by using one of the tokens:
.my-class {
background-color: tokens.$background-success-hover;
}
Tokens are exported as a set of TS types and objects.
import { ColorTokenType, colorTokens } from '@highlight-ui/tokens';
Where ColorTokenType
is a union of token names and colorTokens
is object where keys are token names and values are token values.
import React from 'react';
import { ColorTokenType, colorTokens } from '@highlight-ui/tokens';
export default function Example() {
const tokenName: ColorTokenType = 'token-name';
const tokenValue = colorTokens[tokenName];
return <div style={{ 'css-attribute-name': tokenValue }} />;
}
import { IconColorTokenType, iconColorTokens } from '@highlight-ui/tokens';
Where IconColorTokenType
is a union of token names and iconColorTokens
is object where keys are token names and values are token values.
import React from 'react';
import { IconColorTokenType, iconColorTokens } from '@highlight-ui/tokens';
export default function Example() {
const tokenName: IconColorTokenType = 'token-name';
const tokenValue = iconColorTokens[tokenName];
return <div style={{ 'css-attribute-name': tokenValue }} />;
}
import { SpacingTokenType, spacingTokens } from '@highlight-ui/tokens';
Where SpacingTokenType
is a union of token names and spacingTokens
is object where keys are token names and values are token values.
import React from 'react';
import { SpacingTokenType, spacingTokens } from '@highlight-ui/tokens';
export default function Example() {
const tokenName: SpacingTokenType = 'token-name';
const tokenValue = spacingTokens[tokenName];
return <div style={{ 'css-attribute-name': tokenValue }} />;
}
import { BorderWidthTokenType, borderWidthTokens } from '@highlight-ui/tokens';
Where BorderWidthTokenType
is a union of token names and borderWidthTokens
is object where keys are token names and values are token values.
import React from 'react';
import { BorderWidthTokenType, borderWidthTokens } from '@highlight-ui/tokens';
export default function Example() {
const tokenName: BorderWidthTokenType = 'token-name';
const tokenValue = borderWidthTokens[tokenName];
return <div style={{ 'css-attribute-name': tokenValue }} />;
}
Provides multiple groups of token useful for Typography such as color, font-family, font-size, font-weight, line-height, letter-spacing, text-case and text-decoration.
import {
TypographyColorTokenType,
typographyColorTokens,
FontFamilyTokenType,
fontFamilyTokens,
FontSizeTokenType,
fontSizeTokens,
FontWeightTokenType,
fontWeightTokens,
LetterSpacingTokenType,
letterSpacingTokens,
LineHeightTokenType,
lineHeightTokens,
TextCaseTokenType,
textCaseTokens,
TextDecorationTokenType,
textDecorationTokens,
} from '@highlight-ui/tokens';
Each group contains one type export and one object. Similar to other token prior to this section.
import React from 'react';
import {
TypographyColorTokenType,
typographyColorTokens,
} from '@highlight-ui/tokens';
export default function Example() {
const tokenName: TypographyColorTokenType = 'token-name';
const tokenValue = typographyColorTokens[tokenName];
return <div style={{ 'css-attribute-name': tokenValue }} />;
}
Please visit personio.design.
If you're interested in contributing, please visit our contribution page.
FAQs
Set of design tokens for Highlight UI
The npm package @highlight-ui/tokens receives a total of 2,193 weekly downloads. As such, @highlight-ui/tokens popularity was classified as popular.
We found that @highlight-ui/tokens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.