New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gravity-ui/uikit

Package Overview
Dependencies
Maintainers
3
Versions
267
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/uikit

Gravity UI base styling and components

latest
Source
npmnpm
Version
7.36.1
Version published
Weekly downloads
12K
-6.88%
Maintainers
3
Weekly downloads
 
Created
Source

UIKit · npm package CI storybook tests storybook

A set of flexible, highly practical, and efficient React components for creating rich web applications.

Cover image

Resources

Globe Logo Light Globe Logo Dark Website

Documentation Logo Light Documentation Logo Dark Documentation

Figma Logo Light Figma Logo Dark Figma

Themer Logo Light Themer Logo Dark Themer

Storybook Logo Light Storybook Logo Dark Storybook

Community Logo Light Community Logo Dark Community

Install

npm install --save-dev @gravity-ui/uikit

Usage

import {Button} from '@gravity-ui/uikit';

const SubmitButton = <Button view="action" size="l" />;

Styles

UIKit comes with base styling and theme. In order to everything look nice include this at the top of your entry file:

// index.js

import '@gravity-ui/uikit/styles/fonts.css';
import '@gravity-ui/uikit/styles/styles.css';

// ...

UIKit supports different themes: light, dark and their contrast variants. Your app must be rendered inside ThemeProvider:

import {createRoot} from 'react-dom/client';
import {ThemeProvider} from '@gravity-ui/uikit';

const root = createRoot(document.getElementById('root'));
root.render(
  <ThemeProvider theme="light">
    <App />
  </ThemeProvider>,
);

It is possible to generate initial root CSS-classes during SSR to avoid theme flashing:

import {getRootClassName} from '@gravity-ui/uikit/server';

const theme = 'dark';
const rootClassName = getRootClassName({theme});

const html = `
<html>
  <body>
    <div id="root" class="${rootClassName}"></div>
  </body>
</html>
`;

Also, there is a SCSS mixins file with useful helpers to use in your app.

I18N

Some components contain text tokens (words and phrases). They come in two languages: en (default) and ru. To set the language use configure function:

// index.js

import {configure} from '@gravity-ui/uikit';

configure({
  lang: 'ru',
});

Development

To start the development server with storybook run the following:

git clone git@github.com:gravity-ui/uikit.git
cd uikit
npm ci
npm run start

Keywords

component

FAQs

Package last updated on 02 Apr 2026

Did you know?

Socket

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.

Install

Related posts