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.2.2-beta.6.010 Dec 202558
3.2.2-beta.2.020 Nov 202558
3.2.2-beta.1.020 Nov 202558
3.2.113 Nov 202558
3.2.021 Oct 202558
3.1.03 Oct 202558
3.0.211 Sept 202558
3.0.110 Sept 202558
3.0.019 Aug 202558
3.0.0-beta.65 Aug 202558
3.0.0-beta.55 Aug 202558
3.0.0-beta.45 Aug 202557
3.0.0-beta.34 Aug 202557
3.0.0-beta.24 Aug 202557
3.0.0-beta.131 Jul 202556
3.0.0-beta.030 Jul 202556
2.10.129 Jul 202556
2.10.017 Jul 202556
2.9.01 Jul 202556
2.8.3-qr-modal-cta-button-beta.01 Jul 202556

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