JGuang / JGuang UI

December 2023 - New Components

本页提供 JGuang UI 技术内容、中文导航与术语适配。

中文模式已适配导航、标题、简介、目录与常用章节名称。翻译状态:部分完成;技术正文目前仍为英文。

We've added new components to JGuang UI and made a lot of improvements to the CLI.

Here's a quick overview of what's new:

  • Carousel - A carousel component with motion, swipe gestures and keyboard support.
  • Drawer - A drawer component that looks amazing on mobile.
  • Pagination - A pagination component with page navigation, previous and next buttons.
  • Resizable - A resizable component for building resizable panel groups and layouts.
  • Sonner - The last toast component you'll ever need.
  • CLI updates - Support for custom Tailwind prefix and tailwind.config.ts.

We've added a fully featured carousel component with motion, swipe gestures and keyboard support. Built on top of Embla Carousel.

It has support for infinite looping, autoplay, vertical orientation, and more.

Component preview · Base UI
carousel-demo

Drawer

Oh the drawer component. Built on top of Vaul by emilkowalski.

Try opening the following drawer on mobile. It looks amazing!

Component preview · Base UI
drawer-demo

Pagination

We've added a pagination component with page navigation, previous and next buttons. Simple, flexible and works with your framework's `` component.

Component preview · Base UI
pagination-demo

Resizable

Build resizable panel groups and layouts with this `` component.

Component preview · Base UI
resizable-demo-with-handle

`` is built using react-resizable-panels by bvaughn. It has support for mouse, touch and keyboard.

Sonner

Another one by emilkowalski. The last toast component you'll ever need. Sonner is now available in JGuang UI.

Component preview · Base UI
sonner-demo

CLI updates

This has been one of the most requested features. You can now configure a custom Tailwind prefix and the cli will automatically prefix your utility classes when adding components.

This means you can now easily add JGuang UI components to existing projects like Docusaurus, Nextra...etc. A drop-in for your existing design system with no conflict.

<AlertDialog className="tw-grid tw-gap-4 tw-border tw-bg-background tw-shadow-lg" />

It works with cn, cva and CSS variables.

The cli can now also detect tailwind.config.ts and add the TypeScript version of the config for you.

That's it. Happy Holidays.

来源: changelog/2023-12-new-components.mdx

JGuang UI 技术文档。

On this page