Introduction
Installation
Next.jsViteLaravelReact RouterRemixAstroTanStack StartTanStack RouterManual InstallationMCP
All componentsTheme
FieldFormInputText FieldTextareaSearch FieldInput OTPNumber FieldNumber FormatSliderCheckboxSwitchRadioSelectCombo BoxList BoxChoice BoxMulti SelectToken FieldNewTag FieldTag GroupCalendarDate FieldDate PickerDate Range PickerRange CalendarTime FieldColor PickerColor FieldColor AreaColor SliderColor SwatchColor Swatch PickerColor ThumbColor WheelDrop ZoneFile Trigger
ButtonButton GroupToggleToggle GroupPreskok Auth Button
EditorHeadingLinkTextKeyboard
CardContainerGrid ListResizableTableTreeSeparatorDescription ListScroll AreaShow MoreToolbar
BreadcrumbsNavbarPaginationTabsSidebar
DialogModalDrawerPopoverPreview TriggerNewSheetTooltipContext MenuDropdownCommandCommand MenuDisclosureMenu
ToastProgress BarProgress CircleMeterLoaderSkeletonNoteBadge
Chart (helpers)Area ChartBar ChartLine ChartPie ChartExperimental ChartsNewExperimental Radial ChartNewExperimental Radar ChartNewBar ListTracker
Async ImageAvatarCarouselPreskok Icon
Installation

Remix

Install and configure Preskok UI for Remix.

View as MarkdownAsk ChatGPT

Note: This guide is for Remix. For React Router, see the React Router guide.

Create project

Start by creating a new Remix project using create-remix:

npx create-remix@latest my-app

Run the CLI

Run the shadcn CLI to set up Preskok UI and install your first component:

npx shadcn@latest init @preskok/default @preskok/button

App structure

Note: This app structure is only a suggestion. You can place the files wherever you want.

  • Place the UI components in the app/components/ui folder.
  • Your own components can be placed in the app/components folder.
  • The app/lib folder contains all the utility functions. We have a utils.ts where we define the cn helper.
  • The app/tailwind.css file contains the global CSS.

Install Tailwind CSS

npm install -D tailwindcss@latest autoprefixer@latest

Then we create a postcss.config.js file:

postcss.config.js
export default {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}

And finally we add the following to our remix.config.js file:

remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
export default {
  ...
  tailwind: true,
  postcss: true,
  ...
};

Add tailwind.css to your app

In your app/root.tsx file, import the tailwind.css file:

app/root.tsx
import styles from "./tailwind.css?url"

export const links: LinksFunction = () => [
  { rel: "stylesheet", href: styles },
  ...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
]

That's it

The command above will add the Button component to your project. You can then import it like this:

app/routes/index.tsx
import { Button } from "~/components/ui/preskok-ui/button"

export default function Home() {
  return (
    <div>
      <Button>Click me</Button>
    </div>
  )
}

React Router

Install and configure Preskok UI for React Router.

Astro

Install and configure Preskok UI for Astro

On this page

Create project
Run the CLI
App structure
Install Tailwind CSS
Add tailwind.css to your app
That's it