Skip to content

"use client" is added even when rsc=false in components.json #26267 #615

@carlosmfreitas2409

Description

@carlosmfreitas2409

Issue Summary

When rsc: false in components.json, the generated components still include the "use client" directive.

This behavior is unexpected because rsc: false should not inject "use client" automatically, as stated in: https://ui.shadcn.com/docs/components-json#rsc

Steps to Reproduce

  1. Configure components.json with:
{
  "rsc": false
}
  1. Install any Coss UI component (tested with Accordion);
  2. Check the generated file.

Actual Results

The generated component includes:

"use client"

Expected Results

When rsc: false is set, no "use client" should be added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions