diff --git a/apps/docs/content/components/input/clear-button.raw.jsx b/apps/docs/content/components/input/clear-button.raw.jsx
new file mode 100644
index 0000000000..c2fea3d79b
--- /dev/null
+++ b/apps/docs/content/components/input/clear-button.raw.jsx
@@ -0,0 +1,17 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+ console.log("input cleared")}
+ />
+ );
+}
diff --git a/apps/docs/content/components/input/clear-button.ts b/apps/docs/content/components/input/clear-button.ts
index 892ea1dd45..f84fe2f74e 100644
--- a/apps/docs/content/components/input/clear-button.ts
+++ b/apps/docs/content/components/input/clear-button.ts
@@ -1,19 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
- console.log("input cleared")}
- className="max-w-xs"
- />
- );
-}`;
+import App from "./clear-button.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/colors.raw.jsx b/apps/docs/content/components/input/colors.raw.jsx
new file mode 100644
index 0000000000..f1dd7e6e5b
--- /dev/null
+++ b/apps/docs/content/components/input/colors.raw.jsx
@@ -0,0 +1,21 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const colors = ["default", "primary", "secondary", "success", "warning", "danger"];
+
+ return (
+
+ {colors.map((color) => (
+
+ ))}
+
+ );
+}
diff --git a/apps/docs/content/components/input/colors.ts b/apps/docs/content/components/input/colors.ts
index 40885df2c1..d5bef810aa 100644
--- a/apps/docs/content/components/input/colors.ts
+++ b/apps/docs/content/components/input/colors.ts
@@ -1,31 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- const colors = [
- "default",
- "primary",
- "secondary",
- "success",
- "warning",
- "danger",
- ];
-
- return (
-
- {colors.map((color) => (
-
- ))}
-
- );
-}`;
+import App from "./colors.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/controlled.raw.jsx b/apps/docs/content/components/input/controlled.raw.jsx
new file mode 100644
index 0000000000..7cb97a37be
--- /dev/null
+++ b/apps/docs/content/components/input/controlled.raw.jsx
@@ -0,0 +1,12 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const [value, setValue] = React.useState("");
+
+ return (
+
+
+
Input value: {value}
+
+ );
+}
diff --git a/apps/docs/content/components/input/controlled.ts b/apps/docs/content/components/input/controlled.ts
index 7c923292b9..2c3f0cacb4 100644
--- a/apps/docs/content/components/input/controlled.ts
+++ b/apps/docs/content/components/input/controlled.ts
@@ -1,20 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- const [value, setValue] = React.useState("");
-
- return (
-
-
-
Input value: {value}
-
- );
-}`;
+import App from "./controlled.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/custom-impl.raw.jsx b/apps/docs/content/components/input/custom-impl.raw.jsx
new file mode 100644
index 0000000000..9a75192076
--- /dev/null
+++ b/apps/docs/content/components/input/custom-impl.raw.jsx
@@ -0,0 +1,162 @@
+import React, {forwardRef} from "react";
+import {useInput} from "@nextui-org/react";
+
+export const SearchIcon = (props) => {
+ return (
+
+ );
+};
+
+export const CloseFilledIcon = (props) => {
+ return (
+
+ );
+};
+
+const styles = {
+ label: "text-black/50 dark:text-white/90",
+ input: [
+ "bg-transparent",
+ "text-black/90 dark:text-white/90",
+ "placeholder:text-default-700/50 dark:placeholder:text-white/60",
+ ],
+ innerWrapper: "bg-transparent",
+ inputWrapper: [
+ "shadow-xl",
+ "bg-default-200/50",
+ "dark:bg-default/60",
+ "backdrop-blur-xl",
+ "backdrop-saturate-200",
+ "hover:bg-default-200/70",
+ "focus-within:!bg-default-200/50",
+ "dark:hover:bg-default/70",
+ "dark:focus-within:!bg-default/60",
+ "!cursor-text",
+ ],
+};
+
+const MyInput = forwardRef((props, ref) => {
+ const {
+ Component,
+ label,
+ domRef,
+ description,
+ isClearable,
+ startContent,
+ endContent,
+ shouldLabelBeOutside,
+ shouldLabelBeInside,
+ errorMessage,
+ getBaseProps,
+ getLabelProps,
+ getInputProps,
+ getInnerWrapperProps,
+ getInputWrapperProps,
+ getDescriptionProps,
+ getErrorMessageProps,
+ getClearButtonProps,
+ } = useInput({
+ ...props,
+ ref,
+ // this is just for the example, the props bellow should be passed by the parent component
+ label: "Search",
+ type: "search",
+ placeholder: "Type to search...",
+ startContent: (
+
+ ),
+ // custom styles
+ classNames: {
+ ...styles,
+ },
+ });
+
+ const labelContent = ;
+
+ const end = React.useMemo(() => {
+ if (isClearable) {
+ return {endContent || };
+ }
+
+ return endContent;
+ }, [isClearable, getClearButtonProps]);
+
+ const innerWrapper = React.useMemo(() => {
+ if (startContent || end) {
+ return (
+
+ {startContent}
+
+ {end}
+
+ );
+ }
+
+ return ;
+ }, [startContent, end, getInputProps, getInnerWrapperProps]);
+
+ return (
+
+
+ {shouldLabelBeOutside ? labelContent : null}
+ {
+ domRef.current?.focus();
+ }}
+ onKeyDown={() => {
+ domRef.current?.focus();
+ }}
+ >
+ {shouldLabelBeInside ? labelContent : null}
+ {innerWrapper}
+
+ {description && {description}
}
+ {errorMessage && {errorMessage}
}
+
+
+ );
+});
+
+MyInput.displayName = "MyInput";
+
+export default MyInput;
diff --git a/apps/docs/content/components/input/custom-impl.ts b/apps/docs/content/components/input/custom-impl.ts
index 8fb99cecdb..ab37512cec 100644
--- a/apps/docs/content/components/input/custom-impl.ts
+++ b/apps/docs/content/components/input/custom-impl.ts
@@ -1,164 +1,7 @@
-const SearchIcon = `export const SearchIcon = (props) => (
-
-);`;
-
-const CloseFilledIcon = `export const CloseFilledIcon = (props) => (
-
-);`;
-
-const App = `import React, {forwardRef} from "react";
-import {useInput} from "@nextui-org/react";
-import {SearchIcon} from "./SearchIcon";
-import {CloseFilledIcon} from "./CloseFilledIcon";
-
-const styles = {
- label: "text-black/50 dark:text-white/90",
- input: [
- "bg-transparent",
- "text-black/90 dark:text-white/90",
- "placeholder:text-default-700/50 dark:placeholder:text-white/60",
- ],
- innerWrapper: "bg-transparent",
- inputWrapper: [
- "shadow-xl",
- "bg-default-200/50",
- "dark:bg-default/60",
- "backdrop-blur-xl",
- "backdrop-saturate-200",
- "hover:bg-default-200/70",
- "focus-within:!bg-default-200/50",
- "dark:hover:bg-default/70",
- "dark:focus-within:!bg-default/60",
- "!cursor-text",
- ],
-};
-
-const MyInput = forwardRef((props, ref) => {
- const {
- Component,
- label,
- domRef,
- description,
- isClearable,
- startContent,
- endContent,
- shouldLabelBeOutside,
- shouldLabelBeInside,
- errorMessage,
- getBaseProps,
- getLabelProps,
- getInputProps,
- getInnerWrapperProps,
- getInputWrapperProps,
- getDescriptionProps,
- getErrorMessageProps,
- getClearButtonProps,
- } = useInput({
- ...props,
- ref,
- // this is just for the example, the props bellow should be passed by the parent component
- label: "Search",
- type: "search",
- placeholder: "Type to search...",
- startContent: (
-
- ),
- // custom styles
- classNames: {
- ...styles,
- },
- });
-
- const labelContent = ;
-
- const end = React.useMemo(() => {
- if (isClearable) {
- return {endContent || };
- }
-
- return endContent;
- }, [isClearable, getClearButtonProps]);
-
- const innerWrapper = React.useMemo(() => {
- if (startContent || end) {
- return (
-
- {startContent}
-
- {end}
-
- );
- }
-
- return ;
- }, [startContent, end, getInputProps, getInnerWrapperProps]);
-
- return (
-
-
- {shouldLabelBeOutside ? labelContent : null}
- {
- domRef.current?.focus();
- }}
- >
- {shouldLabelBeInside ? labelContent : null}
- {innerWrapper}
-
- {description && {description}
}
- {errorMessage && {errorMessage}
}
-
-
- );
-});
-
-MyInput.displayName = "MyInput";
-
-export default MyInput;`;
+import App from "./custom-impl.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/SearchIcon.jsx": SearchIcon,
- "/CloseFilledIcon.jsx": CloseFilledIcon,
};
export default {
diff --git a/apps/docs/content/components/input/custom-styles.raw.jsx b/apps/docs/content/components/input/custom-styles.raw.jsx
new file mode 100644
index 0000000000..98c11c99bb
--- /dev/null
+++ b/apps/docs/content/components/input/custom-styles.raw.jsx
@@ -0,0 +1,68 @@
+import {Input} from "@nextui-org/react";
+
+export const SearchIcon = (props) => {
+ return (
+
+ );
+};
+
+export default function App() {
+ return (
+
+
+ }
+ />
+
+ );
+}
diff --git a/apps/docs/content/components/input/custom-styles.ts b/apps/docs/content/components/input/custom-styles.ts
index 3908b17561..da3ea9093a 100644
--- a/apps/docs/content/components/input/custom-styles.ts
+++ b/apps/docs/content/components/input/custom-styles.ts
@@ -1,74 +1,7 @@
-const SearchIcon = `export const SearchIcon = (props) => (
-
-);`;
-
-const App = `import {Input} from "@nextui-org/react";
-import {SearchIcon} from "./SearchIcon";
-
-export default function App() {
- return (
-
-
- }
- />
-
- );
-}`;
+import App from "./custom-styles.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/SearchIcon.jsx": SearchIcon,
};
export default {
diff --git a/apps/docs/content/components/input/description.raw.jsx b/apps/docs/content/components/input/description.raw.jsx
new file mode 100644
index 0000000000..3362ef3dcd
--- /dev/null
+++ b/apps/docs/content/components/input/description.raw.jsx
@@ -0,0 +1,13 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/description.ts b/apps/docs/content/components/input/description.ts
index 8a286b3692..aeb6340b6b 100644
--- a/apps/docs/content/components/input/description.ts
+++ b/apps/docs/content/components/input/description.ts
@@ -1,16 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./description.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/disabled.raw.jsx b/apps/docs/content/components/input/disabled.raw.jsx
new file mode 100644
index 0000000000..6ed57cee8d
--- /dev/null
+++ b/apps/docs/content/components/input/disabled.raw.jsx
@@ -0,0 +1,13 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/disabled.ts b/apps/docs/content/components/input/disabled.ts
index f3122337c3..1a215cc91f 100644
--- a/apps/docs/content/components/input/disabled.ts
+++ b/apps/docs/content/components/input/disabled.ts
@@ -1,16 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./disabled.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/error-message.raw.jsx b/apps/docs/content/components/input/error-message.raw.jsx
new file mode 100644
index 0000000000..d8f0f19f5c
--- /dev/null
+++ b/apps/docs/content/components/input/error-message.raw.jsx
@@ -0,0 +1,15 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/error-message.ts b/apps/docs/content/components/input/error-message.ts
index 8ed295e659..fb8101b132 100644
--- a/apps/docs/content/components/input/error-message.ts
+++ b/apps/docs/content/components/input/error-message.ts
@@ -1,18 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./error-message.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/label-placements.raw.jsx b/apps/docs/content/components/input/label-placements.raw.jsx
new file mode 100644
index 0000000000..01c6692667
--- /dev/null
+++ b/apps/docs/content/components/input/label-placements.raw.jsx
@@ -0,0 +1,39 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const placements = ["inside", "outside", "outside-left"];
+
+ return (
+
+
+
Without placeholder
+
+ {placements.map((placement) => (
+
+ ))}
+
+
+
+
With placeholder
+
+ {placements.map((placement) => (
+
+ ))}
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/input/label-placements.ts b/apps/docs/content/components/input/label-placements.ts
index f37fc6cf78..cd2a65d352 100644
--- a/apps/docs/content/components/input/label-placements.ts
+++ b/apps/docs/content/components/input/label-placements.ts
@@ -1,46 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- const placements = [
- "inside",
- "outside",
- "outside-left",
- ];
-
- return (
-
-
-
Without placeholder
-
- {placements.map((placement) => (
-
- ))}
-
-
-
-
With placeholder
-
- {placements.map((placement) => (
-
- ))}
-
-
-
- );
-}`;
+import App from "./label-placements.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/password.raw.jsx b/apps/docs/content/components/input/password.raw.jsx
new file mode 100644
index 0000000000..e8aa0025cd
--- /dev/null
+++ b/apps/docs/content/components/input/password.raw.jsx
@@ -0,0 +1,91 @@
+import {Input} from "@nextui-org/react";
+
+export const EyeSlashFilledIcon = (props) => {
+ return (
+
+ );
+};
+
+export const EyeFilledIcon = (props) => {
+ return (
+
+ );
+};
+
+export default function App() {
+ const [isVisible, setIsVisible] = React.useState(false);
+
+ const toggleVisibility = () => setIsVisible(!isVisible);
+
+ return (
+
+ {isVisible ? (
+
+ ) : (
+
+ )}
+
+ }
+ label="Password"
+ placeholder="Enter your password"
+ type={isVisible ? "text" : "password"}
+ variant="bordered"
+ />
+ );
+}
diff --git a/apps/docs/content/components/input/password.ts b/apps/docs/content/components/input/password.ts
index 02822deb75..7751eaf935 100644
--- a/apps/docs/content/components/input/password.ts
+++ b/apps/docs/content/components/input/password.ts
@@ -1,92 +1,7 @@
-const EyeSlashFilledIcon = `export const EyeSlashFilledIcon = (props) => (
-
-);`;
-
-const EyeFilledIcon = `export const EyeFilledIcon = (props) => (
-
-);`;
-
-const App = `import {Input} from "@nextui-org/react";
-import {EyeFilledIcon} from "./EyeFilledIcon";
-import {EyeSlashFilledIcon} from "./EyeSlashFilledIcon";
-
-export default function App() {
- const [isVisible, setIsVisible] = React.useState(false);
-
- const toggleVisibility = () => setIsVisible(!isVisible);
-
- return (
-
- {isVisible ? (
-
- ) : (
-
- )}
-
- }
- type={isVisible ? "text" : "password"}
- className="max-w-xs"
- />
- );
-}`;
+import App from "./password.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/EyeSlashFilledIcon.jsx": EyeSlashFilledIcon,
- "/EyeFilledIcon.jsx": EyeFilledIcon,
};
export default {
diff --git a/apps/docs/content/components/input/radius.raw.jsx b/apps/docs/content/components/input/radius.raw.jsx
new file mode 100644
index 0000000000..cf85ff22f2
--- /dev/null
+++ b/apps/docs/content/components/input/radius.raw.jsx
@@ -0,0 +1,21 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const radius = ["full", "lg", "md", "sm", "none"];
+
+ return (
+
+ {radius.map((r) => (
+
+ ))}
+
+ );
+}
diff --git a/apps/docs/content/components/input/radius.ts b/apps/docs/content/components/input/radius.ts
index 13eaba44b0..7b78db1ce0 100644
--- a/apps/docs/content/components/input/radius.ts
+++ b/apps/docs/content/components/input/radius.ts
@@ -1,30 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- const radius = [
- "full",
- "lg",
- "md",
- "sm",
- "none",
- ];
-
- return (
-
- {radius.map((r) => (
-
- ))}
-
- );
-}`;
+import App from "./radius.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/readonly.raw.jsx b/apps/docs/content/components/input/readonly.raw.jsx
new file mode 100644
index 0000000000..50cb471ded
--- /dev/null
+++ b/apps/docs/content/components/input/readonly.raw.jsx
@@ -0,0 +1,14 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/readonly.ts b/apps/docs/content/components/input/readonly.ts
index 7e9bf99da4..fabd05ba36 100644
--- a/apps/docs/content/components/input/readonly.ts
+++ b/apps/docs/content/components/input/readonly.ts
@@ -1,17 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./readonly.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/regex-validation.raw.jsx b/apps/docs/content/components/input/regex-validation.raw.jsx
new file mode 100644
index 0000000000..64e06b69c7
--- /dev/null
+++ b/apps/docs/content/components/input/regex-validation.raw.jsx
@@ -0,0 +1,27 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const [value, setValue] = React.useState("junior2nextui.org");
+
+ const validateEmail = (value) => value.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i);
+
+ const isInvalid = React.useMemo(() => {
+ if (value === "") return false;
+
+ return validateEmail(value) ? false : true;
+ }, [value]);
+
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/regex-validation.ts b/apps/docs/content/components/input/regex-validation.ts
index 1eb62d8e2b..395d689b17 100644
--- a/apps/docs/content/components/input/regex-validation.ts
+++ b/apps/docs/content/components/input/regex-validation.ts
@@ -1,30 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- const [value, setValue] = React.useState("junior2nextui.org");
-
- const validateEmail = (value) => value.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i);
-
- const isInvalid = React.useMemo(() => {
- if (value === "") return false;
-
- return validateEmail(value) ? false : true;
- }, [value]);
-
- return (
-
- );
-}`;
+import App from "./regex-validation.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/required.raw.jsx b/apps/docs/content/components/input/required.raw.jsx
new file mode 100644
index 0000000000..6e97f4494b
--- /dev/null
+++ b/apps/docs/content/components/input/required.raw.jsx
@@ -0,0 +1,13 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/required.ts b/apps/docs/content/components/input/required.ts
index 2af84c5b46..b50b781e6f 100644
--- a/apps/docs/content/components/input/required.ts
+++ b/apps/docs/content/components/input/required.ts
@@ -1,16 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./required.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/sizes.raw.jsx b/apps/docs/content/components/input/sizes.raw.jsx
new file mode 100644
index 0000000000..01e44c76d4
--- /dev/null
+++ b/apps/docs/content/components/input/sizes.raw.jsx
@@ -0,0 +1,16 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const sizes = ["sm", "md", "lg"];
+
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/sizes.ts b/apps/docs/content/components/input/sizes.ts
index 6294e756c7..85a2f5b30b 100644
--- a/apps/docs/content/components/input/sizes.ts
+++ b/apps/docs/content/components/input/sizes.ts
@@ -1,20 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
-
- const sizes = ["sm", "md", "lg"];
-
- return (
-
- );
-}`;
+import App from "./sizes.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/start-end-content.raw.jsx b/apps/docs/content/components/input/start-end-content.raw.jsx
new file mode 100644
index 0000000000..306c4f70b0
--- /dev/null
+++ b/apps/docs/content/components/input/start-end-content.raw.jsx
@@ -0,0 +1,152 @@
+import {Input} from "@nextui-org/react";
+
+export const MailIcon = (props) => {
+ return (
+
+ );
+};
+
+export default function App() {
+ return (
+
+ }
+ type="url"
+ />
+
+
+
+ }
+ label="Email"
+ labelPlacement="outside"
+ placeholder="you@example.com"
+ type="email"
+ />
+
+ $
+
+ }
+ label="Price"
+ labelPlacement="outside"
+ placeholder="0.00"
+ type="number"
+ />
+
+ .org/
+
+ }
+ label="Website"
+ labelPlacement="outside"
+ placeholder="nextui"
+ type="url"
+ />
+
+
+
+ @gmail.com
+
+ }
+ label="Email"
+ labelPlacement="outside"
+ placeholder="nextui"
+ startContent={
+
+ }
+ />
+
+
+
+
+ }
+ label="Price"
+ labelPlacement="outside"
+ placeholder="0.00"
+ startContent={
+
+ $
+
+ }
+ type="number"
+ />
+
+ .org
+
+ }
+ label="Website"
+ labelPlacement="outside"
+ placeholder="nextui"
+ startContent={
+
+ https://
+
+ }
+ type="url"
+ />
+
+
+ );
+}
diff --git a/apps/docs/content/components/input/start-end-content.ts b/apps/docs/content/components/input/start-end-content.ts
index 767530eb9d..e99c7e5997 100644
--- a/apps/docs/content/components/input/start-end-content.ts
+++ b/apps/docs/content/components/input/start-end-content.ts
@@ -1,158 +1,7 @@
-const MailIcon = `export const MailIcon = (props) => (
-
-);`;
-
-const App = `import {Input} from "@nextui-org/react";
-import {MailIcon} from './MailIcon';
-
-export default function App() {
- return (
-
- }
- />
-
-
-
- }
- />
-
- $
-
- }
- />
-
- .org/
-
- }
- />
-
-
-
- }
- endContent={
-
- @gmail.com
-
- }
- />
-
-
$
-
- }
- endContent={
-
-
-
-
- }
- type="number"
- />
-
- https://
-
- }
- endContent={
-
- .org
-
- }
- />
-
-
- );
-}`;
+import App from "./start-end-content.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/MailIcon.jsx": MailIcon,
};
export default {
diff --git a/apps/docs/content/components/input/usage.raw.jsx b/apps/docs/content/components/input/usage.raw.jsx
new file mode 100644
index 0000000000..3b7f143b55
--- /dev/null
+++ b/apps/docs/content/components/input/usage.raw.jsx
@@ -0,0 +1,10 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/input/usage.ts b/apps/docs/content/components/input/usage.ts
index e2896cf877..1118304c37 100644
--- a/apps/docs/content/components/input/usage.ts
+++ b/apps/docs/content/components/input/usage.ts
@@ -1,13 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- return (
-
-
-
-
- );
-}`;
+import App from "./usage.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/input/variants.raw.jsx b/apps/docs/content/components/input/variants.raw.jsx
new file mode 100644
index 0000000000..bfe66708dc
--- /dev/null
+++ b/apps/docs/content/components/input/variants.raw.jsx
@@ -0,0 +1,16 @@
+import {Input} from "@nextui-org/react";
+
+export default function App() {
+ const variants = ["flat", "bordered", "underlined", "faded"];
+
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/input/variants.ts b/apps/docs/content/components/input/variants.ts
index d8308fd586..ddea95fb2e 100644
--- a/apps/docs/content/components/input/variants.ts
+++ b/apps/docs/content/components/input/variants.ts
@@ -1,19 +1,4 @@
-const App = `import {Input} from "@nextui-org/react";
-
-export default function App() {
- const variants = ["flat", "bordered", "underlined", "faded"];
-
- return (
-
- );
-}`;
+import App from "./variants.raw.jsx?raw";
const react = {
"/App.jsx": App,