feat(root): layout configuration added to the tailwind plugin, components were adapted

This commit is contained in:
Junior Garcia 2023-07-01 20:03:52 -03:00
parent ce9abed071
commit 114c3f5a6b
348 changed files with 2199 additions and 1972 deletions

View File

@ -31,7 +31,7 @@ interface DocPageProps {
const cache = new Map(); const cache = new Map();
export function getDocFromParams(params: {slug: string[]}) { function getDocFromParams(params: {slug: string[]}) {
let meta, doc; let meta, doc;
const {slug} = getAppSlug(params); const {slug} = getAppSlug(params);

View File

@ -9,7 +9,7 @@ import {CloseIcon} from "@nextui-org/shared-icons";
import {tv} from "tailwind-variants"; import {tv} from "tailwind-variants";
import {useRouter} from "next/navigation"; import {useRouter} from "next/navigation";
import MultiRef from "react-multi-ref"; import MultiRef from "react-multi-ref";
import {cn} from "@nextui-org/theme"; import {clsx} from "@nextui-org/shared-utils";
import scrollIntoView from "scroll-into-view-if-needed"; import scrollIntoView from "scroll-into-view-if-needed";
import {isAppleDevice} from "@react-aria/utils"; import {isAppleDevice} from "@react-aria/utils";
import {create} from "zustand"; import {create} from "zustand";
@ -269,11 +269,12 @@ export const Cmdk: FC<{}> = () => {
return ( return (
<Button <Button
isIconOnly isIconOnly
className={cn( className={clsx(
"border data-[hover=true]:bg-content2 border-default-400 dark:border-default-100", "border data-[hover=true]:bg-content2 border-default-400 dark:border-default-100",
className, className,
)} )}
size="xs" radius="full"
size="sm"
variant="bordered" variant="bordered"
onPress={onPress} onPress={onPress}
> >
@ -339,6 +340,8 @@ export const Cmdk: FC<{}> = () => {
wrapper: "md:items-start", wrapper: "md:items-start",
base: [ base: [
"mt-[20vh]", "mt-[20vh]",
"border-small",
"dark:border-default-100",
"supports-[backdrop-filter]:bg-background/80", "supports-[backdrop-filter]:bg-background/80",
"dark:supports-[backdrop-filter]:bg-background/30", "dark:supports-[backdrop-filter]:bg-background/30",
"supports-[backdrop-filter]:backdrop-blur-md", "supports-[backdrop-filter]:backdrop-blur-md",

View File

@ -45,7 +45,7 @@ export const DemoCodeModal: FC<DemoCodeModalProps> = ({isOpen, code, title, subt
setIsCodeVisible(isOpen); setIsCodeVisible(isOpen);
}, },
}} }}
radius={isMobile ? "none" : "2xl"} radius={isMobile ? "none" : "lg"}
size={isMobile ? "full" : "2xl"} size={isMobile ? "full" : "2xl"}
onClose={onClose} onClose={onClose}
> >

View File

@ -23,8 +23,7 @@ export const MusicPlayer: FC<MusicPlayerProps> = ({className, ...otherProps}) =>
<Card <Card
isBlurred isBlurred
className={clsx("border-none bg-background/60 dark:bg-default-100/50", className)} className={clsx("border-none bg-background/60 dark:bg-default-100/50", className)}
radius="2xl" shadow="sm"
shadow="2xl"
{...otherProps} {...otherProps}
> >
<CardBody> <CardBody>

View File

@ -5,7 +5,7 @@ const blockquoteStyles = tv({
base: "border pl-4 bg-default-50 my-6 py-3 rounded-xl [&>p]:m-0", base: "border pl-4 bg-default-50 my-6 py-3 rounded-xl [&>p]:m-0",
variants: { variants: {
color: { color: {
default: "border-default-100 bg-default-50/20", default: "border-default-200 dark:border-default-100 bg-default-200/20",
primary: "border-primary-100 bg-primary-50/20", primary: "border-primary-100 bg-primary-50/20",
secondary: "border-secondary-100 bg-secondary-50/20", secondary: "border-secondary-100 bg-secondary-50/20",
success: "border-success-100 bg-success-50/20", success: "border-success-100 bg-success-50/20",

View File

@ -34,6 +34,7 @@ interface CodeDemoProps extends UseCodeDemoProps, WindowResizerProps {
showTabs?: boolean; showTabs?: boolean;
showPreview?: boolean; showPreview?: boolean;
showOpenInCodeSandbox?: boolean; showOpenInCodeSandbox?: boolean;
isPreviewCentered?: boolean;
displayMode?: "always" | "visible"; displayMode?: "always" | "visible";
isGradientBox?: boolean; isGradientBox?: boolean;
gradientColor?: GradientBoxProps["color"]; gradientColor?: GradientBoxProps["color"];
@ -49,6 +50,7 @@ export const CodeDemo: React.FC<CodeDemoProps> = ({
showPreview = true, showPreview = true,
asIframe = false, asIframe = false,
showSandpackPreview = false, showSandpackPreview = false,
isPreviewCentered = false,
showOpenInCodeSandbox, showOpenInCodeSandbox,
isGradientBox = false, isGradientBox = false,
defaultExpanded = false, defaultExpanded = false,
@ -106,6 +108,7 @@ export const CodeDemo: React.FC<CodeDemoProps> = ({
<DynamicReactLiveDemo <DynamicReactLiveDemo
code={code} code={code}
gradientColor={gradientColor} gradientColor={gradientColor}
isCentered={isPreviewCentered}
isGradientBox={isGradientBox} isGradientBox={isGradientBox}
noInline={noInline} noInline={noInline}
overflow={overflow} overflow={overflow}

View File

@ -1,5 +1,6 @@
import React from "react"; import React from "react";
import {LivePreview, LiveProvider, LiveError} from "react-live"; import {LivePreview, LiveProvider, LiveError} from "react-live";
import {clsx} from "@nextui-org/shared-utils";
import * as Components from "@nextui-org/react"; import * as Components from "@nextui-org/react";
import {BgGridContainer} from "@/components/bg-grid-container"; import {BgGridContainer} from "@/components/bg-grid-container";
@ -8,6 +9,7 @@ import {GradientBox, GradientBoxProps} from "@/components/gradient-box";
export interface ReactLiveDemoProps { export interface ReactLiveDemoProps {
code: string; code: string;
noInline?: boolean; noInline?: boolean;
isCentered?: boolean;
isGradientBox?: boolean; isGradientBox?: boolean;
gradientColor?: GradientBoxProps["color"]; gradientColor?: GradientBoxProps["color"];
overflow?: "auto" | "visible" | "hidden"; overflow?: "auto" | "visible" | "hidden";
@ -21,11 +23,16 @@ export const ReactLiveDemo: React.FC<ReactLiveDemoProps> = ({
code, code,
isGradientBox, isGradientBox,
gradientColor = "orange", gradientColor = "orange",
isCentered = false,
noInline, noInline,
}) => { }) => {
const content = ( const content = (
<> <>
<LivePreview className="live-preview flex h-full w-full not-prose" /> <LivePreview
className={clsx("live-preview flex h-full w-full not-prose", {
"justify-center items-center": isCentered,
})}
/>
<LiveError /> <LiveError />
</> </>
); );

View File

@ -1,4 +1,4 @@
import {Button, Link} from "@nextui-org/react"; import {Button, ButtonProps, Link} from "@nextui-org/react";
import {GithubIcon, NpmIcon, AdobeIcon, StorybookIcon} from "@/components/icons"; import {GithubIcon, NpmIcon, AdobeIcon, StorybookIcon} from "@/components/icons";
import {COMPONENT_PATH, COMPONENT_THEME_PATH} from "@/libs/github/constants"; import {COMPONENT_PATH, COMPONENT_THEME_PATH} from "@/libs/github/constants";
@ -10,6 +10,27 @@ export interface ComponentLinksProps {
reactAriaHook?: string; reactAriaHook?: string;
} }
const ButtonLink = ({
children,
href,
startContent,
...props
}: ButtonProps & {
href: string;
}) => (
<Button
isExternal
as={Link}
className="!text-small py-4 bg-default-100 dark:bg-default-50 text-default-700"
href={href}
size="sm"
startContent={startContent}
{...props}
>
{children}
</Button>
);
export const ComponentLinks = ({ export const ComponentLinks = ({
component, component,
storybook, storybook,
@ -22,63 +43,35 @@ export const ComponentLinks = ({
return ( return (
<div className="flex flex-wrap gap-3 mt-6"> <div className="flex flex-wrap gap-3 mt-6">
<Button <ButtonLink
isExternal
as={Link}
className="bg-default-100 dark:bg-default-50 text-default-700"
href={`https://storiesv2.nextui.org/?path=/story/components-${storybook || component}`} href={`https://storiesv2.nextui.org/?path=/story/components-${storybook || component}`}
radius="md"
size="sm"
startContent={<StorybookIcon className="text-lg text-[#ff4785]" />} startContent={<StorybookIcon className="text-lg text-[#ff4785]" />}
> >
Storybook Storybook
</Button> </ButtonLink>
<Button <ButtonLink
isExternal
as={Link}
className="bg-default-100 dark:bg-default-50 text-default-700"
href={`https://www.npmjs.com/package/@nextui-org/${component}`} href={`https://www.npmjs.com/package/@nextui-org/${component}`}
radius="md"
size="sm"
startContent={<NpmIcon className="text-2xl text-[#E53E3E]" />} startContent={<NpmIcon className="text-2xl text-[#E53E3E]" />}
> >
{`@nextui-org/${component}`} {`@nextui-org/${component}`}
</Button> </ButtonLink>
{reactAriaHook && ( {reactAriaHook && (
<Button <ButtonLink
isExternal
as={Link}
className="bg-default-100 dark:bg-default-50 text-default-700"
href={`https://react-spectrum.adobe.com/react-aria/${reactAriaHook}.html`} href={`https://react-spectrum.adobe.com/react-aria/${reactAriaHook}.html`}
radius="md"
size="sm"
startContent={<AdobeIcon className="text-lg text-[#E1251B]" />} startContent={<AdobeIcon className="text-lg text-[#E1251B]" />}
> >
React Aria React Aria
</Button> </ButtonLink>
)} )}
<Button <ButtonLink href={`${COMPONENT_PATH}/${component}`} startContent={<GithubIcon size={20} />}>
isExternal
as={Link}
className="bg-default-100 dark:bg-default-50 text-default-700"
href={`${COMPONENT_PATH}/${component}`}
radius="md"
size="sm"
startContent={<GithubIcon />}
>
Source Source
</Button> </ButtonLink>
<Button <ButtonLink
isExternal
as={Link}
className="bg-default-100 dark:bg-default-50 text-default-700"
href={`${COMPONENT_THEME_PATH}/${styles || component}.ts`} href={`${COMPONENT_THEME_PATH}/${styles || component}.ts`}
radius="md" startContent={<GithubIcon size={20} />}
size="sm"
startContent={<GithubIcon />}
> >
Styles source Styles source
</Button> </ButtonLink>
</div> </div>
); );
}; };

View File

@ -14,7 +14,6 @@ import {
SpacerProps, SpacerProps,
Spacer, Spacer,
Link as NextUILink, Link as NextUILink,
cn,
Chip, Chip,
dataFocusVisibleClasses, dataFocusVisibleClasses,
} from "@nextui-org/react"; } from "@nextui-org/react";
@ -151,12 +150,12 @@ function TreeItem<T>(props: TreeItemProps<T>) {
{rendered} {rendered}
</span> </span>
{isNew && ( {isNew && (
<Chip className="ml-2" color="primary" size="xs" variant="flat"> <Chip className="ml-2" color="primary" size="sm" variant="flat">
New New
</Chip> </Chip>
)} )}
{item.props?.comingSoon && ( {item.props?.comingSoon && (
<Chip className="ml-2" color="default" size="xs" variant="flat"> <Chip className="ml-2" color="default" size="sm" variant="flat">
Coming soon Coming soon
</Chip> </Chip>
)} )}
@ -246,7 +245,7 @@ export const DocsSidebar: FC<DocsSidebarProps> = ({routes, slug, tag, className}
}, [] as string[]); }, [] as string[]);
return ( return (
<div className={cn("lg:fixed lg:top-20 mt-2 z-0 lg:h-[calc(100vh-121px)]", className)}> <div className={clsx("lg:fixed lg:top-20 mt-2 z-0 lg:h-[calc(100vh-121px)]", className)}>
<Tree defaultExpandedKeys={expandedKeys} items={routes || []}> <Tree defaultExpandedKeys={expandedKeys} items={routes || []}>
{(route) => ( {(route) => (
<Item <Item

View File

@ -73,6 +73,7 @@ export const DocsToc: FC<DocsTocProps> = ({headings}) => {
"font-normal", "font-normal",
"flex items-center text-sm font-normal text-default-500 dark:text-default-300", "flex items-center text-sm font-normal text-default-500 dark:text-default-300",
"data-[active=true]:text-foreground", "data-[active=true]:text-foreground",
"dark:data-[active=true]:text-foreground",
"before:content-['']", "before:content-['']",
"before:opacity-0", "before:opacity-0",
"data-[active=true]:before:opacity-100", "data-[active=true]:before:opacity-100",

View File

@ -117,7 +117,7 @@ const CustomThemesExample = ({
/> />
)} )}
</Tabs> </Tabs>
<Card className={slots.wrapper()} radius="2xl"> <Card className={slots.wrapper()} radius="lg">
<CardBody className="relative flex-col md:flex-row md:items-center gap-4 md:gap-9 overflow-visible"> <CardBody className="relative flex-col md:flex-row md:items-center gap-4 md:gap-9 overflow-visible">
<div className={slots.imageWrapper()}> <div className={slots.imageWrapper()}>
<Image <Image
@ -164,7 +164,6 @@ const CustomThemesExample = ({
<Button <Button
className={slots.buyButton()} className={slots.buyButton()}
color="primary" color="primary"
radius="xl"
variant={selectedTheme === "nextui" ? "shadow" : "solid"} variant={selectedTheme === "nextui" ? "shadow" : "solid"}
> >
Buy now Buy now
@ -172,7 +171,7 @@ const CustomThemesExample = ({
<Button <Button
className={slots.addToBagButton()} className={slots.addToBagButton()}
color="primary" color="primary"
radius="xl" radius="full"
variant="bordered" variant="bordered"
> >
Add to bag Add to bag

View File

@ -44,7 +44,7 @@ export const FloatingComponents: React.FC<{}> = () => {
}} }}
endContent={<MoonFilledIcon />} endContent={<MoonFilledIcon />}
isSelected={isSelected} isSelected={isSelected}
size="xl" size="lg"
startContent={<SunFilledIcon />} startContent={<SunFilledIcon />}
onChange={onChange} onChange={onChange}
/> />
@ -55,7 +55,6 @@ export const FloatingComponents: React.FC<{}> = () => {
defaultValue="NextUI" defaultValue="NextUI"
label="Input" label="Input"
labelPlacement="outside" labelPlacement="outside"
radius="xl"
variant="bordered" variant="bordered"
onClear={() => {}} onClear={() => {}}
/> />
@ -63,7 +62,6 @@ export const FloatingComponents: React.FC<{}> = () => {
<Card <Card
isFooterBlurred isFooterBlurred
className="absolute -top-[260px] right-[100px] h-[120px] animate-[levitate_12s_ease_infinite_1s] z-0 max-w-fit" className="absolute -top-[260px] right-[100px] h-[120px] animate-[levitate_12s_ease_infinite_1s] z-0 max-w-fit"
radius="2xl"
> >
<Image <Image
alt="Professional camera" alt="Professional camera"
@ -73,7 +71,7 @@ export const FloatingComponents: React.FC<{}> = () => {
src="/images/card-example-6.webp" src="/images/card-example-6.webp"
width={120} width={120}
/> />
<CardFooter className="before:bg-black/10 before:border before:border-white/20 overflow-hidden justify-between py-2 absolute before:rounded-xl rounded-xl bottom-1 w-[calc(100%_-_8px)] shadow-lg ml-1 z-10"> <CardFooter className="before:bg-black/10 border-white/20 border-1 overflow-hidden justify-between py-2 absolute before:rounded-xl rounded-xl bottom-1 w-[calc(100%_-_8px)] shadow-lg ml-1 z-10">
<p className="text-xs font-semibold text-white/80">Camera</p> <p className="text-xs font-semibold text-white/80">Camera</p>
<p className="text-xs font-semibold text-white/80">$525</p> <p className="text-xs font-semibold text-white/80">$525</p>
</CardFooter> </CardFooter>
@ -83,7 +81,10 @@ export const FloatingComponents: React.FC<{}> = () => {
<UserTwitterCard className="absolute left-[80px] -top-[80px] animate-[levitate_16s_ease_infinite] border-none" /> <UserTwitterCard className="absolute left-[80px] -top-[80px] animate-[levitate_16s_ease_infinite] border-none" />
<Card className="absolute right-[110px] -top-[60px] animate-[levitate_18s_ease_infinite] shadow-lg z-10 max-w-fit border-none"> <Card
className="absolute right-[110px] -top-[60px] animate-[levitate_18s_ease_infinite] z-10 max-w-fit border-none"
shadow="lg"
>
<CardBody> <CardBody>
<NextUILogo small size={60} /> <NextUILogo small size={60} />
</CardBody> </CardBody>
@ -122,16 +123,18 @@ export const FloatingComponents: React.FC<{}> = () => {
</Tooltip> </Tooltip>
)} )}
<Card className="absolute right-[10px] top-[30px] animate-[levitate_16s_ease_infinite] shadow-lg z-10 max-w-fit border-none"> <Card
className="absolute right-[10px] top-[30px] animate-[levitate_16s_ease_infinite] z-10 max-w-fit border-none"
shadow="lg"
>
<CardBody> <CardBody>
<Spinner color="secondary" size="xl" /> <Spinner color="secondary" size="lg" />
</CardBody> </CardBody>
</Card> </Card>
<Card <Card
isFooterBlurred isFooterBlurred
className="absolute right-[60px] top-[100px] animate-[levitate_12s_ease_infinite_1s] z-0 max-w-fit" className="absolute right-[60px] top-[100px] animate-[levitate_12s_ease_infinite_1s] z-0 max-w-fit"
radius="2xl"
> >
<Image <Image
alt="Woman listing to music" alt="Woman listing to music"
@ -141,9 +144,9 @@ export const FloatingComponents: React.FC<{}> = () => {
src="/images/hero-card.webp" src="/images/hero-card.webp"
width={200} width={200}
/> />
<CardFooter className="before:bg-white/10 overflow-hidden justify-between py-2 absolute before:rounded-xl rounded-xl bottom-1 w-[calc(100%_-_8px)] shadow-lg ml-1 z-10"> <CardFooter className="before:bg-white/10 border-white/20 border-1 overflow-hidden justify-between py-2 absolute before:rounded-xl rounded-xl bottom-1 w-[calc(100%_-_8px)] shadow-lg ml-1 z-10">
<p className="text-xs text-white/80">Available soon.</p> <p className="text-xs text-white/80">Available soon.</p>
<Button color="secondary" radius="full" size="xs"> <Button className="text-tiny" color="secondary" radius="full" size="sm">
Notify me Notify me
</Button> </Button>
</CardFooter> </CardFooter>

View File

@ -12,7 +12,7 @@ export const FloatingTabs: React.FC<{}> = () => {
tabList: "max-w-[200px] shadow-sm", tabList: "max-w-[200px] shadow-sm",
}} }}
radius="full" radius="full"
size="xs" size="sm"
> >
<Tab key="notes" title="Notes" /> <Tab key="notes" title="Notes" />
<Tab key="tasks" title="Tasks" /> <Tab key="tasks" title="Tasks" />

View File

@ -58,10 +58,10 @@ const getSponsorSize = (sponsor: Sponsor, isMobile: boolean) => {
size = isMobile ? "sm" : "md"; size = isMobile ? "sm" : "md";
break; break;
case SPONSOR_TIERS.GOLD: case SPONSOR_TIERS.GOLD:
size = isMobile ? "lg" : "xl"; size = isMobile ? "md" : "lg";
break; break;
case SPONSOR_TIERS.PLATINUM: case SPONSOR_TIERS.PLATINUM:
size = isMobile ? "lg" : "xl"; size = isMobile ? "md" : "lg";
break; break;
default: default:
size = isMobile ? "sm" : "md"; size = isMobile ? "sm" : "md";
@ -174,7 +174,7 @@ export const Support: FC<SupportProps> = ({sponsors = []}) => {
color="secondary" color="secondary"
content={"Become a sponsor"} content={"Become a sponsor"}
offset={10} offset={10}
radius="xl" radius="full"
> >
<Button <Button
isIconOnly isIconOnly

View File

@ -136,10 +136,10 @@ export const Navbar: FC<NavbarProps> = ({children, routes, slug, tag}) => {
<motion.div animate={{opacity: 1}} exit={{opacity: 0}} initial={{opacity: 0}}> <motion.div animate={{opacity: 1}} exit={{opacity: 0}} initial={{opacity: 0}}>
<DropdownTrigger> <DropdownTrigger>
<Button <Button
className="hidden min-w-fit max-w-[64px] sm:flex gap-0.5 bg-default-400/20 dark:bg-default-500/20" className="hidden text-xs h-6 py-1 min-w-fit sm:flex gap-0.5 bg-default-400/20 dark:bg-default-500/20"
endContent={<ChevronDownIcon className="text-xs" />} endContent={<ChevronDownIcon className="text-tiny" />}
radius="full" radius="full"
size="xs" size="sm"
variant="flat" variant="flat"
> >
v2.0.0 v2.0.0

View File

@ -24,7 +24,7 @@ export const BugReportButton = () => {
isIconOnly isIconOnly
as={Link} as={Link}
href={`${ISSUE_REPORT_URL}${componentTitle}`} href={`${ISSUE_REPORT_URL}${componentTitle}`}
size="xs" size="sm"
title="Report a bug" title="Report a bug"
variant="light" variant="light"
> >

View File

@ -13,7 +13,7 @@ export const CodeSandboxButton = () => {
placement="top" placement="top"
radius="md" radius="md"
> >
<Button isIconOnly as="span" size="xs" title="Open in CodeSandbox" variant="light"> <Button isIconOnly as="span" size="sm" title="Open in CodeSandbox" variant="light">
<UnstyledOpenInCodeSandboxButton <UnstyledOpenInCodeSandboxButton
style={{ style={{
width: "100%", width: "100%",

View File

@ -23,7 +23,7 @@ export const CopyButton = () => {
content={copied ? "Copied!" : "Copy"} content={copied ? "Copied!" : "Copy"}
radius="md" radius="md"
> >
<Button isIconOnly size="xs" title="Copy Code" variant="light" onClick={copyHandler}> <Button isIconOnly size="sm" title="Copy Code" variant="light" onClick={copyHandler}>
<CopyLinearIcon className="text-zinc-500" height={16} width={16} /> <CopyLinearIcon className="text-zinc-500" height={16} width={16} />
</Button> </Button>
</Tooltip> </Tooltip>

View File

@ -29,7 +29,7 @@ export const LanguageSelector: React.FC<LanguageSelectorProps> = ({template, onC
}} }}
radius="lg" radius="lg"
selectedKey={template} selectedKey={template}
size="xs" size="sm"
onSelectionChange={handleToggle} onSelectionChange={handleToggle}
> >
<Tab <Tab

View File

@ -37,18 +37,12 @@ export const Sandpack: FC<SandpackProps> = ({
}) => { }) => {
const editorContainerRef = useRef(null); const editorContainerRef = useRef(null);
const { const {files, decorators, customSetup, sandpackTemplate, hasTypescript, setCurrentTemplate} =
files, useSandpack({
decorators, files: filesProp,
customSetup, template,
sandpackTemplate, highlightedLines,
hasTypescript, });
setCurrentTemplate,
} = useSandpack({
files: filesProp,
template,
highlightedLines,
});
return ( return (
<SandpackProvider <SandpackProvider

View File

@ -191,10 +191,10 @@ import {InvalidCardIcon} from "./InvalidCardIcon";
export default function App() { export default function App() {
const itemClasses = { const itemClasses = {
base: "py-0 w-full", base: "py-0 w-full",
title: "font-normal text-base", title: "font-normal text-medium",
trigger: "px-2 py-0 data-[hover=true]:bg-default-100 rounded-lg h-14 flex items-center", trigger: "px-2 py-0 data-[hover=true]:bg-default-100 rounded-lg h-14 flex items-center",
indicator: "text-base", indicator: "text-medium",
content: "text-sm px-2", content: "text-small px-2",
}; };
const defaultContent = const defaultContent =
@ -203,7 +203,7 @@ export default function App() {
return ( return (
<Accordion <Accordion
hideDivider showDivider={false}
className="p-2 flex flex-col gap-1 w-full max-w-[300px]" className="p-2 flex flex-col gap-1 w-full max-w-[300px]"
variant="shadow" variant="shadow"
itemClasses={itemClasses} itemClasses={itemClasses}
@ -249,7 +249,7 @@ export default function App() {
title={ title={
<p className="flex gap-1 items-center"> <p className="flex gap-1 items-center">
Card expired Card expired
<p className="text-default-400 text-sm">*4812</p> <p className="text-default-400 text-small">*4812</p>
</p> </p>
} }
> >

View File

@ -13,7 +13,7 @@ export default function App() {
<Avatar <Avatar
isBordered isBordered
color="primary" color="primary"
radius="xl" radius="lg"
src="https://i.pravatar.cc/150?u=a042581f4e29026024d" src="https://i.pravatar.cc/150?u=a042581f4e29026024d"
/> />
} }
@ -29,7 +29,7 @@ export default function App() {
<Avatar <Avatar
isBordered isBordered
color="success" color="success"
radius="xl" radius="lg"
src="https://i.pravatar.cc/150?u=a042581f4e29026704d" src="https://i.pravatar.cc/150?u=a042581f4e29026704d"
/> />
} }
@ -45,7 +45,7 @@ export default function App() {
<Avatar <Avatar
isBordered isBordered
color="warning" color="warning"
radius="xl" radius="lg"
src="https://i.pravatar.cc/150?u=a04258114e29026702d" src="https://i.pravatar.cc/150?u=a04258114e29026702d"
/> />
} }

View File

@ -7,7 +7,7 @@ export default function App() {
max={3} max={3}
total={10} total={10}
renderCount={(count) => ( renderCount={(count) => (
<p className="text-sm text-foreground font-medium ml-2">+{count} others</p> <p className="text-small text-foreground font-medium ml-2">+{count} others</p>
)} )}
> >
<Avatar src="https://i.pravatar.cc/150?u=a042581f4e29026024d" /> <Avatar src="https://i.pravatar.cc/150?u=a042581f4e29026024d" />

View File

@ -4,12 +4,9 @@ export default function App() {
return ( return (
<div className="flex gap-4 items-center"> <div className="flex gap-4 items-center">
<Avatar isBordered radius="full" src="https://i.pravatar.cc/150?u=a04258114e29026708c" /> <Avatar isBordered radius="full" src="https://i.pravatar.cc/150?u=a04258114e29026708c" />
<Avatar isBordered radius="2xl" src="https://i.pravatar.cc/150?u=a0423b7422f0e6002d" />
<Avatar isBordered radius="xl" src="https://i.pravatar.cc/150?u=a04258114e29026702d" />
<Avatar isBordered radius="lg" src="https://i.pravatar.cc/150?u=a04258114e29026302d" /> <Avatar isBordered radius="lg" src="https://i.pravatar.cc/150?u=a04258114e29026302d" />
<Avatar isBordered radius="md" src="https://i.pravatar.cc/150?u=a042581f4e29026704d" /> <Avatar isBordered radius="md" src="https://i.pravatar.cc/150?u=a042581f4e29026704d" />
<Avatar isBordered radius="sm" src="https://i.pravatar.cc/150?u=a04258a2462d826712d" /> <Avatar isBordered radius="sm" src="https://i.pravatar.cc/150?u=a04258a2462d826712d" />
<Avatar isBordered radius="none" src="https://i.pravatar.cc/150?u=a042581f4e29026024d" />
</div> </div>
); );
}`; }`;

View File

@ -3,12 +3,10 @@ const App = `import {Avatar} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4 items-center"> <div className="flex gap-4 items-center">
<Avatar src="https://i.pravatar.cc/150?u=a042581f4e29026024d" size="xs" />
<Avatar src="https://i.pravatar.cc/150?u=a04258a2462d826712d" size="sm" /> <Avatar src="https://i.pravatar.cc/150?u=a04258a2462d826712d" size="sm" />
<Avatar src="https://i.pravatar.cc/150?u=a042581f4e29026704d" size="md" /> <Avatar src="https://i.pravatar.cc/150?u=a042581f4e29026704d" size="md" />
<Avatar src="https://i.pravatar.cc/150?u=a04258114e29026302d" size="lg" /> <Avatar src="https://i.pravatar.cc/150?u=a04258114e29026302d" size="lg" />
<Avatar src="https://i.pravatar.cc/150?u=a04258114e29026702d" size="xl" /> <Avatar src="https://i.pravatar.cc/150?u=a04258114e29026708c" className="w-20 h-20 text-large" />
<Avatar src="https://i.pravatar.cc/150?u=a04258114e29026708c" className="w-20 h-20 text-lg" />
</div> </div>
); );
}`; }`;

View File

@ -25,9 +25,9 @@ export default function App() {
return ( return (
<Badge content="99+" shape="circle" color="danger"> <Badge content="99+" shape="circle" color="danger">
<Button <Button
radius="full"
isIconOnly isIconOnly
aria-label="more than 99 notifications" aria-label="more than 99 notifications"
radius="full"
variant="light" variant="light"
> >
<NotificationIcon size={24} /> <NotificationIcon size={24} />

View File

@ -5,37 +5,37 @@ export default function App() {
<div className="flex gap-3 items-center"> <div className="flex gap-3 items-center">
<Badge content="5" color="default"> <Badge content="5" color="default">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042f81f4e29026024d" src="https://i.pravatar.cc/150?u=a042f81f4e29026024d"
/> />
</Badge> </Badge>
<Badge content="5" color="primary"> <Badge content="5" color="primary">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d" src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/> />
</Badge> </Badge>
<Badge content="5" color="secondary"> <Badge content="5" color="secondary">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/300?u=a042581f4e29026709d" src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/> />
</Badge> </Badge>
<Badge content="5" color="success"> <Badge content="5" color="success">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026302d" src="https://i.pravatar.cc/150?u=a04258114e29026302d"
/> />
</Badge> </Badge>
<Badge content="5" color="warning"> <Badge content="5" color="warning">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026708c" src="https://i.pravatar.cc/150?u=a04258114e29026708c"
/> />
</Badge> </Badge>
<Badge content="5" color="danger"> <Badge content="5" color="danger">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042581f4e29026024d" src="https://i.pravatar.cc/150?u=a042581f4e29026024d"
/> />
</Badge> </Badge>

View File

@ -53,7 +53,7 @@ export default function App() {
<div className="flex gap-5 items-center"> <div className="flex gap-5 items-center">
<Badge content="5" color="danger"> <Badge content="5" color="danger">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042581f4e29026024d" src="https://i.pravatar.cc/150?u=a042581f4e29026024d"
/> />
</Badge> </Badge>
@ -66,7 +66,7 @@ export default function App() {
<Badge content="new" color="danger" size="sm"> <Badge content="new" color="danger" size="sm">
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
color="danger" color="danger"
src="https://i.pravatar.cc/300?u=a042581f4e29026709d" src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/> />
@ -80,7 +80,7 @@ export default function App() {
<Avatar <Avatar
isBordered isBordered
color="success" color="success"
radius="lg" radius="md"
src="https://i.pravatar.cc/300?u=a042581f4e290267072" src="https://i.pravatar.cc/300?u=a042581f4e290267072"
/> />
</Badge> </Badge>

View File

@ -6,7 +6,7 @@ export default function App() {
<Badge content="5" color="danger" shape="rectangle" disableOutline> <Badge content="5" color="danger" shape="rectangle" disableOutline>
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042f81f4e29026024d" src="https://i.pravatar.cc/150?u=a042f81f4e29026024d"
/> />
</Badge> </Badge>

View File

@ -2,7 +2,6 @@ import usage from "./usage";
import sizes from "./sizes"; import sizes from "./sizes";
import colors from "./colors"; import colors from "./colors";
import variants from "./variants"; import variants from "./variants";
import radius from "./radius";
import placements from "./placements"; import placements from "./placements";
import shapes from "./shapes"; import shapes from "./shapes";
import visibility from "./visibility"; import visibility from "./visibility";
@ -15,7 +14,6 @@ export const badgeContent = {
sizes, sizes,
colors, colors,
variants, variants,
radius,
placements, placements,
shapes, shapes,
visibility, visibility,

View File

@ -6,28 +6,28 @@ export default function App() {
<Badge content="5" color="danger" placement="top-right"> <Badge content="5" color="danger" placement="top-right">
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042f81f4e29026024d" src="https://i.pravatar.cc/150?u=a042f81f4e29026024d"
/> />
</Badge> </Badge>
<Badge content="5" color="danger" placement="bottom-right"> <Badge content="5" color="danger" placement="bottom-right">
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d" src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/> />
</Badge> </Badge>
<Badge content="5" color="danger" placement="top-left"> <Badge content="5" color="danger" placement="top-left">
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026708c" src="https://i.pravatar.cc/150?u=a04258114e29026708c"
/> />
</Badge> </Badge>
<Badge content="5" color="danger" placement="bottom-left"> <Badge content="5" color="danger" placement="bottom-left">
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026302d" src="https://i.pravatar.cc/150?u=a04258114e29026302d"
/> />
</Badge> </Badge>

View File

@ -1,58 +0,0 @@
const App = `import {Badge, Avatar} from "@nextui-org/react";
export default function App() {
return (
<div className="flex gap-3 items-center">
<Badge content="5" radius="full" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a042581f4e29026024d"
/>
</Badge>
<Badge content="5" radius="xl" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/>
</Badge>
<Badge content="5" radius="lg" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/>
</Badge>
<Badge content="5" radius="md" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a04258114e29026302d"
/>
</Badge>
<Badge content="5" radius="sm" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a04258114a29026708c"
/>
</Badge>
<Badge content="5" radius="base" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=bfe358194b29026708c"
/>
</Badge>
<Badge content="5" radius="none" color="secondary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a04258114c29026708c"
/>
</Badge>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};

View File

@ -6,7 +6,7 @@ export default function App() {
<Badge content="5" color="danger" shape="rectangle"> <Badge content="5" color="danger" shape="rectangle">
<Avatar <Avatar
isBordered isBordered
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042f81f4e29026024d" src="https://i.pravatar.cc/150?u=a042f81f4e29026024d"
/> />
</Badge> </Badge>

View File

@ -3,36 +3,24 @@ const App = `import {Badge, Avatar} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-3 items-center"> <div className="flex gap-3 items-center">
<Badge content="5" size="xs" color="primary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a042581f4e29026024d"
/>
</Badge>
<Badge content="5" size="sm" color="primary"> <Badge content="5" size="sm" color="primary">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d" src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/> />
</Badge> </Badge>
<Badge content="5" size="md" color="primary"> <Badge content="5" size="md" color="primary">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/300?u=a042581f4e29026709d" src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/> />
</Badge> </Badge>
<Badge content="5" size="lg" color="primary"> <Badge content="5" size="lg" color="primary">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026302d" src="https://i.pravatar.cc/150?u=a04258114e29026302d"
/> />
</Badge> </Badge>
<Badge content="5" size="xl" color="primary">
<Avatar
radius="lg"
src="https://i.pravatar.cc/150?u=a04258114e29026708c"
/>
</Badge>
</div> </div>
); );
}`; }`;

View File

@ -4,7 +4,8 @@ export default function App() {
return ( return (
<Badge content="5" color="primary"> <Badge content="5" color="primary">
<Avatar <Avatar
radius="lg" radius="md"
size="lg"
src="https://i.pravatar.cc/300?u=a042581f4e29026709d" src="https://i.pravatar.cc/300?u=a042581f4e29026709d"
/> />
</Badge> </Badge>

View File

@ -5,25 +5,25 @@ export default function App() {
<div className="flex gap-3 items-center"> <div className="flex gap-3 items-center">
<Badge content="5" color="warning" variant="solid"> <Badge content="5" color="warning" variant="solid">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a042f81f4e29026024d" src="https://i.pravatar.cc/150?u=a042f81f4e29026024d"
/> />
</Badge> </Badge>
<Badge content="5" color="warning" variant="flat"> <Badge content="5" color="warning" variant="flat">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d" src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/> />
</Badge> </Badge>
<Badge content="5" color="warning" variant="faded"> <Badge content="5" color="warning" variant="faded">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026708c" src="https://i.pravatar.cc/150?u=a04258114e29026708c"
/> />
</Badge> </Badge>
<Badge content="5" color="warning" variant="shadow"> <Badge content="5" color="warning" variant="shadow">
<Avatar <Avatar
radius="lg" radius="md"
src="https://i.pravatar.cc/150?u=a04258114e29026302d" src="https://i.pravatar.cc/150?u=a04258114e29026302d"
/> />
</Badge> </Badge>

View File

@ -1,9 +1,9 @@
import usage from "./usage"; import usage from "./usage";
import sizes from "./sizes"; import sizes from "./sizes";
import radius from "./radius";
import disabled from "./disabled"; import disabled from "./disabled";
import colors from "./colors"; import colors from "./colors";
import variants from "./variants"; import variants from "./variants";
import radius from "./radius";
import loading from "./loading"; import loading from "./loading";
import loadingCustom from "./loading-custom"; import loadingCustom from "./loading-custom";
import icons from "./icons"; import icons from "./icons";

View File

@ -4,25 +4,19 @@ export default function App() {
return ( return (
<div className="flex gap-4 items-center"> <div className="flex gap-4 items-center">
<Button radius="full"> <Button radius="full">
Button Full
</Button> </Button>
<Button radius="2xl">
Button
</Button>
<Button radius="xl">
Button
</Button>
<Button radius="lg"> <Button radius="lg">
Button Large
</Button> </Button>
<Button radius="md"> <Button radius="md">
Button Medium
</Button> </Button>
<Button radius="sm"> <Button radius="sm">
Button Small
</Button> </Button>
<Button radius="none"> <Button radius="none">
Button None
</Button> </Button>
</div> </div>
); );

View File

@ -3,20 +3,14 @@ const App = `import {Button} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4 items-center"> <div className="flex gap-4 items-center">
<Button size="xs" radius="md"> <Button size="sm">
Button Small
</Button>
<Button size="sm" radius="md">
Button
</Button> </Button>
<Button size="md"> <Button size="md">
Button Medium
</Button> </Button>
<Button size="lg"> <Button size="lg">
Button Large
</Button>
<Button size="xl" radius="xl">
Button
</Button> </Button>
</div> </div>
); );

View File

@ -14,9 +14,9 @@ export default function App() {
src="/images/hero-card.jpeg" src="/images/hero-card.jpeg"
width={200} width={200}
/> />
<CardFooter className="before:bg-white/10 overflow-hidden justify-between py-2 absolute before:rounded-xl rounded-xl bottom-1 w-[calc(100%_-_8px)] shadow-lg ml-1 z-10"> <CardFooter className="before:bg-white/10 border-white/20 border-1 overflow-hidden justify-between py-2 absolute before:rounded-xl rounded-xl bottom-1 w-[calc(100%_-_8px)] shadow-lg ml-1 z-10">
<p className="text-xs text-white/80">Available soon.</p> <p className="text-tiny text-white/80">Available soon.</p>
<Button color="secondary" radius="full" size="xs"> <Button className="text-tiny" color="secondary" radius="full" size="sm">
Notify me Notify me
</Button> </Button>
</CardFooter> </CardFooter>

View File

@ -155,8 +155,7 @@ export default function App() {
<Card <Card
isBlurred isBlurred
className="border-none bg-background/60 dark:bg-default-100/50 max-w-[610px]" className="border-none bg-background/60 dark:bg-default-100/50 max-w-[610px]"
radius="2xl" shadow="sm"
shadow="lg"
> >
<CardBody> <CardBody>
<div className="grid grid-cols-6 md:grid-cols-12 gap-6 md:gap-4 items-center justify-center"> <div className="grid grid-cols-6 md:grid-cols-12 gap-6 md:gap-4 items-center justify-center">
@ -175,8 +174,8 @@ export default function App() {
<div className="flex justify-between items-start"> <div className="flex justify-between items-start">
<div className="flex flex-col gap-0"> <div className="flex flex-col gap-0">
<h3 className="font-semibold text-foreground/90">Daily Mix</h3> <h3 className="font-semibold text-foreground/90">Daily Mix</h3>
<p className="text-sm text-foreground/80">12 Tracks</p> <p className="text-small text-foreground/80">12 Tracks</p>
<h1 className="text-lg font-medium mt-2">Frontend Radio</h1> <h1 className="text-large font-medium mt-2">Frontend Radio</h1>
</div> </div>
<Button <Button
isIconOnly isIconOnly
@ -204,8 +203,8 @@ export default function App() {
value={33} value={33}
/> />
<div className="flex justify-between"> <div className="flex justify-between">
<p className="text-sm">1:23</p> <p className="text-small">1:23</p>
<p className="text-sm text-foreground/50">4:32</p> <p className="text-small text-foreground/50">4:32</p>
</div> </div>
</div> </div>

View File

@ -9,22 +9,22 @@ export default function App() {
<div className="flex gap-5"> <div className="flex gap-5">
<Avatar isBordered radius="full" size="md" src="/avatars/avatar-1.png" /> <Avatar isBordered radius="full" size="md" src="/avatars/avatar-1.png" />
<div className="flex flex-col gap-1 items-start justify-center"> <div className="flex flex-col gap-1 items-start justify-center">
<h4 className="text-sm font-semibold leading-none text-default-600">Zoey Lang</h4> <h4 className="text-small font-semibold leading-none text-default-600">Zoey Lang</h4>
<h5 className="text-sm tracking-tight text-default-400">@zoeylang</h5> <h5 className="text-small tracking-tight text-default-400">@zoeylang</h5>
</div> </div>
</div> </div>
<Button <Button
className={isFollowed ? "bg-transparent text-foreground border-default-200" : ""} className={isFollowed ? "bg-transparent text-foreground border-default-200" : ""}
color="primary" color="primary"
radius="full" radius="full"
size="sm" size="md"
variant={isFollowed ? "bordered" : "solid"} variant={isFollowed ? "bordered" : "solid"}
onPress={() => setIsFollowed(!isFollowed)} onPress={() => setIsFollowed(!isFollowed)}
> >
{isFollowed ? "Unfollow" : "Follow"} {isFollowed ? "Unfollow" : "Follow"}
</Button> </Button>
</CardHeader> </CardHeader>
<CardBody className="px-3 py-0 text-sm text-default-400"> <CardBody className="px-3 py-0 text-small text-default-400">
<p> <p>
Frontend developer and UI/UX enthusiast. Join me on this coding adventure! Frontend developer and UI/UX enthusiast. Join me on this coding adventure!
</p> </p>
@ -37,12 +37,12 @@ export default function App() {
</CardBody> </CardBody>
<CardFooter className="gap-3"> <CardFooter className="gap-3">
<div className="flex gap-1"> <div className="flex gap-1">
<p className="font-semibold text-default-400 text-sm">4</p> <p className="font-semibold text-default-400 text-small">4</p>
<p className=" text-default-400 text-sm">Following</p> <p className=" text-default-400 text-small">Following</p>
</div> </div>
<div className="flex gap-1"> <div className="flex gap-1">
<p className="font-semibold text-default-400 text-sm">97.1K</p> <p className="font-semibold text-default-400 text-small">97.1K</p>
<p className="text-default-400 text-sm">Followers</p> <p className="text-default-400 text-small">Followers</p>
</div> </div>
</CardFooter> </CardFooter>
</Card> </Card>

View File

@ -5,8 +5,8 @@ export default function App() {
<div className="max-w-[900px] gap-2 grid grid-cols-12 grid-rows-2 px-8"> <div className="max-w-[900px] gap-2 grid grid-cols-12 grid-rows-2 px-8">
<Card className="col-span-12 sm:col-span-4 h-[300px]"> <Card className="col-span-12 sm:col-span-4 h-[300px]">
<CardHeader className="absolute z-10 top-1 flex-col !items-start"> <CardHeader className="absolute z-10 top-1 flex-col !items-start">
<p className="text-xs text-white/60 uppercase font-bold">What to watch</p> <p className="text-tiny text-white/60 uppercase font-bold">What to watch</p>
<h4 className="text-white font-medium text-lg">Stream the Acme event</h4> <h4 className="text-white font-medium text-large">Stream the Acme event</h4>
</CardHeader> </CardHeader>
<Image <Image
removeWrapper removeWrapper
@ -17,8 +17,8 @@ export default function App() {
</Card> </Card>
<Card className="col-span-12 sm:col-span-4 h-[300px]"> <Card className="col-span-12 sm:col-span-4 h-[300px]">
<CardHeader className="absolute z-10 top-1 flex-col !items-start"> <CardHeader className="absolute z-10 top-1 flex-col !items-start">
<p className="text-xs text-white/60 uppercase font-bold">Plant a tree</p> <p className="text-tiny text-white/60 uppercase font-bold">Plant a tree</p>
<h4 className="text-white font-medium text-lg">Contribute to the planet</h4> <h4 className="text-white font-medium text-large">Contribute to the planet</h4>
</CardHeader> </CardHeader>
<Image <Image
removeWrapper removeWrapper
@ -29,8 +29,8 @@ export default function App() {
</Card> </Card>
<Card className="col-span-12 sm:col-span-4 h-[300px]"> <Card className="col-span-12 sm:col-span-4 h-[300px]">
<CardHeader className="absolute z-10 top-1 flex-col !items-start"> <CardHeader className="absolute z-10 top-1 flex-col !items-start">
<p className="text-xs text-white/60 uppercase font-bold">Supercharged</p> <p className="text-tiny text-white/60 uppercase font-bold">Supercharged</p>
<h4 className="text-white font-medium text-lg">Creates beauty like a beast</h4> <h4 className="text-white font-medium text-large">Creates beauty like a beast</h4>
</CardHeader> </CardHeader>
<Image <Image
removeWrapper removeWrapper
@ -41,7 +41,7 @@ export default function App() {
</Card> </Card>
<Card isFooterBlurred className="w-full h-[300px] col-span-12 sm:col-span-5"> <Card isFooterBlurred className="w-full h-[300px] col-span-12 sm:col-span-5">
<CardHeader className="absolute z-10 top-1 flex-col items-start"> <CardHeader className="absolute z-10 top-1 flex-col items-start">
<p className="text-xs text-white/60 uppercase font-bold">New</p> <p className="text-tiny text-white/60 uppercase font-bold">New</p>
<h4 className="text-black font-medium text-2xl">Acme camera</h4> <h4 className="text-black font-medium text-2xl">Acme camera</h4>
</CardHeader> </CardHeader>
<Image <Image
@ -50,19 +50,19 @@ export default function App() {
className="z-0 w-full h-full scale-125 -translate-y-6 object-cover" className="z-0 w-full h-full scale-125 -translate-y-6 object-cover"
src="/images/card-example-6.jpeg" src="/images/card-example-6.jpeg"
/> />
<CardFooter className="absolute bg-white/30 bottom-0 border-t border-zinc-100/50 z-10 justify-between"> <CardFooter className="absolute bg-white/30 bottom-0 border-t-1 border-zinc-100/50 z-10 justify-between">
<div> <div>
<p className="text-black text-xs">Available soon.</p> <p className="text-black text-tiny">Available soon.</p>
<p className="text-black text-xs">Get notified.</p> <p className="text-black text-tiny">Get notified.</p>
</div> </div>
<Button color="primary" radius="full" size="sm"> <Button className="text-tiny" color="primary" radius="full" size="sm">
Notify Me Notify Me
</Button> </Button>
</CardFooter> </CardFooter>
</Card> </Card>
<Card isFooterBlurred className="w-full h-[300px] col-span-12 sm:col-span-7"> <Card isFooterBlurred className="w-full h-[300px] col-span-12 sm:col-span-7">
<CardHeader className="absolute z-10 top-1 flex-col items-start"> <CardHeader className="absolute z-10 top-1 flex-col items-start">
<p className="text-xs text-white/60 uppercase font-bold">Your day your way</p> <p className="text-tiny text-white/60 uppercase font-bold">Your day your way</p>
<h4 className="text-white/90 font-medium text-xl">Your checklist for better sleep</h4> <h4 className="text-white/90 font-medium text-xl">Your checklist for better sleep</h4>
</CardHeader> </CardHeader>
<Image <Image
@ -71,7 +71,7 @@ export default function App() {
className="z-0 w-full h-full object-cover" className="z-0 w-full h-full object-cover"
src="/images/card-example-5.jpeg" src="/images/card-example-5.jpeg"
/> />
<CardFooter className="absolute bg-black/40 bottom-0 z-10 border-t border-default-600 dark:border-default-100"> <CardFooter className="absolute bg-black/40 bottom-0 z-10 border-t-1 border-default-600 dark:border-default-100">
<div className="flex flex-grow gap-2 items-center"> <div className="flex flex-grow gap-2 items-center">
<img <img
alt="Breathing app icon" alt="Breathing app icon"
@ -79,8 +79,8 @@ export default function App() {
src="/images/breathing-app-icon.jpeg" src="/images/breathing-app-icon.jpeg"
/> />
<div className="flex flex-col"> <div className="flex flex-col">
<p className="text-xs text-white/60">Breathing App</p> <p className="text-tiny text-white/60">Breathing App</p>
<p className="text-xs text-white/60">Get a good night's sleep.</p> <p className="text-tiny text-white/60">Get a good night's sleep.</p>
</div> </div>
</div> </div>
<Button radius="full" size="sm">Get App</Button> <Button radius="full" size="sm">Get App</Button>

View File

@ -13,7 +13,7 @@ export default function App() {
/> />
<div className="flex flex-col"> <div className="flex flex-col">
<p className="text-md">NextUI</p> <p className="text-md">NextUI</p>
<p className="text-sm text-default-500">nextui.org</p> <p className="text-small text-default-500">nextui.org</p>
</div> </div>
</CardHeader> </CardHeader>
<Divider/> <Divider/>

View File

@ -4,9 +4,9 @@ export default function App() {
return ( return (
<Card className="py-4"> <Card className="py-4">
<CardHeader className="pb-0 pt-2 px-4 flex-col items-start"> <CardHeader className="pb-0 pt-2 px-4 flex-col items-start">
<p className="text-xs uppercase font-bold">Daily Mix</p> <p className="text-tiny uppercase font-bold">Daily Mix</p>
<small className="text-default-500">12 Tracks</small> <small className="text-default-500">12 Tracks</small>
<h4 className="font-bold text-lg">Frontend Radio</h4> <h4 className="font-bold text-large">Frontend Radio</h4>
</CardHeader> </CardHeader>
<CardBody className="overflow-visible py-2"> <CardBody className="overflow-visible py-2">
<Image <Image

View File

@ -47,18 +47,18 @@ export default function App() {
return ( return (
<div className="gap-2 grid grid-cols-2 sm:grid-cols-4"> <div className="gap-2 grid grid-cols-2 sm:grid-cols-4">
{list.map((item, index) => ( {list.map((item, index) => (
<Card key={index} isPressable onPress={() => console.log("item pressed")}> <Card shadow="sm" key={index} isPressable onPress={() => console.log("item pressed")}>
<CardBody className="overflow-visible p-0"> <CardBody className="overflow-visible p-0">
<Image <Image
shadow="lg" shadow="lg"
radius="xl" radius="lg"
width="100%" width="100%"
alt={item.title} alt={item.title}
className="w-full object-cover h-[140px]" className="w-full object-cover h-[140px]"
src={item.img} src={item.img}
/> />
</CardBody> </CardBody>
<CardFooter className="text-sm justify-between"> <CardFooter className="text-small justify-between">
<b>{item.title}</b> <b>{item.title}</b>
<p className="text-default-500">{item.price}</p> <p className="text-default-500">{item.price}</p>
</CardFooter> </CardFooter>

View File

@ -15,7 +15,7 @@ export default function App() {
<Checkbox value="sydney">Sydney</Checkbox> <Checkbox value="sydney">Sydney</Checkbox>
<Checkbox value="san-francisco">San Francisco</Checkbox> <Checkbox value="san-francisco">San Francisco</Checkbox>
</CheckboxGroup> </CheckboxGroup>
<p className="text-default-500 text-sm">Selected: {selected.join(", ")}</p> <p className="text-default-500 text-small">Selected: {selected.join(", ")}</p>
</div> </div>
); );
}`; }`;

View File

@ -17,17 +17,17 @@ export const CustomCheckbox = ({ user, statusColor, value }) => {
> >
<div className="w-full flex justify-between gap-2"> <div className="w-full flex justify-between gap-2">
<User <User
avatarProps={{ size: "sm", src: user.avatar }} avatarProps={{ size: "md", src: user.avatar }}
description={ description={
<Link isExternal href={user.url} size="xs"> <Link isExternal href={user.url} size="sm">
@{user.username} @{user.username}
</Link> </Link>
} }
name={user.name} name={user.name}
/> />
<div className="flex flex-col items-end gap-1"> <div className="flex flex-col items-end gap-1">
<span className="text-xs text-default-500">{user.role}</span> <span className="text-tiny text-default-500">{user.role}</span>
<Chip color={statusColor} size="xs" variant="flat"> <Chip color={statusColor} size="sm" variant="flat">
{user.status} {user.status}
</Chip> </Chip>
</div> </div>

View File

@ -29,17 +29,17 @@ export default function App() {
> >
<div className="w-full flex justify-between gap-2"> <div className="w-full flex justify-between gap-2">
<User <User
avatarProps={{size: "sm", src: user.avatar}} avatarProps={{size: "md", src: user.avatar}}
description={ description={
<Link isExternal href={user.url} size="xs"> <Link isExternal href={user.url} size="sm">
@{user.username} @{user.username}
</Link> </Link>
} }
name={user.name} name={user.name}
/> />
<div className="flex flex-col items-end gap-1"> <div className="flex flex-col items-end gap-1">
<span className="text-xs text-default-500">{user.role}</span> <span className="text-tiny text-default-500">{user.role}</span>
<Chip color="secondary" size="xs" variant="flat"> <Chip color="success" size="sm" variant="flat">
{user.status} {user.status}
</Chip> </Chip>
</div> </div>

View File

@ -3,11 +3,11 @@ const App = `import {Checkbox} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Checkbox defaultSelected radius="full">Option</Checkbox> <Checkbox defaultSelected radius="full">Full</Checkbox>
<Checkbox defaultSelected radius="lg">Option</Checkbox> <Checkbox defaultSelected radius="lg">Large</Checkbox>
<Checkbox defaultSelected radius="md">Option</Checkbox> <Checkbox defaultSelected radius="md">Medium</Checkbox>
<Checkbox defaultSelected radius="sm">Option</Checkbox> <Checkbox defaultSelected radius="sm">Small</Checkbox>
<Checkbox defaultSelected radius="none">Option</Checkbox> <Checkbox defaultSelected radius="none">None</Checkbox>
</div> </div>
); );
}`; }`;

View File

@ -3,11 +3,9 @@ const App = `import {Checkbox} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Checkbox defaultSelected size="xs">Option</Checkbox> <Checkbox defaultSelected size="sm">Small</Checkbox>
<Checkbox defaultSelected size="sm">Option</Checkbox> <Checkbox defaultSelected size="md">Medium</Checkbox>
<Checkbox defaultSelected size="md">Option</Checkbox> <Checkbox defaultSelected size="lg">Large</Checkbox>
<Checkbox defaultSelected size="lg">Option</Checkbox>
<Checkbox defaultSelected size="xl">Option</Checkbox>
</div> </div>
); );
}`; }`;

View File

@ -17,7 +17,7 @@ export default function App() {
<Chip <Chip
variant="flat" variant="flat"
avatar={ avatar={
<Avatar name="JW" size="xs" getInitials={(name) => name.charAt(0)} /> <Avatar name="JW" size="sm" getInitials={(name) => name.charAt(0)} />
} }
> >
Avatar Avatar

View File

@ -5,7 +5,7 @@ export default function App() {
<Chip <Chip
variant="shadow" variant="shadow"
classNames={{ classNames={{
base: "bg-gradient-to-br from-indigo-500 to-pink-500 border border-white/50 shadow-pink-500/30", base: "bg-gradient-to-br from-indigo-500 to-pink-500 border-small border-white/50 shadow-pink-500/30",
content: "drop-shadow shadow-black text-white", content: "drop-shadow shadow-black text-white",
}} }}
> >

View File

@ -3,11 +3,10 @@ const App = `import {Chip} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Chip radius="full">Chip</Chip> <Chip radius="full">Full</Chip>
<Chip radius="lg">Chip</Chip> <Chip radius="lg">Large</Chip>
<Chip radius="md">Chip</Chip> <Chip radius="md">Medium</Chip>
<Chip radius="sm">Chip</Chip> <Chip radius="sm">Small</Chip>
<Chip radius="none">Chip</Chip>
</div> </div>
); );
}`; }`;

View File

@ -3,11 +3,9 @@ const App = `import {Chip} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Chip size="xs">Chip</Chip> <Chip size="sm">Small</Chip>
<Chip size="sm">Chip</Chip> <Chip size="md">Medium</Chip>
<Chip size="md">Chip</Chip> <Chip size="lg">Large</Chip>
<Chip size="lg">Chip</Chip>
<Chip size="xl">Chip</Chip>
</div> </div>
); );
}`; }`;

View File

@ -20,7 +20,7 @@ export default function App() {
<Chip <Chip
classNames={{ classNames={{
base: "border-1 border-white/30", base: "border-1 border-white/30",
content: "text-white/90 text-sm font-semibold", content: "text-white/90 text-small font-semibold",
}} }}
variant="bordered" variant="bordered"
> >

View File

@ -3,11 +3,9 @@ const App = `import {CircularProgress} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<CircularProgress size="xs" aria-label="Loading..."/>
<CircularProgress size="sm" aria-label="Loading..."/> <CircularProgress size="sm" aria-label="Loading..."/>
<CircularProgress size="md" aria-label="Loading..."/> <CircularProgress size="md" aria-label="Loading..."/>
<CircularProgress size="lg" aria-label="Loading..."/> <CircularProgress size="lg" aria-label="Loading..."/>
<CircularProgress size="xl" aria-label="Loading..."/>
</div> </div>
); );
}`; }`;

View File

@ -4,7 +4,7 @@ export default function App() {
return ( return (
<CircularProgress <CircularProgress
label="Speed" label="Speed"
size="xl" size="lg"
value={70} value={70}
color="success" color="success"
formatOptions={{ style: "unit", unit: "kilometer" }} formatOptions={{ style: "unit", unit: "kilometer" }}

View File

@ -3,11 +3,9 @@ const App = `import {Code} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Code size="xs">npm install @nextui-org/react</Code>
<Code size="sm">npm install @nextui-org/react</Code> <Code size="sm">npm install @nextui-org/react</Code>
<Code size="md">npm install @nextui-org/react</Code> <Code size="md">npm install @nextui-org/react</Code>
<Code size="lg">npm install @nextui-org/react</Code> <Code size="lg">npm install @nextui-org/react</Code>
<Code size="xl">npm install @nextui-org/react</Code>
</div> </div>
); );
}`; }`;

View File

@ -4,11 +4,11 @@ export default function App() {
return ( return (
<div className="max-w-md"> <div className="max-w-md">
<div className="space-y-1"> <div className="space-y-1">
<h4 className="text-base font-medium">NextUI Components</h4> <h4 className="text-medium font-medium">NextUI Components</h4>
<p className="text-sm text-default-400">Beautiful, fast and modern React UI library.</p> <p className="text-small text-default-400">Beautiful, fast and modern React UI library.</p>
</div> </div>
<Divider className="my-4" /> <Divider className="my-4" />
<div className="flex h-5 items-center space-x-4 text-sm"> <div className="flex h-5 items-center space-x-4 text-small">
<div>Blog</div> <div>Blog</div>
<Divider orientation="vertical" /> <Divider orientation="vertical" />
<div>Docs</div> <div>Docs</div>

View File

@ -28,9 +28,9 @@ export default function App() {
return ( return (
<Dropdown <Dropdown
showArrow showArrow
radius="lg" radius="sm"
classNames={{ classNames={{
base: "p-0 border border-divider bg-background", base: "p-0 border-small border-divider bg-background",
arrow: "bg-default-200", arrow: "bg-default-200",
}} }}
> >
@ -80,7 +80,7 @@ export default function App() {
<DropdownItem key="settings">Settings</DropdownItem> <DropdownItem key="settings">Settings</DropdownItem>
<DropdownItem <DropdownItem
key="new_project" key="new_project"
endContent={<PlusIcon className="text-lg" />} endContent={<PlusIcon className="text-large" />}
> >
New Project New Project
</DropdownItem> </DropdownItem>
@ -96,7 +96,7 @@ export default function App() {
className="cursor-default" className="cursor-default"
endContent={ endContent={
<select <select
className="z-10 outline-none w-16 py-0.5 rounded-md text-xs group-data-[hover=true]:border-default-500 border border-boundary bg-transparent text-default-500" className="z-10 outline-none w-16 py-0.5 rounded-md text-tiny group-data-[hover=true]:border-default-500 border-small border-default-300 dark:border-default-200 bg-transparent text-default-500"
id="theme" id="theme"
name="theme" name="theme"
> >

View File

@ -21,6 +21,7 @@ export default function App() {
<DropdownMenu <DropdownMenu
aria-label="Single selection actions" aria-label="Single selection actions"
variant="flat" variant="flat"
closeOnSelect={false}
disallowEmptySelection disallowEmptySelection
selectionMode="multiple" selectionMode="multiple"
selectedKeys={selectedKeys} selectedKeys={selectedKeys}

View File

@ -29,3 +29,4 @@ export * from "./modal";
export * from "./pagination"; export * from "./pagination";
export * from "./dropdown"; export * from "./dropdown";
export * from "./navbar"; export * from "./navbar";
export * from "./table";

View File

@ -11,7 +11,7 @@ export default function App() {
]; ];
return ( return (
<div className="w-full flex flex-row gap-4"> <div className="w-full flex flex-row flex-wrap gap-4">
{colors.map((color) => ( {colors.map((color) => (
<Input <Input
key={color} key={color}
@ -20,7 +20,7 @@ export default function App() {
label="Email" label="Email"
placeholder="Enter your email" placeholder="Enter your email"
defaultValue="junior@nextui.org" defaultValue="junior@nextui.org"
className="min-w-[220px]" className="max-w-[220px]"
/> />
))} ))}
</div> </div>

View File

@ -11,7 +11,7 @@ export default function App() {
value={value} value={value}
onValueChange={setValue} onValueChange={setValue}
/> />
<p className="text-default-500 text-sm">Input value: {value}</p> <p className="text-default-500 text-small">Input value: {value}</p>
</div> </div>
); );
}`; }`;

View File

@ -35,7 +35,7 @@ export default function App() {
<Input <Input
label="Search" label="Search"
isClearable isClearable
radius="xl" radius="lg"
classNames={{ classNames={{
label: "text-black/50 dark:text-white/90", label: "text-black/50 dark:text-white/90",
input: [ input: [

View File

@ -3,16 +3,14 @@ const App = `import {Input} from "@nextui-org/react";
export default function App() { export default function App() {
const radius = [ const radius = [
"full", "full",
"xl",
"lg", "lg",
"md", "md",
"sm", "sm",
"base",
"none", "none",
]; ];
return ( return (
<div className="w-full flex flex-row gap-4"> <div className="w-full flex flex-row flex-wrap gap-4">
{radius.map((r) => ( {radius.map((r) => (
<Input <Input
key={r} key={r}
@ -21,7 +19,7 @@ export default function App() {
label="Email" label="Email"
placeholder="Enter your email" placeholder="Enter your email"
defaultValue="junior@nextui.org" defaultValue="junior@nextui.org"
className="min-w-[220px]" className="max-w-[220px]"
/> />
))} ))}
</div> </div>

View File

@ -2,7 +2,7 @@ const App = `import {Input} from "@nextui-org/react";
export default function App() { export default function App() {
const sizes = ["xs", "sm", "md", "lg", "xl"]; const sizes = ["sm", "md", "lg"];
return ( return (
<div className="w-full flex flex-col gap-4"> <div className="w-full flex flex-col gap-4">

View File

@ -39,7 +39,7 @@ export default function App() {
labelPlacement="outside" labelPlacement="outside"
startContent={ startContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">$</span> <span className="text-default-400 text-small">$</span>
</div> </div>
} }
/> />
@ -50,7 +50,7 @@ export default function App() {
labelPlacement="outside" labelPlacement="outside"
startContent={ startContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">https://</span> <span className="text-default-400 text-small">https://</span>
</div> </div>
} }
/> />
@ -72,7 +72,7 @@ export default function App() {
labelPlacement="outside" labelPlacement="outside"
endContent={ endContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">$</span> <span className="text-default-400 text-small">$</span>
</div> </div>
} }
/> />
@ -83,7 +83,7 @@ export default function App() {
labelPlacement="outside" labelPlacement="outside"
endContent={ endContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">.org/</span> <span className="text-default-400 text-small">.org/</span>
</div> </div>
} }
/> />
@ -98,7 +98,7 @@ export default function App() {
} }
endContent={ endContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">@gmail.com</span> <span className="text-default-400 text-small">@gmail.com</span>
</div> </div>
} }
/> />
@ -108,7 +108,7 @@ export default function App() {
labelPlacement="outside" labelPlacement="outside"
startContent={ startContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">$</span> <span className="text-default-400 text-small">$</span>
</div> </div>
} }
endContent={ endContent={
@ -117,7 +117,7 @@ export default function App() {
Currency Currency
</label> </label>
<select <select
className="outline-none border-0 bg-transparent text-default-400 text-sm" className="outline-none border-0 bg-transparent text-default-400 text-small"
id="currency" id="currency"
name="currency" name="currency"
> >
@ -136,12 +136,12 @@ export default function App() {
labelPlacement="outside" labelPlacement="outside"
startContent={ startContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">https://</span> <span className="text-default-400 text-small">https://</span>
</div> </div>
} }
endContent={ endContent={
<div className="pointer-events-none flex items-center"> <div className="pointer-events-none flex items-center">
<span className="text-default-400 text-sm">.org</span> <span className="text-default-400 text-small">.org</span>
</div> </div>
} }
/> />

View File

@ -3,11 +3,9 @@ const App = `import {Link} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Link href="#" size="xs">Link</Link> <Link href="#" size="sm">Small</Link>
<Link href="#" size="sm">Link</Link> <Link href="#" size="md">Medium</Link>
<Link href="#" size="md">Link</Link> <Link href="#" size="lg">Large</Link>
<Link href="#" size="lg">Link</Link>
<Link href="#" size="xl">Link</Link>
</div> </div>
); );
}`; }`;

View File

@ -76,7 +76,7 @@ export default function App() {
<div className="flex py-2 px-1 justify-between"> <div className="flex py-2 px-1 justify-between">
<Checkbox <Checkbox
classNames={{ classNames={{
label: "text-sm", label: "text-small",
}} }}
> >
Remember me Remember me

View File

@ -5,8 +5,8 @@ export default function App() {
<Pagination <Pagination
total={10} total={10}
classNames={{ classNames={{
base: "gap-0 overflow-visible h-8 rounded border border-divider", wrapper: "gap-0 overflow-visible h-8 rounded border border-divider",
item: "w-8 h-8 text-sm rounded-none bg-transparent", item: "w-8 h-8 text-small rounded-none bg-transparent",
cursor: cursor:
"bg-gradient-to-b shadow-lg from-default-500 to-default-800 dark:from-default-300 dark:to-default-100 text-white font-bold", "bg-gradient-to-b shadow-lg from-default-500 to-default-800 dark:from-default-300 dark:to-default-100 text-white font-bold",
}} }}

View File

@ -2,7 +2,7 @@ const App = `import {Pagination} from "@nextui-org/react";
export default function App() { export default function App() {
const sizes = ["xs", "sm", "md", "lg", "xl"] const sizes = ["sm", "md", "lg"]
return ( return (
<div className="flex flex-wrap gap-4 items-center"> <div className="flex flex-wrap gap-4 items-center">

View File

@ -8,8 +8,8 @@ export default function App() {
</PopoverTrigger> </PopoverTrigger>
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>

View File

@ -8,7 +8,7 @@ export default function App() {
<PopoverContent className="w-[240px]"> <PopoverContent className="w-[240px]">
{(titleProps) => ( {(titleProps) => (
<div className="px-1 py-2 w-full"> <div className="px-1 py-2 w-full">
<p className="text-sm font-bold text-foreground" {...titleProps}> <p className="text-small font-bold text-foreground" {...titleProps}>
Dimensions Dimensions
</p> </p>
<div className="mt-2 flex flex-col gap-2 w-full"> <div className="mt-2 flex flex-col gap-2 w-full">
@ -33,7 +33,7 @@ export default function App() {
backdrop={backdrop} backdrop={backdrop}
> >
<PopoverTrigger> <PopoverTrigger>
<Button color="warning" className="capitalize"> <Button color="warning" variant="flat" className="capitalize">
{backdrop} {backdrop}
</Button> </Button>
</PopoverTrigger> </PopoverTrigger>

View File

@ -4,8 +4,8 @@ export default function App() {
const content = ( const content = (
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
); );

View File

@ -11,12 +11,12 @@ export default function App() {
</PopoverTrigger> </PopoverTrigger>
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>
<p className="text-sm text-default-400">Open: {isOpen ? "true" : "false"}</p> <p className="text-small text-default-400">Open: {isOpen ? "true" : "false"}</p>
</div> </div>
); );
}`; }`;

View File

@ -36,8 +36,8 @@ export default function App() {
</PopoverTrigger> </PopoverTrigger>
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>

View File

@ -17,10 +17,10 @@ export default function App() {
<PopoverContent> <PopoverContent>
{(titleProps) => ( {(titleProps) => (
<div className="px-1 py-2"> <div className="px-1 py-2">
<h3 className="text-sm font-bold" {...titleProps}> <h3 className="text-small font-bold" {...titleProps}>
Popover Content Popover Content
</h3> </h3>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
)} )}
</PopoverContent> </PopoverContent>

View File

@ -4,13 +4,13 @@ export const UserTwitterCard = () => {
const [isFollowed, setIsFollowed] = React.useState(false); const [isFollowed, setIsFollowed] = React.useState(false);
return ( return (
<Card className="max-w-[300px] border-none bg-transparent"> <Card shadow="none" className="max-w-[300px] border-none bg-transparent">
<CardHeader className="justify-between"> <CardHeader className="justify-between">
<div className="flex gap-3"> <div className="flex gap-3">
<Avatar isBordered radius="full" size="md" src="https://i.pravatar.cc/150?u=a04258114e29026702d" /> <Avatar isBordered radius="full" size="md" src="https://i.pravatar.cc/150?u=a04258114e29026702d" />
<div className="flex flex-col items-start justify-center"> <div className="flex flex-col items-start justify-center">
<h4 className="text-sm font-semibold leading-none text-default-600">Zoey Lang</h4> <h4 className="text-small font-semibold leading-none text-default-600">Zoey Lang</h4>
<h5 className="text-sm tracking-tight text-default-400">@zoeylang</h5> <h5 className="text-small tracking-tight text-default-500">@zoeylang</h5>
</div> </div>
</div> </div>
<Button <Button
@ -25,7 +25,7 @@ export const UserTwitterCard = () => {
</Button> </Button>
</CardHeader> </CardHeader>
<CardBody className="px-3 py-0"> <CardBody className="px-3 py-0">
<p className="text-sm pl-px text-default-400"> <p className="text-small pl-px text-default-500">
Full-stack developer, @getnextui lover she/her Full-stack developer, @getnextui lover she/her
<span aria-label="confetti" role="img"> <span aria-label="confetti" role="img">
🎉 🎉
@ -34,12 +34,12 @@ export const UserTwitterCard = () => {
</CardBody> </CardBody>
<CardFooter className="gap-3"> <CardFooter className="gap-3">
<div className="flex gap-1"> <div className="flex gap-1">
<p className="font-semibold text-default-400 text-sm">4</p> <p className="font-semibold text-default-600 text-small">4</p>
<p className=" text-default-400 text-sm">Following</p> <p className=" text-default-500 text-small">Following</p>
</div> </div>
<div className="flex gap-1"> <div className="flex gap-1">
<p className="font-semibold text-default-400 text-sm">97.1K</p> <p className="font-semibold text-default-600 text-small">97.1K</p>
<p className="text-default-400 text-sm">Followers</p> <p className="text-default-500 text-small">Followers</p>
</div> </div>
</CardFooter> </CardFooter>
</Card> </Card>
@ -64,7 +64,7 @@ export default function App() {
/> />
</PopoverTrigger> </PopoverTrigger>
<PopoverContent className="p-1"> <PopoverContent className="p-1">
<UserTwitterCard/> <UserTwitterCard />
</PopoverContent> </PopoverContent>
</Popover> </Popover>
); );

View File

@ -8,8 +8,8 @@ export default function App() {
</PopoverTrigger> </PopoverTrigger>
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>

View File

@ -4,8 +4,8 @@ export default function App() {
const content = ( const content = (
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
); );

View File

@ -9,10 +9,10 @@ export default function App() {
<PopoverContent> <PopoverContent>
{(titleProps) => ( {(titleProps) => (
<div className="px-1 py-2"> <div className="px-1 py-2">
<h3 className="text-sm font-bold" {...titleProps}> <h3 className="text-small font-bold" {...titleProps}>
Popover Content Popover Content
</h3> </h3>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
)} )}
</PopoverContent> </PopoverContent>

View File

@ -8,8 +8,8 @@ export default function App() {
</PopoverTrigger> </PopoverTrigger>
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>

View File

@ -4,8 +4,8 @@ export default function App() {
const content = ( const content = (
<PopoverContent> <PopoverContent>
<div className="px-1 py-2"> <div className="px-1 py-2">
<div className="text-sm font-bold">Popover Content</div> <div className="text-small font-bold">Popover Content</div>
<div className="text-xs">This is the popover content</div> <div className="text-tiny">This is the popover content</div>
</div> </div>
</PopoverContent> </PopoverContent>
); );

View File

@ -9,7 +9,7 @@ export default function App() {
<PopoverContent className="w-[240px]"> <PopoverContent className="w-[240px]">
{(titleProps) => ( {(titleProps) => (
<div className="px-1 py-2 w-full"> <div className="px-1 py-2 w-full">
<p className="text-sm font-bold text-foreground" {...titleProps}> <p className="text-small font-bold text-foreground" {...titleProps}>
Dimensions Dimensions
</p> </p>
<div className="mt-2 flex flex-col gap-2 w-full"> <div className="mt-2 flex flex-col gap-2 w-full">

View File

@ -3,7 +3,7 @@ const App = `import { Progress } from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<Progress <Progress
size="xs" size="sm"
isIndeterminate isIndeterminate
aria-label="Loading..." aria-label="Loading..."
className="max-w-md" className="max-w-md"

View File

@ -3,11 +3,9 @@ const App = `import {Progress} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex flex-col gap-6 w-full max-w-md"> <div className="flex flex-col gap-6 w-full max-w-md">
<Progress size="xs" aria-label="Loading..." value={30} /> <Progress size="sm" aria-label="Loading..." value={30} />
<Progress size="sm" aria-label="Loading..." value={40} /> <Progress size="md" aria-label="Loading..." value={40} />
<Progress size="md" aria-label="Loading..." value={50} /> <Progress size="lg" aria-label="Loading..." value={50} />
<Progress size="lg" aria-label="Loading..." value={60} />
<Progress size="xl" aria-label="Loading..." value={70} />
</div> </div>
); );
}`; }`;

View File

@ -16,7 +16,7 @@ export default function App() {
<Radio value="london">London</Radio> <Radio value="london">London</Radio>
<Radio value="tokyo">Tokyo</Radio> <Radio value="tokyo">Tokyo</Radio>
</RadioGroup> </RadioGroup>
<p className="text-default-500 text-sm">Selected: {selected}</p> <p className="text-default-500 text-small">Selected: {selected}</p>
</div> </div>
); );
}`; }`;

View File

@ -32,7 +32,7 @@ export const CustomRadio = (props) => {
<div {...getLabelWrapperProps()}> <div {...getLabelWrapperProps()}>
{children && <span {...getLabelProps()}>{children}</span>} {children && <span {...getLabelProps()}>{children}</span>}
{description && ( {description && (
<span className="text-sm text-foreground opacity-70">{description}</span> <span className="text-small text-foreground opacity-70">{description}</span>
)} )}
</div> </div>
</Component> </Component>
@ -92,7 +92,7 @@ export const CustomRadio = (props: RadioProps) => {
<div {...getLabelWrapperProps()}> <div {...getLabelWrapperProps()}>
{children && <span {...getLabelProps()}>{children}</span>} {children && <span {...getLabelProps()}>{children}</span>}
{description && ( {description && (
<span className="text-sm text-foreground opacity-70">{description}</span> <span className="text-small text-foreground opacity-70">{description}</span>
)} )}
</div> </div>
</Component> </Component>

View File

@ -2,7 +2,7 @@ const App = `import {Snippet} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex flex-wrap gap-4">
<Snippet color="default">npm install @nextui-org/react</Snippet> <Snippet color="default">npm install @nextui-org/react</Snippet>
<Snippet color="primary">npm install @nextui-org/react</Snippet> <Snippet color="primary">npm install @nextui-org/react</Snippet>
<Snippet color="secondary">npm install @nextui-org/react</Snippet> <Snippet color="secondary">npm install @nextui-org/react</Snippet>

View File

@ -2,12 +2,10 @@ const App = `import {Snippet} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex flex-wrap gap-4">
<Snippet size="xs">npm install @nextui-org/react</Snippet>
<Snippet size="sm">npm install @nextui-org/react</Snippet> <Snippet size="sm">npm install @nextui-org/react</Snippet>
<Snippet size="md">npm install @nextui-org/react</Snippet> <Snippet size="md">npm install @nextui-org/react</Snippet>
<Snippet size="lg">npm install @nextui-org/react</Snippet> <Snippet size="lg">npm install @nextui-org/react</Snippet>
<Snippet size="xl">npm install @nextui-org/react</Snippet>
</div> </div>
); );
}`; }`;

View File

@ -2,7 +2,7 @@ const App = `import {Snippet} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex flex-wrap gap-4">
<Snippet variant="bordered">npm install @nextui-org/react</Snippet> <Snippet variant="bordered">npm install @nextui-org/react</Snippet>
<Snippet variant="flat" color="warning">npm install @nextui-org/react</Snippet> <Snippet variant="flat" color="warning">npm install @nextui-org/react</Snippet>
<Snippet variant="solid" color="primary">npm install @nextui-org/react</Snippet> <Snippet variant="solid" color="primary">npm install @nextui-org/react</Snippet>

View File

@ -3,10 +3,10 @@ const App = `import {Spinner} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Spinner label="default" color="default" labelColor="foreground"/> <Spinner label="Default" color="default" labelColor="foreground"/>
<Spinner label="Primary" color="primary" labelColor="primary"/> <Spinner label="Primary" color="primary" labelColor="primary"/>
<Spinner label="Secondary" color="secondary" labelColor="secondary"/> <Spinner label="Secondary" color="secondary" labelColor="secondary"/>
<Spinner label="Success" color="secondary" labelColor="success"/> <Spinner label="Success" color="success" labelColor="success"/>
<Spinner label="Warning" color="warning" labelColor="warning"/> <Spinner label="Warning" color="warning" labelColor="warning"/>
<Spinner label="Danger" color="danger" labelColor="danger"/> <Spinner label="Danger" color="danger" labelColor="danger"/>
</div> </div>

View File

@ -3,11 +3,9 @@ const App = `import {Spinner} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Spinner size="xs" />
<Spinner size="sm" /> <Spinner size="sm" />
<Spinner size="md" /> <Spinner size="md" />
<Spinner size="lg" /> <Spinner size="lg" />
<Spinner size="xl" />
</div> </div>
); );
}`; }`;

View File

@ -21,8 +21,8 @@ export default function App() {
}} }}
> >
<div className="flex flex-col gap-1"> <div className="flex flex-col gap-1">
<p className="text-base">Enable early access</p> <p className="text-medium">Enable early access</p>
<p className="text-xs text-default-400"> <p className="text-tiny text-default-400">
Get access to new features before they are released. Get access to new features before they are released.
</p> </p>
</div> </div>

View File

@ -3,11 +3,9 @@ const App = `import {Switch} from "@nextui-org/react";
export default function App() { export default function App() {
return ( return (
<div className="flex gap-4"> <div className="flex gap-4">
<Switch defaultSelected size="xs">Option</Switch> <Switch defaultSelected size="sm">Small</Switch>
<Switch defaultSelected size="sm">Option</Switch> <Switch defaultSelected size="md">Medium</Switch>
<Switch defaultSelected size="md">Option</Switch> <Switch defaultSelected size="lg">Large</Switch>
<Switch defaultSelected size="lg">Option</Switch>
<Switch defaultSelected size="xl">Option</Switch>
</div> </div>
); );
}`; }`;

View File

@ -0,0 +1,5 @@
import usage from "./usage";
export const tableContent = {
usage,
};

View File

@ -0,0 +1,43 @@
const App = `import {Table, TableHeader, TableColumn, TableBody, TableRow, TableCell} from "@nextui-org/react";
export default function App() {
return (
<Table aria-label="Example static collection table">
<TableHeader>
<TableColumn>NAME</TableColumn>
<TableColumn>ROLE</TableColumn>
<TableColumn>STATUS</TableColumn>
</TableHeader>
<TableBody>
<TableRow key="1">
<TableCell>Tony Reichert</TableCell>
<TableCell>CEO</TableCell>
<TableCell>Active</TableCell>
</TableRow>
<TableRow key="2">
<TableCell>Zoey Lang</TableCell>
<TableCell>Technical Lead</TableCell>
<TableCell>Paused</TableCell>
</TableRow>
<TableRow key="3">
<TableCell>Jane Fisher</TableCell>
<TableCell>Senior Developer</TableCell>
<TableCell>Active</TableCell>
</TableRow>
<TableRow key="4">
<TableCell>William Howard</TableCell>
<TableCell>Community Manager</TableCell>
<TableCell>Vacation</TableCell>
</TableRow>
</TableBody>
</Table>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};

View File

@ -9,7 +9,7 @@ export default function App() {
<CardBody> <CardBody>
<Tabs <Tabs
fullWidth fullWidth
size="sm" size="md"
aria-label="Tabs form" aria-label="Tabs form"
selectedKey={selected} selectedKey={selected}
onSelectionChange={setSelected} onSelectionChange={setSelected}
@ -23,7 +23,7 @@ export default function App() {
placeholder="Enter your password" placeholder="Enter your password"
type="password" type="password"
/> />
<p className="text-center text-sm"> <p className="text-center text-small">
Need to create an account?{" "} Need to create an account?{" "}
<Link size="sm" onPress={() => setSelected("sign-up")}> <Link size="sm" onPress={() => setSelected("sign-up")}>
Sign up Sign up
@ -46,7 +46,7 @@ export default function App() {
placeholder="Enter your password" placeholder="Enter your password"
type="password" type="password"
/> />
<p className="text-center text-sm"> <p className="text-center text-small">
Already have an account?{" "} Already have an account?{" "}
<Link size="sm" onPress={() => setSelected("login")}> <Link size="sm" onPress={() => setSelected("login")}>
Login Login

Some files were not shown because too many files have changed in this diff Show More