faqs-2
fulldev-ui/faqs-2FreeBlock
fulldev/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by fulldev/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.full.dev/r/faqs-2.jsonSource
1---2import { cn } from "@/lib/utils"3import {4 Accordion,5 AccordionContent,6 AccordionItem,7 AccordionTrigger,8} from "@/components/ui/accordion"9import { Button } from "@/components/ui/button"10import { Section, SectionContainer } from "@/components/ui/section"1112type Props = {13 class?: string14 title: string15 description: string16 faqs: {17 id: string18 question: string19 answer: string20 }[]21 buttons?: {22 label: string23 href: string24 variant?: "default" | "outline" | "secondary" | "ghost"25 }[]26}2728const { class: className, title, description, faqs, buttons } = Astro.props29---3031<Section class={cn("", className)}>32 <SectionContainer>33 <div34 class="grid gap-12 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.5fr)] lg:gap-16"35 >36 <div class="lg:sticky lg:top-24 lg:self-start">37 <h238 class="text-foreground text-3xl font-semibold tracking-tight text-balance sm:text-4xl"39 >40 {title}41 </h2>42 <p43 class="text-muted-foreground mt-4 text-base leading-relaxed text-balance"44 >45 {description}46 </p>47 {48 buttons?.length && (49 <div class="mt-8 flex flex-wrap gap-3">50 {buttons.map(({ href, label, ...button }, index) => (51 <Button52 as="a"53 href={href}54 size="lg"55 variant={56 button.variant ?? (index === 0 ? "default" : "secondary")57 }58 {...button}59 >60 {label}61 </Button>62 ))}63 </div>64 )65 }66 </div>6768 <div>69 <Accordion collapsible>70 {71 faqs.map((item) => (72 <AccordionItem value={item.id}>73 <AccordionTrigger>{item.question}</AccordionTrigger>74 <AccordionContent>{item.answer}</AccordionContent>75 </AccordionItem>76 ))77 }78 </Accordion>79 </div>80 </div>81 </SectionContainer>82</Section>
What it pulls in
Other registry items
Files it writes
More from fulldev/ui
All 144 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| article-1article-1 | fulldev/ui | Blocks | Free | no deps | |
| article-2article-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-1articles-1 | fulldev/ui | Blocks | Free | no deps | |
| articles-2articles-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-3articles-3 | fulldev/ui | Blocks | Free | no deps | |
| articles-4articles-4 | fulldev/ui | Blocks | Free | no deps | |
| banner-1banner-1 | fulldev/ui | Blocks | Free | no deps | |
| banner-2banner-2 | fulldev/ui | Blocks | Free | no deps |
