# UI Setup (https://dimah-s3.vercel.app/docs/react/ui)



[`@dimah-s3/ui`](https://www.npmjs.com/package/@dimah-s3/ui) provides accessible, theme-ready UI controls built on top of [shadcn](https://ui.shadcn.com) design tokens and `@dimah-s3/react` hooks.

<div className="fd-steps">
  <div className="fd-step">
    ## Installation [#1-installation]

    <Tabs items="[&#x22;npm package&#x22;, &#x22;shadcn registry&#x22;]">
      <Tab value="npm package">
        <CodeBlockTabs defaultValue="npm">
          <CodeBlockTabsList>
            <CodeBlockTabsTrigger value="npm">
              npm
            </CodeBlockTabsTrigger>

            <CodeBlockTabsTrigger value="pnpm">
              pnpm
            </CodeBlockTabsTrigger>

            <CodeBlockTabsTrigger value="yarn">
              yarn
            </CodeBlockTabsTrigger>

            <CodeBlockTabsTrigger value="bun">
              bun
            </CodeBlockTabsTrigger>
          </CodeBlockTabsList>

          <CodeBlockTab value="npm">
            ```bash
            npm i @dimah-s3/ui shadcn
            ```
          </CodeBlockTab>

          <CodeBlockTab value="pnpm">
            ```bash
            pnpm add @dimah-s3/ui shadcn
            ```
          </CodeBlockTab>

          <CodeBlockTab value="yarn">
            ```bash
            yarn add @dimah-s3/ui shadcn
            ```
          </CodeBlockTab>

          <CodeBlockTab value="bun">
            ```bash
            bun add @dimah-s3/ui shadcn
            ```
          </CodeBlockTab>
        </CodeBlockTabs>
      </Tab>

      <Tab value="shadcn registry">
        ```json title="components.json"
        {
          "registries": {
            "@dimah-s3": "https://dimah-s3.vercel.app/r/{name}.json"
          }
        }
        ```

        <CodeBlockTabs defaultValue="npm">
          <CodeBlockTabsList>
            <CodeBlockTabsTrigger value="npm">
              npm
            </CodeBlockTabsTrigger>

            <CodeBlockTabsTrigger value="pnpm">
              pnpm
            </CodeBlockTabsTrigger>

            <CodeBlockTabsTrigger value="yarn">
              yarn
            </CodeBlockTabsTrigger>

            <CodeBlockTabsTrigger value="bun">
              bun
            </CodeBlockTabsTrigger>
          </CodeBlockTabsList>

          <CodeBlockTab value="npm">
            ```bash
            npx shadcn@latest add @dimah-s3/upload-button
            ```
          </CodeBlockTab>

          <CodeBlockTab value="pnpm">
            ```bash
            pnpm dlx shadcn@latest add @dimah-s3/upload-button
            ```
          </CodeBlockTab>

          <CodeBlockTab value="yarn">
            ```bash
            yarn dlx shadcn@latest add @dimah-s3/upload-button
            ```
          </CodeBlockTab>

          <CodeBlockTab value="bun">
            ```bash
            bun x shadcn@latest add @dimah-s3/upload-button
            ```
          </CodeBlockTab>
        </CodeBlockTabs>
      </Tab>
    </Tabs>
  </div>

  <div className="fd-step">
    ## Import CSS stylesheet [#2-import-css-stylesheet]

    Import the UI stylesheet in your global CSS to enable animations and design tokens:

    ```css title="app/globals.css"
    @import "shadcn/tailwind.css";
    @import "@dimah-s3/ui/styles.css";

    /* + shadcn theme variables (`--primary`, `--muted`, …) */

    /* Optional: theme dimah-s3 independently of the rest of the app
    @theme {
      --color-dimah-s3-primary: oklch(0.65 0.15 150);
    }
    */

    ```
  </div>

  <div className="fd-step">
    ## Mount Toaster [#3-mount-toaster]

    Mount `<Toaster />` next to `<S3Provider>` in your root layout:

    ```tsx title="app/layout.tsx"
    import { Toaster } from "@dimah-s3/ui";
    import { S3Provider } from "@/lib/s3-client";

    export default function RootLayout({
      children,
    }: {
      children: React.ReactNode;
    }) {
      return (
        <html lang="en">
          <body>
            <S3Provider>{children}</S3Provider>
            <Toaster />
          </body>
        </html>
      );
    }
    ```

    ***
  </div>
</div>

## Explore UI components [#explore-ui-components]

<Cards>
  <Card title="Upload Button" href="/docs/react/ui/components/upload-button" description="Trigger native file picker with inline progress rows." />

  <Card title="Upload Dropzone" href="/docs/react/ui/components/upload-dropzone" description="Drag-and-drop surface for single and multi-file queue." />

  <Card title="Download Button" href="/docs/react/ui/components/download-button" description="One-click presigned download trigger." />

  <Card title="Progress Download Button" href="/docs/react/ui/components/progress-download-button" description="Live stream progress indicator with cancellation." />

  <Card title="Delete Button" href="/docs/react/ui/components/delete-button" description="Confirmation dialog and delete executor." />

  <Card title="Theming" href="/docs/react/ui/customization/theming" description="Customize colors with Tailwind and shadcn variables." />
</Cards>

## Frequently asked questions [#frequently-asked-questions]

<Accordions>
  <Accordion title="Can I use shadcn components without installing the @dimah-s3/ui package?">
    Yes. Use the shadcn registry command (`npx shadcn@latest add @dimah-s3/upload-button`) to copy component source directly into your codebase.
  </Accordion>
</Accordions>
