-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
152 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<div className="flex w-full flex-wrap md:flex-nowrap mb-6 md:mb-0 gap-4"> | ||
<Textarea label="Description" placeholder="Enter your description (Default autosize)" /> | ||
<Textarea label="Description" minRows={2} placeholder="Enter your description (Min rows 2)" /> | ||
<Textarea label="Description" maxRows={3} placeholder="Enter your description (Max rows 3)" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
const [value, setValue] = React.useState(""); | ||
|
||
return ( | ||
<div className="w-full flex flex-col gap-2 max-w-[240px]"> | ||
<Textarea | ||
label="Description" | ||
labelPlacement="outside" | ||
placeholder="Enter your description" | ||
value={value} | ||
variant="underlined" | ||
onValueChange={setValue} | ||
/> | ||
<p className="text-default-500 text-small">Textarea value: {value}</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<Textarea | ||
className="max-w-xs" | ||
description="Enter a concise description of your project." | ||
label="Description" | ||
placeholder="Enter your description" | ||
variant="faded" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
apps/docs/content/components/textarea/disable-autosize.raw.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<Textarea | ||
disableAnimation | ||
disableAutosize | ||
classNames={{ | ||
base: "max-w-xs", | ||
input: "resize-y min-h-[40px]", | ||
}} | ||
label="Description" | ||
placeholder="Enter your description" | ||
variant="bordered" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<Textarea | ||
isDisabled | ||
className="max-w-xs" | ||
defaultValue="NextUI is a React UI library that provides a set of accessible, reusable, and beautiful components." | ||
label="Description" | ||
labelPlacement="outside" | ||
placeholder="Enter your description" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
apps/docs/content/components/textarea/error-message.raw.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<Textarea | ||
className="max-w-xs" | ||
defaultValue="NextUI is a React UI library with..." | ||
errorMessage="The description should be at least 255 characters long." | ||
isInvalid={true} | ||
label="Description" | ||
placeholder="Enter your description" | ||
variant="bordered" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<Textarea | ||
isReadOnly | ||
className="max-w-xs" | ||
defaultValue="NextUI is a React UI library that provides a set of accessible, reusable, and beautiful components." | ||
label="Description" | ||
labelPlacement="outside" | ||
placeholder="Enter your description" | ||
variant="bordered" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return ( | ||
<Textarea | ||
isRequired | ||
className="max-w-xs" | ||
label="Description" | ||
labelPlacement="outside" | ||
placeholder="Enter your description" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
return <Textarea className="max-w-xs" label="Description" placeholder="Enter your description" />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {Textarea} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
const variants = ["flat", "faded", "bordered", "underlined"]; | ||
|
||
return ( | ||
<div className="w-full grid grid-cols-12 gap-4"> | ||
{variants.map((variant) => ( | ||
<Textarea | ||
key={variant} | ||
className="col-span-12 md:col-span-6 mb-6 md:mb-0" | ||
label="Description" | ||
labelPlacement="outside" | ||
placeholder="Enter your description" | ||
variant={variant} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters