Skip to content

[feat]: Registry CSS imports option #7943

@alexcarpenter

Description

@alexcarpenter

Feature description

We are looking to distribute some of Clerks UI components using the registry along with our shadcn theme.
Here is the theme file for reference https://github.com/clerk/javascript/blob/main/packages/themes/src/themes/shadcn.ts

We map shadcn variables to clerk variables, and attach a few TW classes within elements to create parity with shadcn components.

We also ship a css file that sources the theme to ensure TW picks up the classes within elements. https://github.com/clerk/javascript/blob/main/packages/themes/src/themes/shadcn.css

@import "tailwindcss";
@import "@clerk/themes/shadcn.css"

It would be handy to be able to specify CSS imports within a registry item.

"css": {
  "@import": ["@clerk/themes/shadcn.css"]
}

Which would add the CSS import within the globals.css, similar to how the other CSS options work.

@import "tailwindcss";
@import "@clerk/themes/shadcn.css"

Affected component/components

No response

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions