Installation
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
authorName | string | "Dorian" | Author display name |
authorHandle | string | "dorianbaffier" | Twitter handle (without @) |
authorImage | string | - | URL to author profile image |
content | string[] | - | Array of content paragraphs |
isVerified | boolean | true | Show verification badge |
timestamp | string | "Jan 18, 2025" | Tweet timestamp |
reply | ReplyProps | - | Optional reply object |
ReplyProps Interface
Features
- Glassmorphism Design: Multi-layer blur and gradients
- Verified Badge: Blue checkmark for verified accounts
- Thread Support: Display replies in-line
- Hover Effects: Subtle opacity changes
- X Logo Button: Interactive X icon
- Responsive Layout: Adapts to container
- Link Integration: Wraps in Next.js Link component
- Dark Mode: Optimized for both themes
Example with Reply
Styling Breakdown
Outer Container
Inner Card
Hover Effect
Layout Structure
- Outer Wrapper: Glass effect container with padding
- Inner Card: Gradient overlay with border
- Header: Profile image, name, handle, X button
- Content: Multi-line text content
- Timestamp: Bottom timestamp
- Reply Section: Optional bordered reply thread
Customization Tips
Remove Reply
Single Line Content
Custom Link
Modify the Link component’s href:Icon Details
X Logo SVG
- Size: 16x16px (4x4 Tailwind units)
- Color: Inherits from parent (currentColor)
- Viewbox: 0 0 1200 1227
- Hover: Background color change
Verified Badge
- Component:
VerifiedIconfrom lucide-react - Size: 16x16px
- Color: Blue-400
- Position: Next to author name
Dependencies
lucide-react(VerifiedIcon)next/link@/lib/utils(cn helper)
Accessibility
- Semantic HTML structure
- Alt text on profile images
- Button type attributes
- Keyboard navigation support
- Focus visible states