@neynar/ui
Version:
React UI component library built on shadcn/ui and Tailwind CSS
113 lines (92 loc) • 2.27 kB
Markdown
# H2
**Type**: component
H2 - Secondary section heading component Section headings that divide page content into logical groups. Uses the "subheading" variant with h2 semantic element. Essential for creating proper document hierarchy.
## JSX Usage
```jsx
import { H2 } from '@neynar/ui';
<H2
color={value}
align={value}
transform={value}
weight={value}
htmlFor="value"
asChild={true}
italic={true}
underline={true}
strikethrough={true}
truncate={true}
srOnly={true}
className="value"
>
{/* Your content here */}
</H2>
```
## Component Props
### color
- **Type**: `| "default"
| "muted"
| "accent"
| "destructive"
| "success"
| "warning"`
- **Required**: No
- **Description**: No description available
### align
- **Type**: `"left" | "center" | "right" | "justify"`
- **Required**: No
- **Description**: No description available
### transform
- **Type**: `"uppercase" | "lowercase" | "capitalize"`
- **Required**: No
- **Description**: No description available
### weight
- **Type**: `"normal" | "medium" | "semibold" | "bold"`
- **Required**: No
- **Description**: No description available
### htmlFor
- **Type**: `string`
- **Required**: No
- **Description**: No description available
### asChild
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
### italic
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
### underline
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
### strikethrough
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
### truncate
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
### srOnly
- **Type**: `boolean`
- **Required**: No
- **Description**: No description available
### className
- **Type**: `string`
- **Required**: No
- **Description**: No description available
### children
- **Type**: `React.ReactNode`
- **Required**: No
- **Description**: No description available
## Examples
```tsx
// Section heading
<H2>Getting Started</H2>
// With accent color
<H2 color="accent">Featured Content</H2>
// With additional styling
<H2 weight="bold" className="border-b pb-2">
Section with Border
</H2>
```