Black Friday: 30% off Pro

Get 30% off

Updated

Magnetic FAQ

Pro

Preview

Customize

Strength14px
Radius180px
Scatter48px
Card width420px

Installation

Pro

Magnetic FAQ is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/magnetic-faq

Usage

import { MagneticFaq } from "@/components/uibrik/magnetic-faq/magnetic-faq";​const items = [  { question: "Is there a free plan?", answer: "Yes. Every component and its source is free. Pro adds full templates and priority support.", related: [6, 9] },  { question: "How do I install one?", answer: "Copy the file into your project, or run the add command from its page. Each one only needs Motion and Tailwind.", related: [5, 3] },  // …8 more];​<MagneticFaq  items={items}  strength={14}  radius={180}  scatter={48}  depth  trail  cardWidth={420}/>

Where to use Magnetic FAQ

  • Playful FAQ sections

    Question pills that lean toward the pointer invite visitors to explore answers.

    Pairs with Accordion

  • Creative product help

    Growing a pill into an answer card suits brands with a playful voice.

  • Short FAQs

    A cloud of six to ten questions fits on one screen without scrolling.

Props

MagneticFaq
strength
Type number
14
Furthest a pill moves toward the pointer.
radius
Type number
180
Distance from the pointer within which pills are pulled.
scatter
Type number
48
How far the other pills drift out while a card is open.
depth
Type boolean
true
Further pills are fainter and move less.
trail
Type boolean
true
Leave a dashed outline where the open card's pill sits.
cardWidth
Type number
420
Width of the open card; it never grows past the cloud.
itemsrequired
Type { question: string; answer: string; related?: number[] }[]
–
Questions and their answers. Keep questions short; they sit on one line. related lists the indexes kept sharp and clickable while this one is open.
className
Type string
–
Classes for the wrapper.