@neynar/ui 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Type**: component
4
4
 
5
- Blockquote - Quoted text component for citations and excerpts Semantic blockquote element for extended quotations, testimonials, and excerpts. Features italic styling and left border for visual distinction.
5
+ Blockquote - Quoted text component Semantic blockquote element for extended quotations and excerpts. Features italic styling and left border for visual distinction. Defaults to blockquote element.
6
6
 
7
7
  ## JSX Usage
8
8
 
@@ -10,17 +10,7 @@ Blockquote - Quoted text component for citations and excerpts Semantic blockquot
10
10
  import { Blockquote } from '@neynar/ui';
11
11
 
12
12
  <Blockquote
13
- color={value}
14
- align={value}
15
- transform={value}
16
- weight={value}
17
- htmlFor="value"
18
- asChild={true}
19
- italic={true}
20
- underline={true}
21
- strikethrough={true}
22
- truncate={true}
23
- srOnly={true}
13
+ as={value}
24
14
  className="value"
25
15
  >
26
16
  {/* Your content here */}
@@ -29,70 +19,20 @@ import { Blockquote } from '@neynar/ui';
29
19
 
30
20
  ## Component Props
31
21
 
32
- ### color
33
- - **Type**: `TypographyColor`
22
+ ### as
23
+ - **Type**: `React.ElementType`
34
24
  - **Required**: No
35
- - **Description**: No description available
36
-
37
- ### align
38
- - **Type**: `"left" | "center" | "right" | "justify"`
39
- - **Required**: No
40
- - **Description**: No description available
41
-
42
- ### transform
43
- - **Type**: `"uppercase" | "lowercase" | "capitalize"`
44
- - **Required**: No
45
- - **Description**: No description available
46
-
47
- ### weight
48
- - **Type**: `"normal" | "medium" | "semibold" | "bold"`
49
- - **Required**: No
50
- - **Description**: No description available
51
-
52
- ### htmlFor
53
- - **Type**: `string`
54
- - **Required**: No
55
- - **Description**: No description available
56
-
57
- ### asChild
58
- - **Type**: `boolean`
59
- - **Required**: No
60
- - **Description**: No description available
61
-
62
- ### italic
63
- - **Type**: `boolean`
64
- - **Required**: No
65
- - **Description**: No description available
66
-
67
- ### underline
68
- - **Type**: `boolean`
69
- - **Required**: No
70
- - **Description**: No description available
71
-
72
- ### strikethrough
73
- - **Type**: `boolean`
74
- - **Required**: No
75
- - **Description**: No description available
76
-
77
- ### truncate
78
- - **Type**: `boolean`
79
- - **Required**: No
80
- - **Description**: No description available
81
-
82
- ### srOnly
83
- - **Type**: `boolean`
84
- - **Required**: No
85
- - **Description**: No description available
25
+ - **Description**: HTML element to render
86
26
 
87
27
  ### className
88
28
  - **Type**: `string`
89
29
  - **Required**: No
90
- - **Description**: No description available
30
+ - **Description**: Additional Tailwind classes
91
31
 
92
32
  ### children
93
33
  - **Type**: `React.ReactNode`
94
34
  - **Required**: No
95
- - **Description**: No description available
35
+ - **Description**: Content to render
96
36
 
97
37
  ## Examples
98
38
 
@@ -103,15 +43,13 @@ import { Blockquote } from '@neynar/ui';
103
43
  </Blockquote>
104
44
  // With attribution
105
45
  <div>
106
- <Blockquote className="mb-2">
107
- "Building great products requires deep understanding of user needs
108
- and technical excellence in equal measure."
46
+ <Blockquote>
47
+ "Building great products requires deep understanding of user needs."
109
48
  </Blockquote>
110
- <Small>— Product Engineering Team</Small>
49
+ <Caption className="mt-2">— Product Team</Caption>
111
50
  </div>
112
- // Customer testimonial
113
- <Blockquote color="muted" className="bg-muted/50 p-4 rounded-lg">
114
- "Neynar's APIs have transformed how we build social features.
115
- The developer experience is exceptional."
51
+ // Custom styling
52
+ <Blockquote className="bg-muted/50 p-4 rounded-lg">
53
+ Customer testimonial or feedback.
116
54
  </Blockquote>
117
55
  ```
@@ -0,0 +1,49 @@
1
+ # BodyTextLarge
2
+
3
+ **Type**: component
4
+
5
+ BodyTextLarge - Emphasized body text component Larger body text for lead paragraphs and emphasized content. Uses text-lg (18px) with relaxed line height. Defaults to p element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { BodyTextLarge } from '@neynar/ui';
11
+
12
+ <BodyTextLarge
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </BodyTextLarge>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Lead paragraph
41
+ <BodyTextLarge>
42
+ This is a lead paragraph that introduces the main content.
43
+ </BodyTextLarge>
44
+ // Emphasized content
45
+ <BodyTextLarge className="font-medium text-accent">
46
+ Important announcement text.
47
+ </BodyTextLarge>
48
+ ```
49
+ /
@@ -0,0 +1,49 @@
1
+ # BodyTextSmall
2
+
3
+ **Type**: component
4
+
5
+ BodyTextSmall - De-emphasized body text component Smaller body text for less prominent content. Uses text-sm (14px) with normal line height. Defaults to p element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { BodyTextSmall } from '@neynar/ui';
11
+
12
+ <BodyTextSmall
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </BodyTextSmall>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Small body text
41
+ <BodyTextSmall>
42
+ This is smaller, less prominent body text.
43
+ </BodyTextSmall>
44
+ // Helper text
45
+ <BodyTextSmall className="text-muted-foreground">
46
+ Additional context or helper information.
47
+ </BodyTextSmall>
48
+ ```
49
+ /
@@ -0,0 +1,52 @@
1
+ # BodyText
2
+
3
+ **Type**: component
4
+
5
+ BodyText - Primary paragraph text component Standard paragraph element for readable body text. Uses text-base (16px) with relaxed line height for optimal readability. Defaults to p element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { BodyText } from '@neynar/ui';
11
+
12
+ <BodyText
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </BodyText>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Default usage
41
+ <BodyText>
42
+ This is standard body text that provides information to the user.
43
+ </BodyText>
44
+ // With custom styling
45
+ <BodyText className="text-muted-foreground">
46
+ Secondary information with reduced visual prominence.
47
+ </BodyText>
48
+ // As different element
49
+ <BodyText as="div">
50
+ Body text in a div container.
51
+ </BodyText>
52
+ ```
@@ -0,0 +1,48 @@
1
+ # Caption
2
+
3
+ **Type**: component
4
+
5
+ Caption - Small supplementary text component Small text for metadata, timestamps, and supplementary information. Uses text-sm (14px) with muted color. Defaults to span element for inline usage.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { Caption } from '@neynar/ui';
11
+
12
+ <Caption
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </Caption>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Timestamp
41
+ <Caption>Last updated 2 minutes ago</Caption>
42
+ // Image caption
43
+ <Caption>Figure 1: System architecture diagram</Caption>
44
+ // Metadata
45
+ <Caption className="block mt-2">
46
+ Created by John Doe on Jan 15, 2025
47
+ </Caption>
48
+ ```
package/.llm/code.llm.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Type**: component
4
4
 
5
- Code - Inline code component for technical content Semantic code element for inline code snippets, variable names, and technical references. Uses monospace font and "code" variant for clear distinction from regular text.
5
+ Code - Inline code component Monospace text for inline code snippets and technical references. Uses text-sm with monospace font and subtle background. Defaults to code element.
6
6
 
7
7
  ## JSX Usage
8
8
 
@@ -10,17 +10,7 @@ Code - Inline code component for technical content Semantic code element for inl
10
10
  import { Code } from '@neynar/ui';
11
11
 
12
12
  <Code
13
- color={value}
14
- align={value}
15
- transform={value}
16
- weight={value}
17
- htmlFor="value"
18
- asChild={true}
19
- italic={true}
20
- underline={true}
21
- strikethrough={true}
22
- truncate={true}
23
- srOnly={true}
13
+ as={value}
24
14
  className="value"
25
15
  >
26
16
  {/* Your content here */}
@@ -29,75 +19,27 @@ import { Code } from '@neynar/ui';
29
19
 
30
20
  ## Component Props
31
21
 
32
- ### color
33
- - **Type**: `TypographyColor`
22
+ ### as
23
+ - **Type**: `React.ElementType`
34
24
  - **Required**: No
35
- - **Description**: No description available
36
-
37
- ### align
38
- - **Type**: `"left" | "center" | "right" | "justify"`
39
- - **Required**: No
40
- - **Description**: No description available
41
-
42
- ### transform
43
- - **Type**: `"uppercase" | "lowercase" | "capitalize"`
44
- - **Required**: No
45
- - **Description**: No description available
46
-
47
- ### weight
48
- - **Type**: `"normal" | "medium" | "semibold" | "bold"`
49
- - **Required**: No
50
- - **Description**: No description available
51
-
52
- ### htmlFor
53
- - **Type**: `string`
54
- - **Required**: No
55
- - **Description**: No description available
56
-
57
- ### asChild
58
- - **Type**: `boolean`
59
- - **Required**: No
60
- - **Description**: No description available
61
-
62
- ### italic
63
- - **Type**: `boolean`
64
- - **Required**: No
65
- - **Description**: No description available
66
-
67
- ### underline
68
- - **Type**: `boolean`
69
- - **Required**: No
70
- - **Description**: No description available
71
-
72
- ### strikethrough
73
- - **Type**: `boolean`
74
- - **Required**: No
75
- - **Description**: No description available
76
-
77
- ### truncate
78
- - **Type**: `boolean`
79
- - **Required**: No
80
- - **Description**: No description available
81
-
82
- ### srOnly
83
- - **Type**: `boolean`
84
- - **Required**: No
85
- - **Description**: No description available
25
+ - **Description**: HTML element to render
86
26
 
87
27
  ### className
88
28
  - **Type**: `string`
89
29
  - **Required**: No
90
- - **Description**: No description available
30
+ - **Description**: Additional Tailwind classes
91
31
 
92
32
  ### children
93
33
  - **Type**: `React.ReactNode`
94
34
  - **Required**: No
95
- - **Description**: No description available
35
+ - **Description**: Content to render
96
36
 
97
37
  ## Examples
98
38
 
99
39
  ```tsx
100
- // Inline code snippet
40
+ // Inline code
101
41
  <Code>const message = "Hello, world!";</Code>
42
+ // Variable reference
43
+ <p>Set the <Code>API_KEY</Code> environment variable.</p>
102
44
  // Terminal command
103
- <Code color="muted">npm install
45
+ <Code className="bg-accent">npm install
@@ -0,0 +1,51 @@
1
+ # Overline
2
+
3
+ **Type**: component
4
+
5
+ Overline - Small uppercase label component Small uppercase text for category tags and eyebrow labels. Uses text-xs (12px) with uppercase transformation and wide tracking. Defaults to span element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { Overline } from '@neynar/ui';
11
+
12
+ <Overline
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </Overline>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Category label
41
+ <Overline>Featured</Overline>
42
+ // Section eyebrow
43
+ <Overline className="text-accent-foreground">
44
+ New Feature
45
+ </Overline>
46
+ // Tag
47
+ <Overline className="bg-accent px-2 py-1 rounded">
48
+ Beta
49
+ </Overline>
50
+ ```
51
+ /
@@ -0,0 +1,52 @@
1
+ # PageTitle
2
+
3
+ **Type**: component
4
+
5
+ PageTitle - Primary page heading component The main heading for a page, typically used once per page. Uses text-3xl (30px) which is appropriate for web application page titles. Defaults to h1 element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { PageTitle } from '@neynar/ui';
11
+
12
+ <PageTitle
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </PageTitle>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes (e.g., "text-4xl text-accent")
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Default usage
41
+ <PageTitle>User Dashboard</PageTitle>
42
+ // With custom styling
43
+ <PageTitle className="text-4xl text-accent">
44
+ Custom Styled Title
45
+ </PageTitle>
46
+ // As different element
47
+ <PageTitle as="h2">Section Title as H2</PageTitle>
48
+ // Responsive sizing
49
+ <PageTitle className="text-2xl md:text-3xl lg:text-4xl">
50
+ Responsive Title
51
+ </PageTitle>
52
+ ```