Catalog npm
PACKAGE EXPLORERView in registry

@0xsquid/ui

npm

Squid's UI components

Versions collected251
Direct dependencies59From release 3.8.0
Last observed21 Oct, 11:50 UTC

README

Current package documentation

Squid UI

React components library for Squid V2

Package installation and usage

Install the package:

yarn add @0xsquid/ui

Import styles in your entry point:

// src/main.tsx | src/pages/_app.tsx | etc...
import "@0xsquid/ui/dist/index.css";

Wrap your app with our theme provider <ThemeProvider /> and specify your theme:

import { ThemeProvider, Button } from "@0xsquid/ui";

function App() {
  return (
    <ThemeProvider theme={yourTheme}>
      <Button label="Hello world" variant="primary" size="md" />
    </ThemeProvider>
  );
}

Development

Install dependencies

yarn install

Start Storybook dev server

yarn storybook

Build package

To build the package using Rollup, run:

yarn build

This command will:

  1. compile Tailwind CSS classes into src/styles/compiled-tailwind.css
  2. bundle source code, along with its type declarations, into the dist/ folder
  3. copy src/styles/compiled-tailwind.css to dist/index.css

Lint and format

To format and lint the code, run:

yarn format:fix
yarn lint:fix

Folder structure

- src
  - index.ts <- barrel file
  - components
    - index.ts <- barrel file
    - buttons
      - index.ts <- barrel file
      - Button.tsx
    - lists
      - index.ts <- barrel file
      - HistoryItem.tsx
  - stories
    - buttons
      - Button.stories.tsx
    - lists
      - HistoryItem.stories.tsx

When creating a new component, don't forget to update the barrel file, exporting your component in the index.ts file in the corresponding component folder. You can also install the AutoBarrel VSCode extension.

Images

In case you need to add images somewhere that need to be included in the final bundle, convert them to base64 instead.

Example:

.my-image {
-  background-image: url('my-image.png');
+  background-image: url('data:image/png;base64,iVBORw0....');
}

Or in a React component:

-  <img src="my-image.png" />
+  <img src="data:image/png;base64,iVBORw0..." />

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 251

Collected releases
VersionPublishedDirect dependenciesOpen version
3.8.0Registry latest15 Oct 202659
3.8.0-beta-nodev24.06 Oct 202659
3.7.1-beta-danal.02 Sept 202658
3.7.027 Jul 202658
3.6.027 Jul 202658
3.5.1-beta-staking-flow.124 Jul 202658
3.5.1-beta-staking-flow.024 Jul 202658
3.5.017 Jun 202658
3.4.1-beta-deposit-with-memo.126 May 202658
3.4.1-beta-deposit-with-memo.023 May 202658
3.4.1-beta-interactive-to-amount.026 Mar 202658
3.4.013 Mar 202658
3.4.0-beta.012 Mar 202658
3.3.3-beta-ssr.011 Mar 202658
3.3.25 Jan 202658
3.3.119 Dec 202558
3.3.016 Dec 202558
3.2.2-beta.8.116 Dec 202558
3.2.2-beta.8.015 Dec 202558
3.2.2-beta.7.015 Dec 202558

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0xsquid/squid-ui

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0xsquid/api-widget

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:48 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:330a7fc4d5e254c6ce7845ee82e4f7bd2476556e2fe4cc5aa294bd8249acd9b2