UNPKG

@neynar/ui

Version:

React UI component library built on shadcn/ui and Tailwind CSS

113 lines (92 loc) 2.27 kB
# H1 **Type**: component H1 - Primary page heading component The main heading for a page or major section. Uses the "heading" variant with h1 semantic element. Should be used once per page for proper document outline and SEO. ## JSX Usage ```jsx import { H1 } from '@neynar/ui'; <H1 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 */} </H1> ``` ## 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 // Page title <H1>Welcome to Neynar Platform</H1> // With color variant <H1 color="muted">Draft: Article Title</H1> // With custom styling <H1 align="center" className="mb-8"> Centered Page Heading </H1> ```