3.0.3 • Published 5 months ago

@squaredmade/ui v3.0.3

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

@squaredmade/ui

A design system with individually importable components, inspired by Radix with shadcn styling.

Installation

To install the design system, run the following command:

npm install @squaredmade/ui

or if you're using yarn:

yarn add @squaredmade/ui

Usage

This design system provides a wide range of components and utilities that can be imported individually. Here's a basic example of how to use a component:

import { Button } from '@squaredmade/ui/button';

function MyComponent() {
  return <Button variant="default">Click me</Button>;
}

Available Components

The design system includes the following components:

  • Alert
  • AlertDialog
  • Badge
  • Button
  • Card
  • Checkbox
  • Collapsible
  • Dialog
  • DropdownMenu
  • Input
  • Label
  • Menu
  • Pagination
  • RadioGroup
  • Select
  • Separator
  • Sheet
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Tooltip

Each component can be imported from its respective path. For example:

import { Alert } from '@squaredmade/ui/alert';
import { Card } from '@squaredmade/ui/card';

Utilities

The design system also provides several utility functions and hooks:

  • cn (for combining class names)
  • useId
  • useCallbackRef
  • useControllableState
  • useEscapeKeydown
  • usePrevious
  • useSize
  • useDirection
  • useLayoutEffect

These can be imported similarly to components:

import { cn } from '@squaredmade/ui/cn';
import { useId } from '@squaredmade/ui/use-id';

Styling

This design system uses Tailwind CSS for styling. The styles are included in the package and can be imported in your project:

import '@squaredmade/ui/styles';

Development

To start the development environment:

npm run dev

To build the package:

npm run build
2.0.0-rc.2

9 months ago

3.0.3

5 months ago

3.0.2

6 months ago

3.0.1

6 months ago

2.0.0-rc.1

9 months ago

3.0.0

6 months ago

1.0.3

9 months ago

2.0.2

7 months ago

2.0.1

7 months ago

2.0.0

8 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago