Skip to content

[bug] (docs): Astro installation guide uses className instead of class #8165

@ibnkhayatmed

Description

@ibnkhayatmed

Describe the bug

The Astro installation documentation at Astro - shadcn/ui contains incorrect HTML syntax in the example code

The documentation shows code intended for an .astro file but incorrectly uses className (React/JSX syntax) instead of class (HTML standard syntax)

In the example code block for src/pages/index.astro, line 15 uses className="grid place-items-center h-screen content-center" but should use class="grid place-items-center h-screen content-center"

Affected component/components

Documentation (Installation guide)

How to reproduce

  1. Go to https://ui.shadcn.com/docs/installation/astro
  2. Follow the installation guide
  3. Copy the example code from the documentation
  4. Paste it into an .astro file
  5. Try to run the Astro project
  6. The className attribute will not be recognized and styling will not be applied correctly

Expected behavior: The code should work as documented
Actual behavior: The className attribute is not valid in .astro files

System Info

- Browser: Any
- OS: Any  
- Astro: Any version
- Issue affects: Documentation only

Before submitting

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions