diff --git a/docs/app/docs/components/link/docs/codeUsage.js b/docs/app/docs/components/link/docs/codeUsage.js
new file mode 100644
index 000000000..22b7474a4
--- /dev/null
+++ b/docs/app/docs/components/link/docs/codeUsage.js
@@ -0,0 +1,34 @@
+// Import API documentation
+import link_api_SourceCode from './component_api/link.tsx';
+
+const code = {
+ javascript: {
+ code: `import Link from "@radui/ui/Link"
+
+const LinkExample = () => (
+ Rad UI
+)`
+ },
+ scss: {
+ code: `.rad-ui-link{
+ color: var(--rad-ui-color-indigo-900);
+}
+.rad-ui-link:hover{
+ text-decoration: underline;
+}`
+ },
+};
+
+// API documentation
+export const api_documentation = {
+ link: link_api_SourceCode,
+};
+
+// Component features
+export const features = [
+ "Supports external and internal navigation",
+ "Adjustable sizes",
+ "Accessible keyboard navigation",
+];
+
+export default code;
diff --git a/docs/app/docs/components/link/docs/component_api/link.tsx b/docs/app/docs/components/link/docs/component_api/link.tsx
new file mode 100644
index 000000000..078a55113
--- /dev/null
+++ b/docs/app/docs/components/link/docs/component_api/link.tsx
@@ -0,0 +1,62 @@
+const data = {
+ name: "Link",
+ description: "Hyperlink component for navigation between pages or external resources.",
+ columns: [
+ {
+ name: "Prop",
+ id: "prop",
+ },
+ {
+ name: "Type",
+ id: "type",
+ },
+ {
+ name: "Default",
+ id: "default",
+ }
+ ],
+ data: [
+ {
+ prop: {
+ name: "href",
+ info_tooltips: "Destination URL for the link.",
+ },
+ type: "string",
+ default: "--",
+ },
+ {
+ prop: {
+ name: "children",
+ info_tooltips: "Link text or element.",
+ },
+ type: "ReactNode",
+ default: "--",
+ },
+ {
+ prop: {
+ name: "target",
+ info_tooltips: "Where to open the linked document.",
+ },
+ type: "string",
+ default: "'_self'",
+ },
+ {
+ prop: {
+ name: "size",
+ info_tooltips: "Visual size of the link.",
+ },
+ type: "string",
+ default: "'medium'",
+ },
+ {
+ prop: {
+ name: "className",
+ info_tooltips: "Additional CSS class names.",
+ },
+ type: "string",
+ default: "''",
+ }
+ ]
+};
+
+export default data;
diff --git a/docs/app/docs/components/link/examples/LinkExample.tsx b/docs/app/docs/components/link/examples/LinkExample.tsx
new file mode 100644
index 000000000..120efea23
--- /dev/null
+++ b/docs/app/docs/components/link/examples/LinkExample.tsx
@@ -0,0 +1,13 @@
+import Link from "@radui/ui/Link";
+
+const LinkExample = () => {
+ return (
+
+
+ Visit Rad UI
+
+
+ );
+};
+
+export default LinkExample;
diff --git a/docs/app/docs/components/link/page.mdx b/docs/app/docs/components/link/page.mdx
new file mode 100644
index 000000000..185112dae
--- /dev/null
+++ b/docs/app/docs/components/link/page.mdx
@@ -0,0 +1,44 @@
+import Documentation from '@/components/layout/Documentation/Documentation';
+import Link from '@radui/ui/Link';
+import codeUsage, { api_documentation, features } from './docs/codeUsage';
+import LinkExample from './examples/LinkExample';
+import linkMetadata from './seo';
+
+export const metadata = linkMetadata;
+
+
+ {/* Component Hero */}
+
+
+
+
+ {/* Component Features */}
+
+
+ {/* Embedded Storybook */}
+
+
+
+
+ {/* Accessibility */}
+
+ Links are focusable and support keyboard navigation. Ensure link text clearly describes the destination.
+
+
+ {/* API Documentation */}
+
+
+
diff --git a/docs/app/docs/components/link/seo.ts b/docs/app/docs/components/link/seo.ts
new file mode 100644
index 000000000..a7a85406e
--- /dev/null
+++ b/docs/app/docs/components/link/seo.ts
@@ -0,0 +1,8 @@
+import generateSeoMetadata from "@/utils/seo/generateSeoMetadata";
+
+const linkMetadata = generateSeoMetadata({
+ title: "Link - Rad UI",
+ description: "Accessible hyperlink component for navigation and external resources.",
+});
+
+export default linkMetadata;
diff --git a/docs/app/docs/docsNavigationSections.tsx b/docs/app/docs/docsNavigationSections.tsx
index d034c5f67..6a345fd94 100644
--- a/docs/app/docs/docsNavigationSections.tsx
+++ b/docs/app/docs/docsNavigationSections.tsx
@@ -24,6 +24,11 @@ export const docsNavigationSections = [
{
title:"Accessibility",
path:"/docs/guides/accessibility"
+ },
+ {
+ title:"Migration Guide",
+ path:"/docs/guides/migration",
+ is_new:true
}
]
},
@@ -89,6 +94,11 @@ export const docsNavigationSections = [
title:"Heading",
path:"/docs/components/heading"
},
+ {
+ title:"Link",
+ path:"/docs/components/link",
+ is_new:true
+ },
{
title:"Text",
path:"/docs/components/text"
diff --git a/docs/app/docs/guides/migration/page.mdx b/docs/app/docs/guides/migration/page.mdx
new file mode 100644
index 000000000..650d8bc0f
--- /dev/null
+++ b/docs/app/docs/guides/migration/page.mdx
@@ -0,0 +1,26 @@
+import Documentation from '@/components/layout/Documentation/Documentation';
+import migrationMetadata from './seo';
+
+export const metadata = migrationMetadata;
+
+
+
+ Radix UI
+ Rad UI ships with pre-styled components while Radix UI offers unstyled primitives. When migrating, replace Radix primitives with their Rad UI counterparts and remove custom styling where possible.
+ Base UI
+ Base UI centers around Material Design. Rad UI is design‑system agnostic, so migrate by mapping Base UI components to Rad UI and adjusting theme tokens.
+ Ark UI
+ Ark UI emphasizes composability. Rad UI provides similar accessibility guarantees with a more opinionated API, making migrations largely drop‑in.
+
+
+
+
+ Leverage Rad UI's accessible defaults before customizing.
+ Prefer composable components for flexibility.
+ Keep markup semantic and keyboard friendly.
+
+
+
diff --git a/docs/app/docs/guides/migration/seo.ts b/docs/app/docs/guides/migration/seo.ts
new file mode 100644
index 000000000..76e34a2bf
--- /dev/null
+++ b/docs/app/docs/guides/migration/seo.ts
@@ -0,0 +1,8 @@
+import generateSeoMetadata from "@/utils/seo/generateSeoMetadata";
+
+const migrationMetadata = generateSeoMetadata({
+ title: "Migration Guide - Rad UI",
+ description: "Guidance for migrating to Rad UI and best practices compared with Radix, Base UI, and Ark UI.",
+});
+
+export default migrationMetadata;
diff --git a/docs/components/docsHelpers/EditPageOnGithub.tsx b/docs/components/docsHelpers/EditPageOnGithub.tsx
index 20291f1eb..1ae6ef5a8 100644
--- a/docs/components/docsHelpers/EditPageOnGithub.tsx
+++ b/docs/components/docsHelpers/EditPageOnGithub.tsx
@@ -11,11 +11,13 @@ const EditPageOnGithub = () => {
const currentDocsPath = "docs/app/docs/" + page;
- return (
-
- Edit this page on GitHub
-
- );
+ return (
+
+
+ Edit on GitHub
+
+
+ );
};
export default EditPageOnGithub;
\ No newline at end of file
diff --git a/docs/components/navigation/Navigation.tsx b/docs/components/navigation/Navigation.tsx
index d01e3344a..7006bf682 100644
--- a/docs/components/navigation/Navigation.tsx
+++ b/docs/components/navigation/Navigation.tsx
@@ -3,9 +3,9 @@ import { usePathname } from 'next/navigation';
import { useContext, useEffect, useState } from 'react';
import { NavBarContext } from '@/components/Main/NavBar/NavBarContext';
-import docsSections from "@/app/docs/docsNavigationSections"
-import ScrollArea from "@radui/ui/ScrollArea"
-import Category from './Category'
+import docsSections from "@/app/docs/docsNavigationSections";
+import ScrollArea from "@radui/ui/ScrollArea";
+import Category from './Category';
@@ -26,7 +26,10 @@ const Navigation = ({ customSections }: { customSections?: any }) => {
const pathname = usePathname();
const { setIsDocsNavOpen } = useContext(NavBarContext) as { isDocsNavOpen: boolean, setIsDocsNavOpen: (isDocsNavOpen: boolean) => void };
- const [sections, setSections] = useState(docsSections)
+ const [sections, setSections] = useState(docsSections);
+ const [query, setQuery] = useState("");
+ const versions = ["0.0.47", "0.0.46"];
+ const [version, setVersion] = useState(versions[0]);
// customSections || sections;
useEffect(() => {
@@ -34,34 +37,61 @@ const Navigation = ({ customSections }: { customSections?: any }) => {
setSections(docsSections)
}
else {
- setSections(defaultSections)
- }
- }, [pathname])
+ setSections(defaultSections)
+ }
+ }, [pathname])
+ const filteredSections = sections
+ .map(section => ({
+ ...section,
+ items: section.items.filter((item: any) =>
+ item.title.toLowerCase().includes(query.toLowerCase())
+ ),
+ }))
+ .filter(section => section.items.length > 0);
+ return
+
+
+
+ setQuery(e.target.value)}
+ placeholder="Search..."
+ className="px-2 py-1 text-sm rounded border"
+ />
+ setVersion(e.target.value)}
+ className="px-2 py-1 text-sm rounded border"
+ >
+ {versions.map(v => (
+ {v}
+ ))}
+
+
+
+ {filteredSections.map((section, i) => {
+ const isCategory = section.type === "CATEGORY";
+ if (isCategory) {
+ return
+ }
+ else{
+ return
+ Hello
+
+ }
+ })}
+
+
- return
-
-
-
- {sections.map((section, i) => {
- const isCategory = section.type === "CATEGORY";
- if (isCategory) {
- return
- }
- else{
- return
- Hello
-
- }
- })}
-
-
-
-
-
-
-
-
+
+
+
+
+
}