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
2.8.211 Jun 202556
2.8.2-xrpl-beta.029 May 202556
2.8.129 May 202556
2.8.029 May 202557
2.6.12-animate-number-beta.022 May 202557
2.6.5-animate-number-beta.121 May 202557
2.6.5-animate-number-beta.021 May 202556
2.6.8-xrpl-beta.115 May 202556
2.6.1115 May 202556
2.6.1014 May 202556
2.6.914 May 202556
2.6.813 May 202556
2.6.5-rollup-beta.09 May 202556
2.6.8-onramp-beta.82 May 202556
2.6.8-onramp-beta.72 May 202556
2.6.8-onramp-beta.62 May 202556
2.6.8-xrpl-beta.029 Apr 202556
2.6.8-onramp-beta.529 Apr 202556
2.6.8-onramp-beta.428 Apr 202556
2.6.8-onramp-beta.328 Apr 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