Skip to content

Next UI doesn't fully support Astro? #1741

Answered by delaudio
dragonjay-lyj asked this question in Help
Discussion options

You must be logged in to vote

@dragonjay-lyj @scharf-dev you can solve it wrapping the Next UI component this way:

// NextCard.tsx
import { Button, Card, CardBody, CardHeader } from "@nextui-org/react";
import { useState } from "react";

export default function NextCard({ header }: { header: string }) {
  const [count, setCount] = useState(0);
  return (
    <Card className="py-4">
      <CardHeader className="pb-0 pt-2 px-4 flex-col items-start">
        <p className="text-tiny uppercase font-bold">{header}</p>
      </CardHeader>
      <CardBody className="overflow-visible py-2">
        <Button color="primary" onClick={() => setCount(count + 1)}>
          Button
        </Button>
        <p>Count: {count}</p>
      <

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@devendrap
Comment options

@nikhilk
Comment options

@delaudio
Comment options

Answer selected by dragonjay-lyj
Comment options

You must be logged in to vote
3 replies
@delaudio
Comment options

@Lidbetan
Comment options

@ampsu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
7 participants