Pull Request Number: 4227 Title: feat: Adding nextui pro section on the landing page Base Branch: canary Head Branch: macci001/eng-1636 Author: macci001 URL: https://github.com/nextui-org/nextui/pull/4227 State: MERGED Created At: 2024-12-05T12:50:25Z Merged At: 2024-12-06T13:13:08Z Participants: macci001, jrgarciadev Description: Closes ENG-1636 📝 Description Adding nextui pro section on the landing page 🚀 New behavior Screen.Recording.2024-12-06.at.2.52.32.PM.mov 💣 Is this a breaking change (Yes/No): 📝 Additional Information Summary by CodeRabbit Release Notes New Features Introduced the NextUIProSection component for enhanced marketing content on the homepage. Added a new Marquee component for customizable scrolling effects. Enhancements Expanded Tailwind CSS configuration with new scrolling animations for improved visual effects. These updates aim to enrich the user experience with dynamic content and engaging visual elements. Commits: - feat: adding nextui pro section on the landing page\n- chore(nits): nits\n- Merge branch 'canary' of github.com:nextui-org/nextui into macci001/eng-1636\n- fix: remove pro image on mobile\n Labels: Comments: - linear:

ENG-1636 NextUI Pro Section

\n- changeset-bot: ### ⚠️ No Changeset found Latest commit: 3049e1846baec4c15076a95719a7a86149fe0e08 Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**
This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). [Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/nextui-org/nextui/new/macci001/eng-1636?filename=.changeset/thin-cars-dream.md&value=---%0A%22%40nextui-org%2Fdocs%22%3A%20patch%0A---%0A%0Afeat%3A%20Adding%20nextui%20pro%20section%20on%20the%20landing%20page%0A) \n- vercel: [vc]: #7oUjYQWH6cL33JyVv3wKxASWV90OiMXZHr549DUa8ZY=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJuZXh0dWktZG9jcy12MiIsInJvb3REaXJlY3RvcnkiOiJhcHBzL2RvY3MiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9uZXh0dWktb3JnL25leHR1aS1kb2NzLXYyL0FoTkRSeWZrdWdCUE11S3V6Z2d3clYyMVZmVHgiLCJwcmV2aWV3VXJsIjoiIiwibmV4dENvbW1pdFN0YXR1cyI6IkNBTkNFTEVEIn0seyJuYW1lIjoibmV4dHVpLXN0b3J5Ym9vay12MiIsInJvb3REaXJlY3RvcnkiOiJwYWNrYWdlcy9zdG9yeWJvb2siLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9uZXh0dWktb3JnL25leHR1aS1zdG9yeWJvb2stdjIvRFF3Z2NTMUJuWFVEWG8zWEdONlJ1NUh4eTNSYSIsInByZXZpZXdVcmwiOiIiLCJuZXh0Q29tbWl0U3RhdHVzIjoiQ0FOQ0VMRUQifV19 **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **nextui-docs-v2** | 🛑 Canceled ([Inspect](https://vercel.com/nextui-org/nextui-docs-v2/AhNDRyfkugBPMuKuzggwrV21VfTx)) | | | Dec 6, 2024 1:18pm | | **nextui-storybook-v2** | 🛑 Canceled ([Inspect](https://vercel.com/nextui-org/nextui-storybook-v2/DQwgcS1BnXUDXo3XGN6Ru5Hxy3Ra)) | | | Dec 6, 2024 1:18pm | \n- coderabbitai: > [!CAUTION] > ## Review failed > > The pull request is closed. ## Walkthrough The pull request introduces several changes across multiple files, primarily adding new components and enhancing the Tailwind CSS configuration. A new `NextUIProSection` component is incorporated into the `Home` function, while a `Marquee` component is introduced for customizable scrolling effects. Additionally, the Tailwind CSS configuration is updated to include new animations. These changes enhance the marketing sections of the application without altering existing functionalities. ## Changes | File Path | Change Summary | |----------------------------------------------------|-----------------------------------------------------------------------------------------------------| | apps/docs/app/page.tsx | Added import for `NextUIProSection` and included it in the `Home` function's return statement. | | apps/docs/components/marketing/marquee.tsx | Introduced `Marquee` component with customizable props for scrolling behavior. | | apps/docs/components/marketing/nextui-pro-section.tsx | Added `NextUIProSection` component with dynamic content based on user context and responsive design. | | apps/docs/tailwind.config.js | Enhanced Tailwind CSS configuration with new animations and keyframes for scrolling effects. | ## Suggested labels `📋 Scope : Docs` ## Suggested reviewers - wingkwong ---
📜 Recent review details **Configuration used: .coderabbit.yaml** **Review profile: CHILL**
📥 Commits Reviewing files that changed from the base of the PR and between 606712f023b2edadf2435a71bcf696c24f2ee7d8 and 3049e1846baec4c15076a95719a7a86149fe0e08.
📒 Files selected for processing (1) * `apps/docs/components/marketing/nextui-pro-section.tsx` (1 hunks)
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
\n Files Changed: - apps/docs/app/page.tsx (modified, 2 changes)\n Patch: @@ -13,6 +13,7 @@ import {Community} from "@/components/marketing/community"; import Support from "@/components/marketing/support"; import landingContent from "@/content/landing"; import {Sponsors} from "@/components/marketing/sponsors"; +import {NextUIProSection} from "@/components/marketing/nextui-pro-section"; export default async function Home() { return ( @@ -25,6 +26,7 @@ export default async function Home() { + Loading...}> \n- apps/docs/components/marketing/marquee.tsx (added, 79 changes)\n Patch: @@ -0,0 +1,79 @@ +"use client"; + +import type {ReactNode} from "react"; +import type {ScrollShadowProps} from "@nextui-org/react"; + +import {Children, cloneElement} from "react"; +import {ScrollShadow} from "@nextui-org/react"; +import {cn} from "@nextui-org/react"; + +interface MarqueeProps { + className?: string; + reverse?: boolean; + shadow?: boolean; + duration?: number; + pauseOnHover?: boolean; + vertical?: boolean; + children?: ReactNode; + [key: string]: unknown; +} + +export const Marquee = ({ + className, + reverse, + duration = 40, + shadow = false, + pauseOnHover = false, + vertical = false, + children, + ...props +}: MarqueeProps) => { + const shadowProps: ScrollShadowProps = { + isEnabled: shadow, + offset: -20, + size: 300, + orientation: "vertical", + visibility: "both", + }; + + const Wrapper = shadow ? ScrollShadow : "div"; + + const componentProps = shadow ? {...props, ...shadowProps} : props; + + return ( + +
+ {Children.map(children, (child) => + child && typeof child === "object" && "type" in child ? cloneElement(child) : child, + )} +
+
+ ); +}; + +export default Marquee;\n- apps/docs/components/marketing/nextui-pro-section.tsx (added, 182 changes)\n Patch: @@ -0,0 +1,182 @@ +"use client"; + +import {Button, Chip} from "@nextui-org/react"; +import {useEffect, useState} from "react"; +import {useTheme} from "next-themes"; + +import {sectionWrapper, title, titleWrapper, subtitle} from "../primitives"; + +import Marquee from "./marquee"; + +import {useIsMobile} from "@/hooks/use-media-query"; + +export const NextUIProSection = () => { + const [mounted, setMounted] = useState(false); + + useEffect(() => { + setMounted(true); + }, []); + + const isMobile = useIsMobile(); + const {theme} = useTheme(); + const isDarkMode = theme === "dark"; + + let imgSrc: string; + + if (isDarkMode) { + imgSrc = isMobile + ? "/images/nextuipro-section-background@mobile.webp" + : "/images/nextuipro-section-background.webp"; + } else { + imgSrc = isMobile + ? "/images/nextuipro-section-background-light@mobile.webp" + : "/images/nextuipro-section-background-light.webp"; + } + + const mobileClassName: string = isDarkMode + ? "h-full w-full bg-[radial-gradient(at_40%_80%,_rgba(255,255,255,_0)_5%,_rgba(0,0,0,_0.8)_50%,_rgba(0,0,0,1)_100%)]" + : "h-full w-full bg-[radial-gradient(at_40%_80%,_rgba(0,0,0,_0)_5%,_rgba(255,255,255,_0.8)_50%,_rgba(255,255,255,1)_100%)]"; + + const webClassName: string = isDarkMode + ? "h-full w-full bg-[radial-gradient(at_80%_50%,_rgba(255,255,255,_0)_20%,_rgba(0,0,0,_0.8)_40%,_rgba(0,0,0,1)_100%)]" + : "h-full w-full bg-[radial-gradient(at_80%_50%,_rgba(0,0,0,_0)_20%,_rgba(255,255,255,_0.9)_40%,_rgba(255,255,255,1)_100%)]"; + + if (!mounted) return null; + + const CheckmarkIcon = () => ( + + + + ); + + return ( +
+
+
+ + PRO + +
+

+ Ship  +

+

+ faster  +

+

+ with  +

+
+

+ beautiful  +

+

+ components +

+
+
+

+ Premade templates of over 210+ beautiful and responsive components, professionally + created by the team behind NextUI. +

+
+
+ + 210+ Components +
+
+ + Lifetime Access +
+
+ + Free Updates +
+
+ + Figma Files Included +
+
+
+ +
+
+
+ + Hero Background + +
+
+
+ +
+
+
+
+
+
+ ); +};\n- apps/docs/public/images/nextuipro-section-background-light.webp (added, 0 changes)\n Patch: No patch available\n- apps/docs/public/images/nextuipro-section-background-light@mobile.webp (added, 0 changes)\n Patch: No patch available\n- apps/docs/public/images/nextuipro-section-background.webp (added, 0 changes)\n Patch: No patch available\n- apps/docs/public/images/nextuipro-section-background@mobile.webp (added, 0 changes)\n Patch: No patch available\n- apps/docs/tailwind.config.js (modified, 10 changes)\n Patch: @@ -319,13 +319,23 @@ module.exports = { backgroundPosition: "-200% center", }, }, + "scrolling-banner": { + from: {transform: "translateX(0)"}, + to: {transform: "translateX(calc(-50% - var(--gap)/2))"}, + }, + "scrolling-banner-vertical": { + from: {transform: "translateY(0)"}, + to: {transform: "translateY(calc(-50% - var(--gap)/2))"}, + }, }, animation: { heartbeat: "heartbeat 1s ease-in-out infinite", levitate: "levitate 5s ease infinite", expand: "expand 6s ease-out infinite both", "expand-opacity": "expand-opacity 6s linear infinite both", "text-gradient": "text-gradient 4s linear 0s infinite normal forwards running", + "scrolling-banner": "scrolling-banner var(--duration) linear infinite", + "scrolling-banner-vertical": "scrolling-banner-vertical var(--duration) linear infinite", }, maxWidth: { "8xl": "90rem", // 1440px\n