All Projects → vrk-kpa → suomifi-ui-components

vrk-kpa / suomifi-ui-components

Licence: other
Suomi.fi-styleguide in React components

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to suomifi-ui-components

Styleguide
The VTEX Design System and React component library.
Stars: ✭ 138 (+392.86%)
Mutual labels:  styleguide, react-components
Axiom React
Axiom - Brandwatch design system and React pattern library
Stars: ✭ 41 (+46.43%)
Mutual labels:  styleguide, react-components
react-pluto
A package of small but beautiful React components from the planet, Pluto. 🔵 Get minimal components for your React based applications 😍
Stars: ✭ 17 (-39.29%)
Mutual labels:  styleguide, react-components
Styled Bootstrap
💅🏻 A styled-component implementation of Bootstrap
Stars: ✭ 154 (+450%)
Mutual labels:  styleguide, react-components
Nodebestpractices
✅ The Node.js best practices list (December 2021)
Stars: ✭ 72,734 (+259664.29%)
Mutual labels:  styleguide
Frontend Nanodegree Styleguide Zh
优达学城(Udacity)前端样式指南
Stars: ✭ 188 (+571.43%)
Mutual labels:  styleguide
Vue Styleguidist
Created from react styleguidist for Vue Components with a living style guide
Stars: ✭ 2,133 (+7517.86%)
Mutual labels:  styleguide
Styleguide Generators
An overview of automatic living styleguide generators
Stars: ✭ 1,902 (+6692.86%)
Mutual labels:  styleguide
kotlin-style-guide
red_mad_robot Kotlin Style Guide
Stars: ✭ 85 (+203.57%)
Mutual labels:  styleguide
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (+1260.71%)
Mutual labels:  styleguide
Naming Convention Guides
📖 Collection of naming guides for writing more consistent and readable codes
Stars: ✭ 239 (+753.57%)
Mutual labels:  styleguide
Bluestyle
A Julia style guide that lives in a blue world
Stars: ✭ 210 (+650%)
Mutual labels:  styleguide
Javascript
JavaScript Style Guide
Stars: ✭ 117,286 (+418778.57%)
Mutual labels:  styleguide
Ue4 Style Guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,656 (+9385.71%)
Mutual labels:  styleguide
react-expandable-listview
React expandable components, assist you render expandable objects or React components
Stars: ✭ 38 (+35.71%)
Mutual labels:  react-components
Styleguide
🖌 Conjunction of design patterns, components and resources used across our products.
Stars: ✭ 162 (+478.57%)
Mutual labels:  styleguide
Livingcss
Parse comments in your CSS to generate a living style guide using Markdown, Handlebars, Polymer, and Prism syntax highlighter.
Stars: ✭ 237 (+746.43%)
Mutual labels:  styleguide
yoast-components
Accessible React components by Yoast
Stars: ✭ 19 (-32.14%)
Mutual labels:  react-components
Swift Style Guide
StyleShare에서 작성한 Swift 한국어 스타일 가이드
Stars: ✭ 223 (+696.43%)
Mutual labels:  styleguide
Stylemark
Generate interactive style guides from Markdown.
Stars: ✭ 217 (+675%)
Mutual labels:  styleguide

DVV suomifi-ui-components

npm NPM WCAG PRs Welcome

Suomi.fi-styleguide in React components. Living styleguide (latest release/master-branch).

Features

  • Accessibility WCAG 2.1 level AA
  • React-components with TypeScript support
  • Suomi.fi brand styles
  • Highly customizable (CSS, CSS-in-JS)

Works with React >= 16.8.0 and Styled Components >= 5.2.1. Supports TypeScript. CJS and ESM builds provided via the npm package.

Supported browser and screenreader combinations

Operating system Browsers Screen reader
macOS Safari, Chrome, Edge VoiceOver
Windows Chrome, Firefox, Edge NVDA
iOS Safari VoiceOver
Android Chrome TalkBack

📦 Install

To install the component library itself

yarn add suomifi-ui-components

Include required styles from dist/main.css as best suited for your project. You can, for example, import the stylesheet to your app and let your bundler handle it:

import 'suomifi-ui-components/dist/main.css';

This stylesheet contains part of the global styles for the library as well as Reach UI peer dependency styles.

Include required fonts as best suited for your project. You can, for example, use the following import with your global css.

@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600&display=swap');

The following fonts and variants are required: Font-family: 'Source Sans Pro', Font-weight: 300, 400, 600

Peer dependencies

You should also install the following peer dependencies.

  • React version >=16.8.0 and related dependencies and typings.

  • styled-components version >=5.2.1 and related dependencies and typings.

  • The aim is to keep dependencies up to date and use the latest available versions. We encourage you to use the latest available versions of peer dependencies.

yarn add styled-components
  • If using TypeScript, version 3.8 or above is required.

  • In case TypeScript is used and skipLibCheck compiler option is set to false, also typings for react, react-dom, styled-components and warning are required.

yarn add @types/styled-components @types/warning

🔨 Usage

import { Button } from 'suomifi-ui-components';
ReactDOM.render(<Button />, mountNode);

🌊 Component variants

Components have variant-property for different versions of the current component.

import { Button } from 'suomifi-ui-components';
<Button variant="secondary">This is a secondary button</Button>;

Extending styles

Components' styles can be customized with Styled Components:

styled(Button)...

or using CSS-ClassName:

<Button className="button--custom">Example</Button>
.fi-button.button--custom {
  ...;
}

Don't use !important, if really really needed - for specificity hack you can define styles using classNames multiple times .fi-button.button--custom.button--custom {...}

🔮 FAQ

See FAQ.md.

⌨️ Development

See DEVELOPMENT.md.

🤝 Contributing

We welcome all contributions. Please read our CONTRIBUTING.md first.

Licensing

MIT LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].