diff --git a/.eslintrc.json b/.eslintrc.json index a22fc1bb0..0220e514b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,8 @@ { - "extends": "next/core-web-vitals", + "parser": "@typescript-eslint/parser", + "extends": ["next/core-web-vitals", "prettier"], "rules": { - "react/no-unknown-property": "off" + "react/no-unknown-property": "off", + "@next/next/no-img-element": "off" } } diff --git a/.npmrc b/.npmrc index 8051a481e..5c6c95870 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ +legacy-peer-deps=true auto-install-peers=true strict-peer-dependencies=false \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..5614e9945 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +documentation \ No newline at end of file diff --git a/.vercelignore b/.vercelignore new file mode 100644 index 000000000..2a6300278 --- /dev/null +++ b/.vercelignore @@ -0,0 +1 @@ +packages/create-material-tailwind/templates \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..3c358317f --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021-2023 Material Tailwind (https://www.material-tailwind.com) by Creative Tim (https://www.creative-tim.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 30a3ece4d..7508973e3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - material-tailwind + material-tailwind

Material Tailwind


@@ -11,7 +11,7 @@ Total Downloads - Version + Version

@@ -22,7 +22,7 @@ Total Downloads - Version + Version

@@ -54,159 +54,297 @@ Visit https: - accordion + accordion - alert + alert - avatar + avatar + Badge Breadcrumbs Button - Card + + + badge + + - breadcrumbs + breadcrumbs - button + button + + + + + Button Group + Card + Checkbox + + + + + button-group - card + card + + + + + checkbox - Checkbox Chip - Dialog + Collapse + Carousel - - checkbox + + chip - - chip + + collapse - - dialog + + carousel + Dialog + Drawer Icon Button - Input - Menu + + + dialog + + + + + drawer + + - icon-button + icon-button + + + Input + Form + List + + - input + input - - menu + + form + + + + + list + Menu Navbar Popover - Progress Bar + + + menu + + - navbar + navbar - popover + popover + + + Progress Bar + Pagination + Radio Button + + - progress-bar + progress-bar + + + + + pagination + + + + + radio-button - Radio Button + Rating Bar Select - Switch + Slider - - radio-button + + rating-bar - select + select - - switch + + slider + Speed Dial + Spinner + Stepper + + + + + speed-dial + + + + + spinner + + + + + stepper + + + + + Switch Tabs - Textarea - Tooltip + Text Area + + + switch + + - tabs + tabs - textarea + textarea + + + + + Timeline + Tooltip + Typography + + + + + timeline - tooltip + tooltip + + + + + typography - Typography + Footer + Image + Video - - typography + + footer + + + + + img + + + + + video + + + + + Sidebar + Table + + + + + sidebar + + + + + table @@ -222,7 +360,7 @@ Learn how to use @material-tailwind/react components to quickly and easily creat
-1. Intall `@material-tailwind/react`. +1. Install `@material-tailwind/react`. ```bash npm i @material-tailwind/react @@ -263,7 +401,7 @@ root.render( - + , ); ``` @@ -300,17 +438,17 @@ Visit https:/ - accordion + accordion - alert + alert - avatar + avatar @@ -322,17 +460,17 @@ Visit https:/ - breadcrumbs + breadcrumbs - button + button - card + card @@ -344,17 +482,17 @@ Visit https:/ - checkbox + checkbox - chip + chip - dialog + dialog @@ -366,17 +504,17 @@ Visit https:/ - icon-button + icon-button - input + input - menu + menu @@ -388,77 +526,77 @@ Visit https:/ - navbar + navbar - pagination + pagination - popover + popover - Progress Bar Radio Button Select + Progress Bar - radio-button + radio-button - select + select - progress-bar + progress-bar - Switch Tabs Textarea + Switch - tabs + tabs - textarea + textarea - switch + switch - Tooltip - Typography + Typography + Tooltip - typography + typography - tooltip + tooltip @@ -474,7 +612,7 @@ Learn how to use @material-tailwind/html components to quickly and easily create
-1. Intall `@material-tailwind/html` +1. Install `@material-tailwind/html` ```bash npm i @material-tailwind/html diff --git a/components/cards/code-preview.tsx b/components/cards/code-preview.tsx deleted file mode 100644 index 9e471bdcc..000000000 --- a/components/cards/code-preview.tsx +++ /dev/null @@ -1,37 +0,0 @@ -// react-simple-code-editor components -import Editor from "react-simple-code-editor"; - -// prism.js -import { highlight, languages } from "prismjs/components/prism-core"; -import "prismjs/components/prism-clike"; -import "prismjs/components/prism-javascript"; -import "prismjs/components/prism-markup"; -require("prismjs/components/prism-jsx"); - -// prop-types -interface Props { - code: String; -} - -export default function CodePreview({ code }: Props) { - return ( -
-
-
-
-
- null} - highlight={(newCode) => highlight(newCode, languages.jsx)} - padding={20} - className="code-editor h-max text-white outline-none focus:outline-none" - style={{ - fontFamily: "Fira Code", - fontWeight: 500, - }} - /> -
-
- ); -} diff --git a/components/cards/component-demo.tsx b/components/cards/component-demo.tsx deleted file mode 100644 index 954857857..000000000 --- a/components/cards/component-demo.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { ReactNode } from "react"; - -// prop-types -interface Props { - id: string; - children: ReactNode; -} - -export default function ComponentDemo({ id, children, ...rest }: Props) { - return ( -
- {children} -
- ); -} diff --git a/components/cards/feature.tsx b/components/cards/feature.tsx deleted file mode 100644 index ca04b5cab..000000000 --- a/components/cards/feature.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { ReactNode } from "react"; - -// @material-tailwind/react components -import { - Card, - CardBody, - CardHeader, - Typography, -} from "@material-tailwind/react"; - -// prop-types -interface Props { - icon?: string; - iconClass?: string; - title: string; - className?: string; - children: ReactNode; -} - -export default function Feature({ - icon, - iconClass = "material-icons", - title, - className, - children, -}: Props) { - return ( - - - {icon} - - - - {title} - - - {children} - - - - ); -} diff --git a/components/cards/testimonial.tsx b/components/cards/testimonial.tsx deleted file mode 100644 index b82b87aa8..000000000 --- a/components/cards/testimonial.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { ReactNode } from "react"; - -// @material-tailwind/react components -import { Card, Typography, CardProps } from "@material-tailwind/react"; - -// prop-types -interface Props { - name: string; - date: string; - children: ReactNode; - color?: CardProps["color"]; -} - -export default function Testimonial({ - name, - date, - children, - color = "transparent", -}: Props) { - return ( - - - {name} - -
- - - {date} - -
- - {children} - -
- - - - - -
-
- ); -} diff --git a/components/code-sandbox.tsx b/components/code-sandbox.tsx deleted file mode 100644 index ca93e71aa..000000000 --- a/components/code-sandbox.tsx +++ /dev/null @@ -1,30 +0,0 @@ -// @material-tailwind/react components -import { IconButton, Tooltip, IconButtonProps } from "@material-tailwind/react"; - -interface Props { - link: string; - color: IconButtonProps["color"]; -} - -export default function CodeSandbox({ link, color = "blue" }: Props) { - return ( - - - - - - - - - - ); -} diff --git a/components/code-tabs.tsx b/components/code-tabs.tsx deleted file mode 100644 index 5f442da2d..000000000 --- a/components/code-tabs.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from "react"; -import { Tabs, TabsHeader, TabsBody, Tab } from "@material-tailwind/react"; -import { v4 as uuidv4 } from 'uuid'; - -interface Props { - children: React.ReactNode[]; -} - -export default function CodeTabs({ children }: Props) { - return ( - - - - Material Tailwind - - - Tailwind CSS - - - - {children.map((el) => - React.cloneElement(el as any, { - className: "p-0", - }) - )} - - - ); -} diff --git a/components/docs/checkout-form.tsx b/components/docs/checkout-form.tsx deleted file mode 100644 index c7a28cb67..000000000 --- a/components/docs/checkout-form.tsx +++ /dev/null @@ -1,210 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ -import React from "react"; -import { useCountries } from "use-react-countries"; -import { - Card, - CardHeader, - CardBody, - Input, - Button, - Typography, - Tabs, - TabsHeader, - TabsBody, - Tab, - TabPanel, - Select, - Option, -} from "@material-tailwind/react"; -import { - BanknotesIcon, - CreditCardIcon, - LockClosedIcon, -} from "@heroicons/react/24/solid"; - -function formatCardNumber(value: string) { - const val = value.replace(/\s+/g, "").replace(/[^0-9]/gi, ""); - const matches = val.match(/\d{4,16}/g); - const match = (matches && matches[0]) || ""; - const parts = []; - - for (let i = 0, len = match.length; i < len; i += 4) { - parts.push(match.substring(i, i + 4)); - } - - if (parts.length) { - return parts.join(" "); - } else { - return value; - } -} - -function formatExpires(value: string) { - return value - .replace(/[^0-9]/g, "") - .replace(/^([2-9])$/g, "0$1") - .replace(/^(1{1})([3-9]{1})$/g, "0$1/$2") - .replace(/^0{1,}/g, "0") - .replace(/^([0-1]{1}[0-9]{1})([0-9]{1,2}).*/g, "$1/$2"); -} - -export default function CheckoutForm() { - const { countries } = useCountries(); - const [type, setType] = React.useState("card"); - const [cardNumber, setCardNumber] = React.useState(""); - const [cardExpires, setCardExpires] = React.useState(""); - - return ( - - -
- -
- - Material Tailwind PRO - -
- - - - setType("card")}> - Pay with Card - - setType("paypal")}> - Pay with PayPal - - - - -
-
- - Personal Details - - -
- -
- - Card Details - - - setCardNumber(event.target.value)} - icon={ - - } - /> -
- setCardExpires(event.target.value)} - containerProps={{ className: "min-w-[72px]" }} - /> - -
- -
- - - Payments are - secure and encrypted - -
-
- -
-
- - Personal Details - - -
- -
- - Billing Address - - - - -
- - - Payments are - secure and encrypted - -
-
-
-
-
-
- ); -} \ No newline at end of file diff --git a/components/docs/profile-menu.tsx b/components/docs/profile-menu.tsx deleted file mode 100644 index b1fa426ba..000000000 --- a/components/docs/profile-menu.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { - Menu, - MenuHandler, - MenuList, - MenuItem, - Avatar, - Typography, -} from "@material-tailwind/react"; -import { - Cog6ToothIcon, - PowerIcon, - InboxArrowDownIcon, - UserCircleIcon, - LifebuoyIcon, -} from "@heroicons/react/24/outline"; - -export default function ProfileMenu() { - return ( - - - - - - - - - My Profile - - - - - - Edit Profile - - - - - - Inbox - - - - - - Help - - -
- - - - Sign Out - - -
-
- ); -} diff --git a/components/docs/wallet-connect-dialog.tsx b/components/docs/wallet-connect-dialog.tsx deleted file mode 100644 index f7b2d4fc8..000000000 --- a/components/docs/wallet-connect-dialog.tsx +++ /dev/null @@ -1,121 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ -import React from "react"; -import { - Button, - Dialog, - DialogHeader, - DialogBody, - DialogFooter, - IconButton, - Typography, - MenuItem, -} from "@material-tailwind/react"; -import { XMarkIcon } from "@heroicons/react/24/outline"; - -export default function WalletConnectDialog() { - const [open, setOpen] = React.useState(false); - const handleOpen = () => setOpen((cur) => !cur); - - return ( - - - - - - Connect a Wallet - - - - - - -
- - Popular - -
    - - metamast - - MetaMask - - - - metamast - - Coinbase Wallet - - - - metamast - - Connect Wallet - - -
-
-
- - More - -
    - - metamast - - Trust Wallet - - - - metamast - - Coinbase Wallet - - -
-
-
- - - New to Ethereum wallets? - - - -
-
- ); -} diff --git a/components/icons/angular.tsx b/components/icons/angular.tsx deleted file mode 100644 index 7fbb8b909..000000000 --- a/components/icons/angular.tsx +++ /dev/null @@ -1,24 +0,0 @@ -export default function AngularLogo() { - return ( - - - - - - ); -} diff --git a/components/icons/html.tsx b/components/icons/html.tsx deleted file mode 100644 index 39faafa8d..000000000 --- a/components/icons/html.tsx +++ /dev/null @@ -1,29 +0,0 @@ -export default function HtmlLogo() { - return ( - - - - - - - - ); -} diff --git a/components/icons/react.tsx b/components/icons/react.tsx deleted file mode 100644 index 8b704f4e1..000000000 --- a/components/icons/react.tsx +++ /dev/null @@ -1,24 +0,0 @@ -export default function ReactLogo() { - return ( - - - - - - - - - - - ); -} diff --git a/components/icons/vue.tsx b/components/icons/vue.tsx deleted file mode 100644 index 9c918bf24..000000000 --- a/components/icons/vue.tsx +++ /dev/null @@ -1,23 +0,0 @@ -export default function VueLogo() { - return ( - - - - - - ); -} diff --git a/components/layout/docs-footer.tsx b/components/layout/docs-footer.tsx deleted file mode 100644 index f7f0e1b00..000000000 --- a/components/layout/docs-footer.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { Fragment } from "react"; - -// next.js components -import Link from "next/link"; - -// @material-tailwind/components -import { Typography } from "@material-tailwind/react"; - -// prop-types -interface Props { - type: "html" | "react" | "vue" | "angular" | "svelte"; - frontMatter: any; -} - -export default function DocsFooter({ type, frontMatter }: Props) { - const date = new Date().getFullYear(); - - return ( - -
- {frontMatter.prev && ( - - - - {frontMatter.prev.includes("-") - ? frontMatter.prev - .split("-") - .map((el) => (el === "css" ? "CSS" : el)) - .join(" ") - : frontMatter.prev} - - - )} - {frontMatter.next && ( - - - {frontMatter.next.includes("-") - ? frontMatter.next - .split("-") - .map((el) => (el === "css" ? "CSS" : el)) - .join(" ") - : frontMatter.next} - - - - )} -
- - Edit this page on Github - - -
- ); -} diff --git a/components/layout/docs-navbar.tsx b/components/layout/docs-navbar.tsx deleted file mode 100644 index eedf4573d..000000000 --- a/components/layout/docs-navbar.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { Dispatch, SetStateAction } from "react"; - -// page components -import Navbar from "components/layout/navbar"; - -// prop-types -interface Props { - slug: string; - setMobileNav: Dispatch>; -} - -export default function DocsNavbar({ slug, setMobileNav }: Props) { - return ( - - -
    -
  1. - React - - - -
  2. -
  3. - {slug.includes("-") ? slug.split("-").join(" ") : slug} -
  4. -
- - } - /> - ); -} diff --git a/components/layout/docs-related.tsx b/components/layout/docs-related.tsx deleted file mode 100644 index ac8fe370c..000000000 --- a/components/layout/docs-related.tsx +++ /dev/null @@ -1,41 +0,0 @@ -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// page components -import Framework from "components/cards/framework"; - -// prop-types -interface Props { - title: string; - route: string; - description: string; -} - -export default function DocsRelated({ routes }: { routes: Props[] }) { - return ( -
- - Related - -
- {routes.map(({ title, route, description }) => ( - -
- - {title} - - - {description} - -
-
- ))} -
-
- ); -} diff --git a/components/layout/footer.tsx b/components/layout/footer.tsx deleted file mode 100644 index ec4ca0a47..000000000 --- a/components/layout/footer.tsx +++ /dev/null @@ -1,179 +0,0 @@ -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -import SectionSubscribe from "components/sections/subscribe"; - -export default function Footer() { - const year = new Date().getFullYear(); - - const socialMedia = [ - { - icon: "fab fa-twitter", - color: "text-light-blue-400", - link: "https://www.twitter.com/creativetim?ref=material-tailwind", - }, - { - icon: "fab fa-facebook-square", - color: "text-light-blue-600", - link: "https://www.facebook.com/creativetim?ref=material-tailwind", - }, - { - icon: "fab fa-dribbble", - color: "text-pink-400", - link: "https://www.dribbble.com/creativetim?ref=material-tailwind", - }, - { - icon: "fab fa-github", - color: "text-gray-900", - link: "https://www.github.com/creativetimofficial?ref=material-tailwind", - }, - { - icon: "fab fa-discord", - color: "text-blue-700", - link: "https://discord.com/invite/gxtg2rJa?ref=material-tailwind", - }, - ]; - - const usefulLink = [ - { - name: "About Us", - link: "https://www.creative-tim.com/presentation?ref=material-tailwind", - }, - { - name: "Blog", - link: "https://www.creative-tim.com/blog?ref=material-tailwind", - }, - { - name: "Github", - link: "https://github.com/creativetimofficial?ref=material-tailwind", - }, - { - name: "Free Products", - link: "https://www.creative-tim.com/templates/free?ref=material-tailwind", - }, - ]; - - const resources = [ - { - name: "MIT License", - link: "https://github.com/creativetimofficial/material-tailwind/blob/main/LICENSE.md?ref=material-tailwind", - }, - { - name: "Contribute", - link: "https://github.com/creativetimofficial/material-tailwind/blob/main/CONTRIBUTING.md?ref=material-tailwind", - }, - { - name: "Code of Conduct", - link: "https://github.com/creativetimofficial/material-tailwind/blob/main/CODE_OF_CONDUCT.md?ref=material-tailwind", - }, - { - name: "Contact Us", - link: "https://www.creative-tim.com/contact-us?ref=material-tailwind", - }, - ]; - - return ( -
- -
-
-
- - Material Tailwind - - - Easy to use React components for Tailwind CSS and Material Design. - -
- {socialMedia.map(({ icon, color, link }, key) => ( - - - - ))} -
-
-
-
-
- - Useful Links - -
    - {usefulLink.map(({ name, link }, key) => ( -
  • - - {name} - -
  • - ))} -
-
-
- - Other Resources - -
    - {resources.map(({ name, link }, key) => ( -
  • - - {name} - -
  • - ))} -
-
-
-
-
-
-
- - Powered by - - - - - - -
-
- Copyright © {year} Material Tailwind by{" "} - - Creative Tim. - -
-
-
-
-
- ); -} diff --git a/components/layout/header.tsx b/components/layout/header.tsx deleted file mode 100644 index dd5e5fe90..000000000 --- a/components/layout/header.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import { useState, useEffect } from "react"; - -// next.js components -import Image from "next/image"; -import Link from "next/link"; - -// react-copy-to-clipboard components -import { CopyToClipboard } from "react-copy-to-clipboard"; - -// @material-tailwind/react components -import { - Tabs, - TabsHeader, - Tab, - Typography, - Button, - Tooltip, -} from "@material-tailwind/react"; - -export default function Header() { - const [version, setVersion] = useState("npm i @material-tailwind/react"); - const [copied, setCopied] = useState(false); - - useEffect(() => { - setTimeout(() => { - setCopied(false); - }, 3000); - }, [copied]); - - return ( -
-
-
-
-
-
- - - - setVersion("npm i @material-tailwind/react") - } - > - -  React - - - setVersion("npm i @material-tailwind/html") - } - > - -  HTML - - - -
- - Material Tailwind - - - Material Tailwind is an easy to use components library for - Tailwind CSS and Material Design. - -
- - - -
- setCopied(true)} - > -

- {version} - - - -

-
-
-
-
-
- components -
-
-
-
-
- ); -} diff --git a/components/layout/navbar.tsx b/components/layout/navbar.tsx deleted file mode 100644 index 2a38652b2..000000000 --- a/components/layout/navbar.tsx +++ /dev/null @@ -1,318 +0,0 @@ -import { useState, useEffect } from "react"; - -// next.js components -import Link from "next/link"; -import { useRouter } from "next/router"; - -// @material-tailwind/react components -import { - Navbar as MTNavbar, - MobileNav, - IconButton, - Tooltip, - Menu, - MenuHandler, - MenuList, - MenuItem, - Chip, - Button, -} from "@material-tailwind/react"; - -function formatNumber(number, decPlaces) { - decPlaces = Math.pow(10, decPlaces); - - const abbrev = ["K", "M", "B", "T"]; - - for (let i = abbrev.length - 1; i >= 0; i--) { - var size = Math.pow(10, (i + 1) * 3); - - if (size <= number) { - number = Math.round((number * decPlaces) / size) / decPlaces; - - if (number == 1000 && i < abbrev.length - 1) { - number = 1; - i++; - } - - number += abbrev[i]; - - break; - } - } - - return number; -} - -interface NavbarProps { - container?: string; - className?: string; - shadow?: boolean; - sidenavMenu?: any; - mobileNavClassName?: string; - [key: string]: any; -} - -export default function Navbar({ - container, - className, - shadow, - sidenavMenu, - mobileNavClassName = "text-[#1A237E]", - ...rest -}: NavbarProps) { - const { query } = useRouter(); - const [open, setOpen] = useState(false); - const [stars, setStars] = useState(0); - const navbarItemClasses = - "flex items-center px-1 py-2 font-normal transition-all duration-250 text-size-sm text-current font-light lg:px-2 cursor-pointer"; - - useEffect(() => { - window.addEventListener("resize", () => { - window.innerWidth >= 960 && setOpen(false); - }); - }, []); - - useEffect(() => { - const stars = fetch( - "https://api.github.com/repos/creativetimofficial/material-tailwind" - ) - .then((response) => response.json()) - .then((data) => setStars(formatNumber(data.stargazers_count, 1))); - }, []); - - const menuOpenIcon = ( - - - - ); - - const menuCloseIcon = ( - - - - ); - - const navbarMenu = ( -
- - -
- ); - - return ( -
- -
- - Material Tailwind - - setOpen(!open)} - > - {open ? menuCloseIcon : menuOpenIcon} - -
- {navbarMenu} -
-
- - - {navbarMenu} - - {sidenavMenu} -
-
- ); -} diff --git a/components/layout/page-map.tsx b/components/layout/page-map.tsx deleted file mode 100644 index 94cc60ee5..000000000 --- a/components/layout/page-map.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { useState, useEffect } from "react"; - -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -export default function PageMap({ frontMatter }) { - const [hash, setHash] = useState(frontMatter[0]); - - useEffect(() => { - window.addEventListener("hashchange", () => { - const hashLink = window.location.hash.replace("#", ""); - - setHash(hashLink); - }); - }, []); - - return ( - - ); -} diff --git a/components/layout/sidenav.tsx b/components/layout/sidenav.tsx deleted file mode 100644 index a0dec67bf..000000000 --- a/components/layout/sidenav.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { Dispatch, SetStateAction } from "react"; - -// nest.js components -import Link from "next/link"; - -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// prop-types -interface Props { - routes: { - name: string; - icon: string; - pages: string[]; - }[]; - type: "html" | "react" | "vue" | "angular" | "svelte"; - slug: string; - mobileNav: boolean; - setMobileNav: Dispatch>; -} - -function Sidenav({ routes, type, slug, mobileNav, setMobileNav }: Props) { - const colors = { - html: "from-pink-400 to-pink-600", - react: "from-blue-400 to-blue-600", - }; - - return ( - - ); -} - -export default Sidenav; diff --git a/components/pre.tsx b/components/pre.tsx deleted file mode 100644 index bc9a3f245..000000000 --- a/components/pre.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import { cloneElement, useRef, useState, useEffect, ReactElement } from "react"; - -// @material-tailwind/react components -import { IconButton, Tooltip, IconButtonProps } from "@material-tailwind/react"; - -// copy to clipboard functionality -function copyToClipboard(text) { - return new Promise((resolve, reject) => { - if (navigator?.clipboard) { - const cb = navigator.clipboard; - - cb.writeText(text).then(resolve).catch(reject); - } else { - try { - const body = document.querySelector("body"); - - const textarea = document.createElement("textarea"); - body?.appendChild(textarea); - - textarea.value = text; - textarea.select(); - document.execCommand("copy"); - - body?.removeChild(textarea); - - resolve(); - } catch (e) { - reject(e); - } - } - }); -} - -// prop-types -interface Props { - children: ReactElement; - color: IconButtonProps["color"]; -} - -export default function Pre({ children, color = "blue", ...rest }: Props) { - const [copied, setCopied] = useState(false); - const codeRef = useRef(null); - const handleCopy = () => { - copyToClipboard(codeRef.current.innerText); - setCopied(true); - }; - - useEffect(() => { - const timer = setTimeout(() => setCopied(false), 3000); - - return () => clearTimeout(timer); - }, [copied]); - - return ( - <> -
- - - {copied ? ( - - - - - ) : ( - - - - )} - - -
-
{cloneElement(children, { ref: codeRef })}
- - ); -} diff --git a/components/sections/button.tsx b/components/sections/button.tsx deleted file mode 100644 index 3995f91ac..000000000 --- a/components/sections/button.tsx +++ /dev/null @@ -1,152 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ -import { useState, useEffect } from "react"; - -// next.js components -import Link from "next/link"; - -// react-jsx-parser components -import JsxParser from "react-jsx-parser"; - -// @material-tailwind/react components -import { Typography, Button } from "@material-tailwind/react"; - -// page components -import CodePreview from "components/cards/code-preview"; - -export default function SectionButton() { - const [buttonType, setButtonType] = useState("icon"); - const [buttonCode, setButtonCode] = useState(null); - - useEffect(() => { - switch (buttonType) { - case "default": - setButtonCode(` - - - -`); - break; - case "gradient": - setButtonCode(` - - -`); - break; - case "link": - setButtonCode(` - - -`); - break; - case "icon": - setButtonCode(``); - break; - } - }, [buttonType]); - - const buttonOptionClasses = (type) => ` - cursor-pointer select-none transition-all duration-300 ${ - buttonType === type ? "opacity-100" : "opacity-60" - } - `; - - return ( -
-
-
- - Change your
- - Button's - {" "} - design. -
- - Material Tailwind provides a simple way to customize your button; - you can change the colors, fonts, styling, and everything you need. - - - - -
-
- setButtonType("default")} - > - radio_button_checked - Default - -
-
- setButtonType("gradient")} - > - gradient - Gradient - -
-
- setButtonType("link")} - > - format_color_text - Link - -
-
- setButtonType("icon")} - > - favorite - Icon - -
-
-
-
- - tailwind_blob_blue -
-
- -
-
-
-
-
- ); -} diff --git a/components/sections/colors-palette.tsx b/components/sections/colors-palette.tsx deleted file mode 100644 index 80245d9fd..000000000 --- a/components/sections/colors-palette.tsx +++ /dev/null @@ -1,73 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ - -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// page components -import CodePreview from "components/cards/code-preview"; - -export default function SectionColorsPalette() { - return ( -
-
-
- - - - - - - - - -`} - /> - tailwind_blob_purple - tailwind_colors_pallet -
-
-
- - Awesome
- - Color - {" "} - palette. -
- - Create a color theme that perfectly matches your style and brand, - inspired by{" "} - - Material Design - - . Get color inspiration for your designs with Material Tailwind! - -
-
-
-
- ); -} diff --git a/components/sections/community.tsx b/components/sections/community.tsx deleted file mode 100644 index 35f980036..000000000 --- a/components/sections/community.tsx +++ /dev/null @@ -1,50 +0,0 @@ -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// page components -import Feature from "components/cards/feature"; - -export default function SectionCommnunity() { - return ( -
-
- - Join our comumunity - - - Since Tailwind CSS is an open source project, we want to continue this - movement too. - -
-
-
- - Contribute to our project and help our community! - -
-
- - Join our Discord community and let’s get to know each other. - -
-
- - Follow us on Twitter and keep up-to-date with our latest news. - -
-
-
- ); -} diff --git a/components/sections/components.tsx b/components/sections/components.tsx deleted file mode 100644 index 35380693f..000000000 --- a/components/sections/components.tsx +++ /dev/null @@ -1,149 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ - -// next.js components -import Image from "next/image"; - -// @material-tailwind/react components -import { - Card, - CardHeader, - CardBody, - Typography, - Chip, -} from "@material-tailwind/react"; - -// page components -import CodePreview from "components/cards/code-preview"; - -export default function SectionComponents() { - const components = [ - "accordion", - "breadcrumbs", - "card", - "dropdown", - "navbar", - "popover", - "select", - "tabs", - "tooltip", - ]; - - return ( -
-
-
- - - tailwind-img-blur-shadow - - - - Great for your awesome project - - - Putting together a page has never been easier than - matching together pre-made components. From landing - pages presentation to login areas, you can easily - customise and built your pages. - - -`} - /> - tailwind_blob_purple - - - tailwind_img_blur_shadow - - - - Great for your awesome project - - - Putting together a page has never been easier than matching - together pre-made components. From landing pages presentation to - login areas, you can easily customise and built your pages. - - - Putting together a page has never been easier than matching - together pre-made components. - - - -
-
-
- - - Various styles of
- - Components. - -
- - Putting together a page has never been easier than matching our - pre-made components. Add our ready-styled components to your - project or modify them as you would like. - -
- {components.map((component, key) => ( - - ))} -
-
-
-
-
- ); -} diff --git a/components/sections/features.tsx b/components/sections/features.tsx deleted file mode 100644 index 2004bc81e..000000000 --- a/components/sections/features.tsx +++ /dev/null @@ -1,59 +0,0 @@ -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// page components -import Feature from "components/cards/feature"; - -export default function SectionFeatures() { - const features = [ - { - icon: "dashboard", - title: "Tailwind CSS Components", - desc: "Material Tailwind comes with a huge number of Fully Coded Tailwind CSS components.", - }, - { - icon: "terminal", - title: "JavaScript Components", - desc: "Material Tailwind only features React and HTML components, but in the near future it will future more.", - }, - { - icon: "description", - title: "Documentation", - desc: "This extension comes a lot of fully coded examples that help you get started faster.", - }, - { - icon: "view_carousel", - title: "Templates (soon)", - desc: "Material Tailwind will come with fully coded sample pages so you could start working instantly.", - }, - ]; - - return ( -
-
- - Tailwind CSS-Based Framework - - - Material Tailwind features multiple React and HTML components, all - written with Tailwind CSS classes and Material Design guidelines. - -
-
- {features.map(({ icon, title, desc }, key) => ( -
- - {desc} - -
- ))} -
-
- ); -} diff --git a/components/sections/framework.tsx b/components/sections/framework.tsx deleted file mode 100644 index 250c654b1..000000000 --- a/components/sections/framework.tsx +++ /dev/null @@ -1,131 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ -import { useState, useEffect } from "react"; - -// @material-tailwind/react components -import { Typography, Chip } from "@material-tailwind/react"; - -// page components -import CodePreview from "components/cards/code-preview"; -import ReactLogo from "components/icons/react"; -import HtmlLogo from "components/icons/html"; -import AngularLogo from "components/icons/angular"; -import VueLogo from "components/icons/vue"; - -export default function SectionFramework() { - const [framework, setFramework] = useState("react"); - const [frameworkCode, setFrameworkCode] = useState(null); - - useEffect(() => { - switch (framework) { - case "react": - setFrameworkCode(` - - `); - break; - case "html": - setFrameworkCode(``); - } - }, [framework]); - - return ( -
-
-
- - With your favorite
- - Framework. - -
- - Material Tailwind components can be used with different popular - frameworks like React and HTML. Angular and Vue.js versions are - coming soon! - -
-
setFramework("react")} - > - - - React - -
-
setFramework("html")} - > - - - HTML - -
-
-
- -
- - - Angular - -
-
-
- -
- - - Vue.js - -
-
-
-
- - tailwind_blob_blue -
-
-
- ); -} diff --git a/components/sections/shadow.tsx b/components/sections/shadow.tsx deleted file mode 100644 index ee866de62..000000000 --- a/components/sections/shadow.tsx +++ /dev/null @@ -1,63 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ - -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// page components -import CodePreview from "components/cards/code-preview"; - -export default function SectionShadow() { - return ( -
-
-
- - Realistic
- - Shadows - {" "} - included. -
- - Create a cohesive and modern-looking design for your website with - our collection of realistic shadows. They will help your elements to - pop-up. - -
-
- - - - - - - -`} - /> - tailwind_blob_blue - tailwind_shadows -
-
-
- ); -} diff --git a/components/sections/subscribe.tsx b/components/sections/subscribe.tsx deleted file mode 100644 index df5dd6718..000000000 --- a/components/sections/subscribe.tsx +++ /dev/null @@ -1,62 +0,0 @@ -// @material-tailwind/react components -import { Typography, Button, Input } from "@material-tailwind/react"; - -export default function SectionSubscribe() { - return ( -
-
-
- - Sign up for our newsletter - - - Join our newsletter and get news in your inbox every week! We hate - spam too, so no worries about this. - -
-
-
-
- -
- -
-
-
-
- ); -} diff --git a/components/sections/testimonials.tsx b/components/sections/testimonials.tsx deleted file mode 100644 index 43116d862..000000000 --- a/components/sections/testimonials.tsx +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable @next/next/no-img-element */ - -// @material-tailwind/react components -import { Typography } from "@material-tailwind/react"; - -// page components -import Testimonial from "components/cards/testimonial"; - -export default function SectionTestimonials() { - return ( -
-
- - Trusted by over
- - 1,855,822+ web developers - -
- - Many Fortune 500 companies, startups, universities and governmental - institutions love Creative Tim's products. - -
-
-
- - "This is an excellent product, the documentation is excellent - and helped me get things done more efficiently." - -
-
- - "I found solution to all my design needs from Creative Tim. I - use them as a freelancer in my hobby projects for fun! And its - really affordable, very humble guys !!!" - -
-
- - "Great product. Helped me cut the time to set up a site. I used - the components within instead of starting from scratch. I highly - recommend for developers who want to spend more time on the - backend!." - -
-
-
- tailwind_logo_amazon -
-
- tailwind_logo_ibm -
-
- tailwind_logo_microsoft -
-
- tailwind_logo_cisco -
-
- tailwind_logo_vodafone -
-
-
-
- ); -} diff --git a/components/stack-blitz.tsx b/components/stack-blitz.tsx deleted file mode 100644 index da7b3dd69..000000000 --- a/components/stack-blitz.tsx +++ /dev/null @@ -1,35 +0,0 @@ -// @material-tailwind/react -import { IconButton, IconButtonProps, Tooltip } from "@material-tailwind/react"; - -// prop-types -interface Props { - link: string; - color: IconButtonProps["color"]; -} - -export default function StackBlitz({ link, color = "blue" }: Props) { - return ( - - - - - - - - - - ); -} diff --git a/docs-content/html/accordion/accordion-custom-icon.tsx b/docs-content/html/accordion/accordion-custom-icon.tsx new file mode 100644 index 000000000..b3b31ce45 --- /dev/null +++ b/docs-content/html/accordion/accordion-custom-icon.tsx @@ -0,0 +1,72 @@ +export function AccordionCustomIcon() { + return ( + <> +
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+ + ); +} diff --git a/docs-content/html/accordion/accordion-disabled.tsx b/docs-content/html/accordion/accordion-disabled.tsx new file mode 100644 index 000000000..eaefe2d82 --- /dev/null +++ b/docs-content/html/accordion/accordion-disabled.tsx @@ -0,0 +1,75 @@ +export function AccordionDisabled() { + return ( + <> +
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+ + ); +} diff --git a/docs-content/html/accordion/accordion.tsx b/docs-content/html/accordion/accordion.tsx new file mode 100644 index 000000000..1021ff308 --- /dev/null +++ b/docs-content/html/accordion/accordion.tsx @@ -0,0 +1,75 @@ +export function DefaultAccordion() { + return ( + <> +
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+
+
+ +
+
+
+ We're not always in the position that we want to be at. + We're constantly growing. We're constantly making + mistakes. We're constantly trying to express ourselves and + actualize our dreams. +
+
+
+ + ); +} diff --git a/docs-content/html/accordion/index.ts b/docs-content/html/accordion/index.ts new file mode 100644 index 000000000..11713e533 --- /dev/null +++ b/docs-content/html/accordion/index.ts @@ -0,0 +1,3 @@ +export * from "./accordion"; +export * from "./accordion-custom-icon"; +export * from "./accordion-disabled"; diff --git a/docs-content/html/alert/alert-colors.tsx b/docs-content/html/alert/alert-colors.tsx new file mode 100644 index 000000000..462b26ea3 --- /dev/null +++ b/docs-content/html/alert/alert-colors.tsx @@ -0,0 +1,18 @@ +export function AlertColors() { + return ( +
+
+ An info alert for showing message. +
+
+ An error alert for showing message. +
+
+ A success alert for showing message. +
+
+ A warning alert for showing message. +
+
+ ); +} diff --git a/docs-content/html/alert/alert-custom-close-icon.tsx b/docs-content/html/alert/alert-custom-close-icon.tsx new file mode 100644 index 000000000..7075c2803 --- /dev/null +++ b/docs-content/html/alert/alert-custom-close-icon.tsx @@ -0,0 +1,34 @@ +export function AlertCustomCloseIcon() { + return ( +
+
+ + + +
+
+ Sorry, something went wrong please try again. +
+ +
+ ); +} diff --git a/docs-content/html/alert/alert-dismissible.tsx b/docs-content/html/alert/alert-dismissible.tsx new file mode 100644 index 000000000..742719334 --- /dev/null +++ b/docs-content/html/alert/alert-dismissible.tsx @@ -0,0 +1,32 @@ +export function AlertDismissible() { + return ( +
+
A dismissible alert for showing message.
+ +
+ ); +} diff --git a/docs-content/html/alert/alert-icon.tsx b/docs-content/html/alert/alert-icon.tsx new file mode 100644 index 000000000..1478ce686 --- /dev/null +++ b/docs-content/html/alert/alert-icon.tsx @@ -0,0 +1,28 @@ +export function AlertIcon() { + return ( +
+
+ + + +
+
+ A simple alert with icon for showing message +
+
+ ); +} diff --git a/docs-content/html/alert/alert-variants.tsx b/docs-content/html/alert/alert-variants.tsx new file mode 100644 index 000000000..35f8334dc --- /dev/null +++ b/docs-content/html/alert/alert-variants.tsx @@ -0,0 +1,36 @@ +export function AlertVariants() { + return ( +
+
+
A simple filled alert for showing message.
+
+
+
+ A simple gradient alert for showing message. +
+
+
+
+ A simple outlined alert for showing message. +
+
+
+
+ A simple ghost alert for showing message. +
+
+
+ ); +} diff --git a/docs-content/html/alert/alert-with-content.tsx b/docs-content/html/alert/alert-with-content.tsx new file mode 100644 index 000000000..cf50e4c87 --- /dev/null +++ b/docs-content/html/alert/alert-with-content.tsx @@ -0,0 +1,56 @@ +export function AlertWithContent() { + return ( +
+
+ + + +
+
+
+ Success +
+

+ I don't know what that word means. Im happy. But success, that + goes back to what in somebody's eyes success means. For me, + success is inner peace. That's a good day for me. +

+
+ +
+ ); +} diff --git a/docs-content/html/alert/alert-with-list.tsx b/docs-content/html/alert/alert-with-list.tsx new file mode 100644 index 000000000..a955e09e8 --- /dev/null +++ b/docs-content/html/alert/alert-with-list.tsx @@ -0,0 +1,126 @@ +export function AlertWithList() { + return ( +
+
+
+ + + +
+
+

+ Ensure that these requirements are met: +

+
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+
+
+
+ + + +
+
+

+ Ensure that these requirements are met: +

+
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+
+
+
+ + + +
+
+

+ Ensure that these requirements are met: +

+
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+
+
+
+ + + +
+
+

+ Ensure that these requirements are met: +

+
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+
+
+ ); +} diff --git a/docs-content/html/alert/alert.tsx b/docs-content/html/alert/alert.tsx new file mode 100644 index 000000000..2b2142bec --- /dev/null +++ b/docs-content/html/alert/alert.tsx @@ -0,0 +1,10 @@ +export function AlertDefault() { + return ( +
+
A simple alert for showing message.
+
+ ); +} diff --git a/docs-content/html/alert/index.ts b/docs-content/html/alert/index.ts new file mode 100644 index 000000000..f81aa7968 --- /dev/null +++ b/docs-content/html/alert/index.ts @@ -0,0 +1,8 @@ +export * from "./alert"; +export * from "./alert-colors"; +export * from "./alert-custom-close-icon"; +export * from "./alert-dismissible"; +export * from "./alert-icon"; +export * from "./alert-variants"; +export * from "./alert-with-content"; +export * from "./alert-with-list"; diff --git a/docs-content/html/avatar/avatar-sizes.tsx b/docs-content/html/avatar/avatar-sizes.tsx new file mode 100644 index 000000000..ecf5d3ee2 --- /dev/null +++ b/docs-content/html/avatar/avatar-sizes.tsx @@ -0,0 +1,36 @@ +export function AvatarSizes() { + return ( +
+ avatar + avatar + avatar + avatar + avatar + avatar +
+ ); +} diff --git a/docs-content/html/avatar/avatar-stack.tsx b/docs-content/html/avatar/avatar-stack.tsx new file mode 100644 index 000000000..b8ef3941b --- /dev/null +++ b/docs-content/html/avatar/avatar-stack.tsx @@ -0,0 +1,31 @@ +export function AvatarStack() { + return ( +
+ user 1 + user 2 + user 3 + user 4 + user 5 +
+ ); +} diff --git a/docs-content/html/avatar/avatar-variants.tsx b/docs-content/html/avatar/avatar-variants.tsx new file mode 100644 index 000000000..fb980f629 --- /dev/null +++ b/docs-content/html/avatar/avatar-variants.tsx @@ -0,0 +1,21 @@ +export function AvatarVariants() { + return ( +
+ avatar + avatar + avatar +
+ ); +} diff --git a/docs-content/html/avatar/avatar-with-border.tsx b/docs-content/html/avatar/avatar-with-border.tsx new file mode 100644 index 000000000..85d09d992 --- /dev/null +++ b/docs-content/html/avatar/avatar-with-border.tsx @@ -0,0 +1,21 @@ +export function AvatarWithBorder() { + return ( +
+ avatar + avatar + avatar +
+ ); +} diff --git a/docs-content/html/avatar/avatar-with-dot-indicator.tsx b/docs-content/html/avatar/avatar-with-dot-indicator.tsx new file mode 100644 index 000000000..1be4a0992 --- /dev/null +++ b/docs-content/html/avatar/avatar-with-dot-indicator.tsx @@ -0,0 +1,38 @@ +export function AvatarWithDotIndicator() { + return ( +
+
+ avatar + +
+
+ avatar + +
+
+ avatar + +
+
+ avatar + +
+
+ ); +} diff --git a/docs-content/html/avatar/avatar-with-dropdown.tsx b/docs-content/html/avatar/avatar-with-dropdown.tsx new file mode 100644 index 000000000..c81288667 --- /dev/null +++ b/docs-content/html/avatar/avatar-with-dropdown.tsx @@ -0,0 +1,130 @@ +export function AvatarWithDropdown() { + return ( + <> + tania andrew +
    + + + + +
    + +
+ + ); +} diff --git a/docs-content/html/avatar/avatar-with-text.tsx b/docs-content/html/avatar/avatar-with-text.tsx new file mode 100644 index 000000000..16c818c3b --- /dev/null +++ b/docs-content/html/avatar/avatar-with-text.tsx @@ -0,0 +1,51 @@ +export function AvatarWithText() { + return ( +
+
+ avatar +
+
+ Tania Andrew +
+

+ Web Developer +

+
+
+
+ avatar +
+
+ Tania Andrew +
+

+ Web Developer +

+
+
+
+ avatar +
+
+ Tania Andrew +
+

+ Web Developer +

+
+
+
+ ); +} diff --git a/docs-content/html/avatar/avatar.tsx b/docs-content/html/avatar/avatar.tsx new file mode 100644 index 000000000..e2eb5f01b --- /dev/null +++ b/docs-content/html/avatar/avatar.tsx @@ -0,0 +1,9 @@ +export function AvatarDefault() { + return ( + avatar + ); +} diff --git a/docs-content/html/avatar/index.ts b/docs-content/html/avatar/index.ts new file mode 100644 index 000000000..ef1068ca4 --- /dev/null +++ b/docs-content/html/avatar/index.ts @@ -0,0 +1,8 @@ +export * from "./avatar"; +export * from "./avatar-stack"; +export * from "./avatar-sizes"; +export * from "./avatar-variants"; +export * from "./avatar-with-border"; +export * from "./avatar-with-text"; +export * from "./avatar-with-dot-indicator"; +export * from "./avatar-with-dropdown"; diff --git a/docs-content/html/badge/badge-colors.tsx b/docs-content/html/badge/badge-colors.tsx new file mode 100644 index 000000000..838bfffbe --- /dev/null +++ b/docs-content/html/badge/badge-colors.tsx @@ -0,0 +1,42 @@ +export function BadgeColors() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/badge/badge-custom-styles.tsx b/docs-content/html/badge/badge-custom-styles.tsx new file mode 100644 index 000000000..a073f8339 --- /dev/null +++ b/docs-content/html/badge/badge-custom-styles.tsx @@ -0,0 +1,29 @@ +export function BadgeCustomStyles() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/badge/badge-dot.tsx b/docs-content/html/badge/badge-dot.tsx new file mode 100644 index 000000000..388ff1e75 --- /dev/null +++ b/docs-content/html/badge/badge-dot.tsx @@ -0,0 +1,13 @@ +export function BadgeDot() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/badge/badge-overlap.tsx b/docs-content/html/badge/badge-overlap.tsx new file mode 100644 index 000000000..0f983adde --- /dev/null +++ b/docs-content/html/badge/badge-overlap.tsx @@ -0,0 +1,66 @@ +export function BadgeOverlap() { + return ( +
+
+ + + 5 + +
+
+ + +
+
+ profile picture + + 5 + +
+
+ profile picture + +
+
+ ); +} diff --git a/docs-content/html/badge/badge-placement.tsx b/docs-content/html/badge/badge-placement.tsx new file mode 100644 index 000000000..ff3c94e3e --- /dev/null +++ b/docs-content/html/badge/badge-placement.tsx @@ -0,0 +1,42 @@ +export function BadgePlacement() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/badge/badge-with-border.tsx b/docs-content/html/badge/badge-with-border.tsx new file mode 100644 index 000000000..5e8cd5938 --- /dev/null +++ b/docs-content/html/badge/badge-with-border.tsx @@ -0,0 +1,15 @@ +export function BadgeWithBorder() { + return ( +
+ + + 5 + +
+ ); +} diff --git a/docs-content/html/badge/badge.tsx b/docs-content/html/badge/badge.tsx new file mode 100644 index 000000000..9ed517552 --- /dev/null +++ b/docs-content/html/badge/badge.tsx @@ -0,0 +1,15 @@ +export function BadgeDefault() { + return ( +
+ + + 5 + +
+ ); +} diff --git a/docs-content/html/badge/index.ts b/docs-content/html/badge/index.ts new file mode 100644 index 000000000..9ff7b1afb --- /dev/null +++ b/docs-content/html/badge/index.ts @@ -0,0 +1,7 @@ +export * from "./badge"; +export * from "./badge-colors"; +export * from "./badge-dot"; +export * from "./badge-overlap"; +export * from "./badge-placement"; +export * from "./badge-with-border"; +export * from "./badge-custom-styles"; diff --git a/docs-content/html/breadcrumbs/block-level-breadcrumbs.tsx b/docs-content/html/breadcrumbs/block-level-breadcrumbs.tsx new file mode 100644 index 000000000..affdec034 --- /dev/null +++ b/docs-content/html/breadcrumbs/block-level-breadcrumbs.tsx @@ -0,0 +1,27 @@ +export function BlockLevelBreadcrumbs() { + return ( + + ); +} diff --git a/docs-content/html/breadcrumbs/breadcrumbs-custom-separator.tsx b/docs-content/html/breadcrumbs/breadcrumbs-custom-separator.tsx new file mode 100644 index 000000000..b8e784344 --- /dev/null +++ b/docs-content/html/breadcrumbs/breadcrumbs-custom-separator.tsx @@ -0,0 +1,27 @@ +export function BreadcrumbsCustomSeparator() { + return ( + + ); +} diff --git a/docs-content/html/breadcrumbs/breadcrumbs-custom-styles.tsx b/docs-content/html/breadcrumbs/breadcrumbs-custom-styles.tsx new file mode 100644 index 000000000..cb991094d --- /dev/null +++ b/docs-content/html/breadcrumbs/breadcrumbs-custom-styles.tsx @@ -0,0 +1,66 @@ +export function BreadcrumbsCustomStyles() { + return ( + + ); +} diff --git a/docs-content/html/breadcrumbs/breadcrumbs-with-icon.tsx b/docs-content/html/breadcrumbs/breadcrumbs-with-icon.tsx new file mode 100644 index 000000000..fff23e8aa --- /dev/null +++ b/docs-content/html/breadcrumbs/breadcrumbs-with-icon.tsx @@ -0,0 +1,34 @@ +export function BreadcrumbsWithIcon() { + return ( + + ); +} diff --git a/docs-content/html/breadcrumbs/breadcrumbs.tsx b/docs-content/html/breadcrumbs/breadcrumbs.tsx new file mode 100644 index 000000000..3de8a05c7 --- /dev/null +++ b/docs-content/html/breadcrumbs/breadcrumbs.tsx @@ -0,0 +1,27 @@ +export function BreadcrumbsDefault() { + return ( + + ); +} diff --git a/docs-content/html/breadcrumbs/index.ts b/docs-content/html/breadcrumbs/index.ts new file mode 100644 index 000000000..3b5a3737c --- /dev/null +++ b/docs-content/html/breadcrumbs/index.ts @@ -0,0 +1,5 @@ +export * from "./breadcrumbs"; +export * from "./block-level-breadcrumbs"; +export * from "./breadcrumbs-custom-separator"; +export * from "./breadcrumbs-custom-styles"; +export * from "./breadcrumbs-with-icon"; diff --git a/docs-content/html/button-group/block-level-button-group.tsx b/docs-content/html/button-group/block-level-button-group.tsx new file mode 100644 index 000000000..da2597fd4 --- /dev/null +++ b/docs-content/html/button-group/block-level-button-group.tsx @@ -0,0 +1,26 @@ +export function BlockLevelButtonGroup() { + return ( +
+
+ + + +
+
+ ); +} diff --git a/docs-content/html/button-group/button-group-colors.tsx b/docs-content/html/button-group/button-group-colors.tsx new file mode 100644 index 000000000..2895e26de --- /dev/null +++ b/docs-content/html/button-group/button-group-colors.tsx @@ -0,0 +1,88 @@ +export function ButtonGroupColors() { + return ( +
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+ ); +} diff --git a/docs-content/html/button-group/button-group-custom-styles.tsx b/docs-content/html/button-group/button-group-custom-styles.tsx new file mode 100644 index 000000000..9fb50641c --- /dev/null +++ b/docs-content/html/button-group/button-group-custom-styles.tsx @@ -0,0 +1,26 @@ +export function ButtonGroupCustomStyles() { + return ( +
+
+ + + +
+
+ ); +} diff --git a/docs-content/html/button-group/button-group-sizes.tsx b/docs-content/html/button-group/button-group-sizes.tsx new file mode 100644 index 000000000..f7c408d7b --- /dev/null +++ b/docs-content/html/button-group/button-group-sizes.tsx @@ -0,0 +1,68 @@ +export function ButtonGroupSizes() { + return ( +
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+ ); +} diff --git a/docs-content/html/button-group/button-group-variants.tsx b/docs-content/html/button-group/button-group-variants.tsx new file mode 100644 index 000000000..d2804adfa --- /dev/null +++ b/docs-content/html/button-group/button-group-variants.tsx @@ -0,0 +1,88 @@ +export function ButtonGroupVariants() { + return ( +
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+ ); +} diff --git a/docs-content/html/button-group/button-group.tsx b/docs-content/html/button-group/button-group.tsx new file mode 100644 index 000000000..ce7e55c3a --- /dev/null +++ b/docs-content/html/button-group/button-group.tsx @@ -0,0 +1,26 @@ +export function ButtonGroupDefault() { + return ( +
+
+ + + +
+
+ ); +} diff --git a/docs-content/html/button-group/index.ts b/docs-content/html/button-group/index.ts new file mode 100644 index 000000000..e9404ae27 --- /dev/null +++ b/docs-content/html/button-group/index.ts @@ -0,0 +1,6 @@ +export * from "./button-group"; +export * from "./block-level-button-group"; +export * from "./button-group-colors"; +export * from "./button-group-custom-styles"; +export * from "./button-group-sizes"; +export * from "./button-group-variants"; diff --git a/docs-content/html/button/auth-buttons.tsx b/docs-content/html/button/auth-buttons.tsx new file mode 100644 index 000000000..a3d2b8737 --- /dev/null +++ b/docs-content/html/button/auth-buttons.tsx @@ -0,0 +1,41 @@ +export function AuthButtons() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/html/button/block-level-button.tsx b/docs-content/html/button/block-level-button.tsx new file mode 100644 index 000000000..02076726b --- /dev/null +++ b/docs-content/html/button/block-level-button.tsx @@ -0,0 +1,10 @@ +export function BlockLevelButton() { + return ( + + ); +} diff --git a/docs-content/html/button/button-colors.tsx b/docs-content/html/button/button-colors.tsx new file mode 100644 index 000000000..0742c286b --- /dev/null +++ b/docs-content/html/button/button-colors.tsx @@ -0,0 +1,30 @@ +export function ButtonColors() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/button/button-ripple-effect.tsx b/docs-content/html/button/button-ripple-effect.tsx new file mode 100644 index 000000000..6ab238ceb --- /dev/null +++ b/docs-content/html/button/button-ripple-effect.tsx @@ -0,0 +1,20 @@ +export function ButtonRippleEffect() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/button/button-rounded.tsx b/docs-content/html/button/button-rounded.tsx new file mode 100644 index 000000000..332c11032 --- /dev/null +++ b/docs-content/html/button/button-rounded.tsx @@ -0,0 +1,30 @@ +export function ButtonRounded() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/button/button-sizes.tsx b/docs-content/html/button/button-sizes.tsx new file mode 100644 index 000000000..a5e7f5ce9 --- /dev/null +++ b/docs-content/html/button/button-sizes.tsx @@ -0,0 +1,24 @@ +export function ButtonSizes() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/html/button/button-variants.tsx b/docs-content/html/button/button-variants.tsx new file mode 100644 index 000000000..985c2ba50 --- /dev/null +++ b/docs-content/html/button/button-variants.tsx @@ -0,0 +1,30 @@ +export function ButtonVariants() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/button/button-with-icon.tsx b/docs-content/html/button/button-with-icon.tsx new file mode 100644 index 000000000..c85e22d9f --- /dev/null +++ b/docs-content/html/button/button-with-icon.tsx @@ -0,0 +1,86 @@ +export function ButtonWithIcon() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/button/button-with-link.tsx b/docs-content/html/button/button-with-link.tsx new file mode 100644 index 000000000..7923b02fa --- /dev/null +++ b/docs-content/html/button/button-with-link.tsx @@ -0,0 +1,38 @@ +export function ButtonWithLink() { + return ( + + ); +} diff --git a/docs-content/html/button/button.tsx b/docs-content/html/button/button.tsx new file mode 100644 index 000000000..ce1ce02b6 --- /dev/null +++ b/docs-content/html/button/button.tsx @@ -0,0 +1,10 @@ +export function ButtonDefault() { + return ( + + ); +} diff --git a/docs-content/html/button/index.ts b/docs-content/html/button/index.ts new file mode 100644 index 000000000..25239168f --- /dev/null +++ b/docs-content/html/button/index.ts @@ -0,0 +1,10 @@ +export * from "./button"; +export * from "./button-variants"; +export * from "./button-sizes"; +export * from "./button-colors"; +export * from "./button-with-icon"; +export * from "./block-level-button"; +export * from "./button-ripple-effect"; +export * from "./auth-buttons"; +export * from "./button-rounded"; +export * from "./button-with-link"; diff --git a/docs-content/html/card/background-blog-card.tsx b/docs-content/html/card/background-blog-card.tsx new file mode 100644 index 000000000..89678fdc6 --- /dev/null +++ b/docs-content/html/card/background-blog-card.tsx @@ -0,0 +1,22 @@ +export function BackgroundBlogCard() { + return ( +
+
+
+
+
+

+ How we design and code open-source projects? +

+
+ Tania Andrew +
+ Tania Andrew +
+
+ ); +} diff --git a/docs-content/html/card/blog-card.tsx b/docs-content/html/card/blog-card.tsx new file mode 100644 index 000000000..977bb89ca --- /dev/null +++ b/docs-content/html/card/blog-card.tsx @@ -0,0 +1,38 @@ +export function BlogCard() { + return ( +
+
+ ui/ux review check +
+
+

+ UI/UX Review Check +

+

+ Because it's about motivating the doers. Because I'm here to + follow my dreams and inspire others. +

+
+
+
+ natali craig + Tania Andrew +
+

+ January 10 +

+
+
+ ); +} diff --git a/docs-content/html/card/booking-card.tsx b/docs-content/html/card/booking-card.tsx new file mode 100644 index 000000000..e36186981 --- /dev/null +++ b/docs-content/html/card/booking-card.tsx @@ -0,0 +1,137 @@ +export function BookingCard() { + return ( +
+
+ ui/ux review check +
+ +
+
+
+
+ Wooden House, Florida +
+

+ + + + 5.0 +

+
+

+ Enter a freshly updated and thoughtfully furnished peaceful home + surrounded by ancient trees, stone walls, and open meadows. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +20 + +
+
+
+ +
+
+ ); +} diff --git a/docs-content/html/card/card-with-link.tsx b/docs-content/html/card/card-with-link.tsx new file mode 100644 index 000000000..b5646e772 --- /dev/null +++ b/docs-content/html/card/card-with-link.tsx @@ -0,0 +1,52 @@ +export function CardWithLink() { + return ( +
+
+ + + + +
+ UI/UX Review Check +
+

+ Because it's about motivating the doers. Because I'm here to + follow my dreams and inspire others. +

+
+ +
+ ); +} diff --git a/docs-content/html/card/card-with-list.tsx b/docs-content/html/card/card-with-list.tsx new file mode 100644 index 000000000..87472aee0 --- /dev/null +++ b/docs-content/html/card/card-with-list.tsx @@ -0,0 +1,121 @@ +export function CardWithList() { + return ( +
+
+
+
+ Latest Customers +
+ + View all + +
+
+
+
+ Tania Andrew +
+
+ Tania Andrew +
+

+ tania@gmail.com +

+
+
+
+ $400 +
+
+
+
+ John Micheal +
+
+ John Micheal +
+

+ john@gmail.com +

+
+
+
+ $420 +
+
+
+
+ Alexa Liras +
+
+ Alexa Liras +
+

+ alexa@gmail.com +

+
+
+
+ $340 +
+
+
+
+ Richard Gran +
+
+ Richard Gran +
+

+ richard@gmail.com +

+
+
+
+ $520 +
+
+
+
+ Micheal Levi +
+
+ Micheal Levi +
+

+ levi@gmail.com +

+
+
+
+ $780 +
+
+
+
+
+ ); +} diff --git a/docs-content/html/card/card.tsx b/docs-content/html/card/card.tsx new file mode 100644 index 000000000..4730167be --- /dev/null +++ b/docs-content/html/card/card.tsx @@ -0,0 +1,30 @@ +export function CardDefault() { + return ( +
+
+ card-image +
+
+
+ UI/UX Review Check +
+

+ The place is close to Barceloneta Beach and bus stop just 2 min by + walk and near to "Naviglio" where you can enjoy the main night life in + Barcelona. +

+
+
+ +
+
+ ); +} diff --git a/docs-content/html/card/ecommerce-card.tsx b/docs-content/html/card/ecommerce-card.tsx new file mode 100644 index 000000000..ec2ddc7cb --- /dev/null +++ b/docs-content/html/card/ecommerce-card.tsx @@ -0,0 +1,35 @@ +export function EcommerceCard() { + return ( +
+
+ card-image +
+
+
+

+ Apple AirPods +

+

+ $95.00 +

+
+

+ With plenty of talk and listen time, voice-activated Siri access, and + an available wireless charging case. +

+
+
+ +
+
+ ); +} diff --git a/docs-content/html/card/horizontal-card.tsx b/docs-content/html/card/horizontal-card.tsx new file mode 100644 index 000000000..e1b057563 --- /dev/null +++ b/docs-content/html/card/horizontal-card.tsx @@ -0,0 +1,49 @@ +export function HorizontalCard() { + return ( +
+
+ card-image +
+
+
+ startups +
+

+ Lyft launching cross-platform service this week +

+

+ Like so many organizations these days, Autodesk is a company in + transition. It was until recently a traditional boxed software company + selling licenses. Yet its own business model disruption is only part + of the story +

+ + + +
+
+ ); +} diff --git a/docs-content/html/card/index.ts b/docs-content/html/card/index.ts new file mode 100644 index 000000000..c6eaf1db1 --- /dev/null +++ b/docs-content/html/card/index.ts @@ -0,0 +1,13 @@ +export * from "./card"; +export * from "./background-blog-card"; +export * from "./blog-card"; +export * from "./booking-card"; +export * from "./card-with-link"; +export * from "./ecommerce-card"; +export * from "./horizontal-card"; +export * from "./login-card"; +export * from "./pricing-card"; +export * from "./profile-card"; +export * from "./simple-card"; +export * from "./testimonial-card"; +export * from "./card-with-list"; diff --git a/docs-content/html/card/login-card.tsx b/docs-content/html/card/login-card.tsx new file mode 100644 index 000000000..64a63f97c --- /dev/null +++ b/docs-content/html/card/login-card.tsx @@ -0,0 +1,84 @@ +export function LoginCard() { + return ( +
+
+

+ Sign In +

+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+
+ +

+ Don't have an account? + + Sign up + +

+
+
+ ); +} diff --git a/docs-content/html/card/pricing-card.tsx b/docs-content/html/card/pricing-card.tsx new file mode 100644 index 000000000..a83f381a1 --- /dev/null +++ b/docs-content/html/card/pricing-card.tsx @@ -0,0 +1,132 @@ +export function PricingCard() { + return ( +
+
+

+ standard +

+

+ $29 + /mo +

+
+
+
    +
  • + + + + + +

    + 5 team members +

    +
  • +
  • + + + + + +

    + 230+ components +

    +
  • +
  • + + + + + +

    + 40+ built-in pages +

    +
  • +
  • + + + + + +

    + 1 year free updates +

    +
  • +
  • + + + + + +

    + Life time technical support +

    +
  • +
+
+
+ +
+
+ ); +} diff --git a/docs-content/html/card/profile-card.tsx b/docs-content/html/card/profile-card.tsx new file mode 100644 index 000000000..31504d282 --- /dev/null +++ b/docs-content/html/card/profile-card.tsx @@ -0,0 +1,40 @@ +export function ProfileCard() { + return ( +
+
+ profile-picture +
+
+

+ Natalie Paisley +

+

+ CEO / Co-Founder +

+
+ +
+ ); +} diff --git a/docs-content/html/card/simple-card.tsx b/docs-content/html/card/simple-card.tsx new file mode 100644 index 000000000..e7a78a6ac --- /dev/null +++ b/docs-content/html/card/simple-card.tsx @@ -0,0 +1,24 @@ +export function SimpleCard() { + return ( +
+
+
+ UI/UX Review Check +
+

+ The place is close to Barceloneta Beach and bus stop just 2 min by + walk and near to Naviglio where you can enjoy the main night life in + Barcelona. +

+
+
+ +
+
+ ); +} diff --git a/docs-content/html/card/testimonial-card.tsx b/docs-content/html/card/testimonial-card.tsx new file mode 100644 index 000000000..e3031a238 --- /dev/null +++ b/docs-content/html/card/testimonial-card.tsx @@ -0,0 +1,92 @@ +export function TestimonialCard() { + return ( +
+
+ Tania Andrew +
+
+
+ Tania Andrew +
+
+ + + + + + + + + + + + + + + +
+
+

+ Frontend Lead @ Google +

+
+
+
+

+ 'I found solution to all my design needs from Creative Tim. I use + them as a freelancer in my hobby projects for fun! And its really + affordable, very humble guys !!!' +

+
+
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-colors.tsx b/docs-content/html/checkbox/checkbox-colors.tsx new file mode 100644 index 000000000..974d74bc7 --- /dev/null +++ b/docs-content/html/checkbox/checkbox-colors.tsx @@ -0,0 +1,238 @@ +export function CheckboxColors() { + return ( +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-custom-icon.tsx b/docs-content/html/checkbox/checkbox-custom-icon.tsx new file mode 100644 index 000000000..dd734adcc --- /dev/null +++ b/docs-content/html/checkbox/checkbox-custom-icon.tsx @@ -0,0 +1,30 @@ +export function CheckboxCustomIcon() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-custom-styles.tsx b/docs-content/html/checkbox/checkbox-custom-styles.tsx new file mode 100644 index 000000000..fb6c515b5 --- /dev/null +++ b/docs-content/html/checkbox/checkbox-custom-styles.tsx @@ -0,0 +1,32 @@ +export function CheckboxCustomStyles() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-horizontal-list-group.tsx b/docs-content/html/checkbox/checkbox-horizontal-list-group.tsx new file mode 100644 index 000000000..3963d9f62 --- /dev/null +++ b/docs-content/html/checkbox/checkbox-horizontal-list-group.tsx @@ -0,0 +1,137 @@ +export function CheckboxHorizontalListGroup() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-label.tsx b/docs-content/html/checkbox/checkbox-label.tsx new file mode 100644 index 000000000..95e8e8487 --- /dev/null +++ b/docs-content/html/checkbox/checkbox-label.tsx @@ -0,0 +1,38 @@ +export function CheckboxLabel() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-ripple-effect.tsx b/docs-content/html/checkbox/checkbox-ripple-effect.tsx new file mode 100644 index 000000000..35e6629cf --- /dev/null +++ b/docs-content/html/checkbox/checkbox-ripple-effect.tsx @@ -0,0 +1,75 @@ +export function CheckboxRippleEffect() { + return ( + <> +
+ + +
+
+ + +
+ + ); +} diff --git a/docs-content/html/checkbox/checkbox-vertical-list-group.tsx b/docs-content/html/checkbox/checkbox-vertical-list-group.tsx new file mode 100644 index 000000000..a984ab880 --- /dev/null +++ b/docs-content/html/checkbox/checkbox-vertical-list-group.tsx @@ -0,0 +1,137 @@ +export function CheckboxVerticalListGroup() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-with-description.tsx b/docs-content/html/checkbox/checkbox-with-description.tsx new file mode 100644 index 000000000..17782ff48 --- /dev/null +++ b/docs-content/html/checkbox/checkbox-with-description.tsx @@ -0,0 +1,45 @@ +export function CheckboxWithDescription() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox-with-link.tsx b/docs-content/html/checkbox/checkbox-with-link.tsx new file mode 100644 index 000000000..df4066b1e --- /dev/null +++ b/docs-content/html/checkbox/checkbox-with-link.tsx @@ -0,0 +1,47 @@ +export function CheckboxWithLink() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/checkbox/checkbox.tsx b/docs-content/html/checkbox/checkbox.tsx new file mode 100644 index 000000000..92f2b5ad6 --- /dev/null +++ b/docs-content/html/checkbox/checkbox.tsx @@ -0,0 +1,33 @@ +export function CheckboxDefault() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/checkbox/disabled-checkbox.tsx b/docs-content/html/checkbox/disabled-checkbox.tsx new file mode 100644 index 000000000..d5f1f06d0 --- /dev/null +++ b/docs-content/html/checkbox/disabled-checkbox.tsx @@ -0,0 +1,39 @@ +export function DisabledCheckbox() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/checkbox/index.ts b/docs-content/html/checkbox/index.ts new file mode 100644 index 000000000..ecdc43999 --- /dev/null +++ b/docs-content/html/checkbox/index.ts @@ -0,0 +1,11 @@ +export * from "./checkbox"; +export * from "./checkbox-colors"; +export * from "./checkbox-custom-icon"; +export * from "./checkbox-custom-styles"; +export * from "./checkbox-horizontal-list-group"; +export * from "./checkbox-label"; +export * from "./checkbox-ripple-effect"; +export * from "./checkbox-vertical-list-group"; +export * from "./checkbox-with-description"; +export * from "./checkbox-with-link"; +export * from "./disabled-checkbox"; diff --git a/docs-content/html/chip/chip-colors.tsx b/docs-content/html/chip/chip-colors.tsx new file mode 100644 index 000000000..7f77264b9 --- /dev/null +++ b/docs-content/html/chip/chip-colors.tsx @@ -0,0 +1,33 @@ +export function ChipColors() { + return ( +
+
+ blue +
+
+ red +
+
+ green +
+
+ amber +
+
+ pink +
+
+ indigo +
+
+ purple +
+
+ teal +
+
+ cyan +
+
+ ); +} diff --git a/docs-content/html/chip/chip-dismissible.tsx b/docs-content/html/chip/chip-dismissible.tsx new file mode 100644 index 000000000..1efc7a629 --- /dev/null +++ b/docs-content/html/chip/chip-dismissible.tsx @@ -0,0 +1,32 @@ +export function ChipDismissible() { + return ( +
+ Dismissible + +
+ ); +} diff --git a/docs-content/html/chip/chip-icon.tsx b/docs-content/html/chip/chip-icon.tsx new file mode 100644 index 000000000..2e7ffe840 --- /dev/null +++ b/docs-content/html/chip/chip-icon.tsx @@ -0,0 +1,74 @@ +export function ChipIcon() { + return ( +
+
+
+ + + +
+ account +
+
+
+ + + +
+ account +
+
+
+ + + +
+ account +
+
+
+ + + +
+ account +
+
+ ); +} diff --git a/docs-content/html/chip/chip-pills.tsx b/docs-content/html/chip/chip-pills.tsx new file mode 100644 index 000000000..fe1060ed9 --- /dev/null +++ b/docs-content/html/chip/chip-pills.tsx @@ -0,0 +1,18 @@ +export function ChipPills() { + return ( +
+
+ chip filled +
+
+ chip gradient +
+
+ chip outlined +
+
+ chip ghost +
+
+ ); +} diff --git a/docs-content/html/chip/chip-sizes.tsx b/docs-content/html/chip/chip-sizes.tsx new file mode 100644 index 000000000..351a8b0f1 --- /dev/null +++ b/docs-content/html/chip/chip-sizes.tsx @@ -0,0 +1,15 @@ +export function ChipSizes() { + return ( +
+
+ chip small +
+
+ chip medium +
+
+ chip large +
+
+ ); +} diff --git a/docs-content/html/chip/chip-variants.tsx b/docs-content/html/chip/chip-variants.tsx new file mode 100644 index 000000000..0160f1f4e --- /dev/null +++ b/docs-content/html/chip/chip-variants.tsx @@ -0,0 +1,18 @@ +export function ChipVariants() { + return ( +
+
+ chip filled +
+
+ chip gradient +
+
+ chip outlined +
+
+ chip ghost +
+
+ ); +} diff --git a/docs-content/html/chip/chip-with-avatar.tsx b/docs-content/html/chip/chip-with-avatar.tsx new file mode 100644 index 000000000..8ac0e911c --- /dev/null +++ b/docs-content/html/chip/chip-with-avatar.tsx @@ -0,0 +1,18 @@ +export function ChipWithAvatar() { + return ( +
+
+ Tania Andrew +
+ +

+ Tania Andrew +

+
+
+ ); +} diff --git a/docs-content/html/chip/chip-with-checkbox.tsx b/docs-content/html/chip/chip-with-checkbox.tsx new file mode 100644 index 000000000..65d661c9e --- /dev/null +++ b/docs-content/html/chip/chip-with-checkbox.tsx @@ -0,0 +1,72 @@ +export function ChipWithCheckbox() { + return ( +
+
+
+
+ +
+
+ Online +
+
+
+
+ +
+
+ Offline +
+
+ ); +} diff --git a/docs-content/html/chip/chip-with-status.tsx b/docs-content/html/chip/chip-with-status.tsx new file mode 100644 index 000000000..99359e7c0 --- /dev/null +++ b/docs-content/html/chip/chip-with-status.tsx @@ -0,0 +1,18 @@ +export function ChipWithStatus() { + return ( +
+
+
+ +
+ Online +
+
+
+ +
+ Offline +
+
+ ); +} diff --git a/docs-content/html/chip/chip.tsx b/docs-content/html/chip/chip.tsx new file mode 100644 index 000000000..3ca3a3e66 --- /dev/null +++ b/docs-content/html/chip/chip.tsx @@ -0,0 +1,7 @@ +export function ChipDefault() { + return ( +
+ chip +
+ ); +} diff --git a/docs-content/html/chip/index.ts b/docs-content/html/chip/index.ts new file mode 100644 index 000000000..fafd5e78b --- /dev/null +++ b/docs-content/html/chip/index.ts @@ -0,0 +1,10 @@ +export * from "./chip"; +export * from "./chip-colors"; +export * from "./chip-dismissible"; +export * from "./chip-icon"; +export * from "./chip-pills"; +export * from "./chip-sizes"; +export * from "./chip-variants"; +export * from "./chip-with-avatar"; +export * from "./chip-with-checkbox"; +export * from "./chip-with-status"; diff --git a/docs-content/html/collapse/default-collapse.tsx b/docs-content/html/collapse/default-collapse.tsx new file mode 100644 index 000000000..771ca00d3 --- /dev/null +++ b/docs-content/html/collapse/default-collapse.tsx @@ -0,0 +1,26 @@ +export function DefaultCollapse() { + return ( + <> + +
+
+
+

+ Use our Tailwind CSS collapse for your website. You can use if for + accordion, collapsible items and much more. +

+
+
+
+ + ); +} diff --git a/docs-content/html/collapse/index.ts b/docs-content/html/collapse/index.ts new file mode 100644 index 000000000..18ba2cb36 --- /dev/null +++ b/docs-content/html/collapse/index.ts @@ -0,0 +1 @@ +export * from "./default-collapse"; diff --git a/docs-content/html/dialog/dialog-custom-animation.tsx b/docs-content/html/dialog/dialog-custom-animation.tsx new file mode 100644 index 000000000..e6b00308f --- /dev/null +++ b/docs-content/html/dialog/dialog-custom-animation.tsx @@ -0,0 +1,52 @@ +export function DialogCustomAnimation() { + return ( + <> + +
+
+
+ Its a simple dialog. +
+
+ The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty five + years of blood sweat and tears, and I'm never giving up, + I'm just getting started. I'm up to something. Fan luv. +
+
+ + +
+
+
+ + ); +} diff --git a/docs-content/html/dialog/dialog-sizes.tsx b/docs-content/html/dialog/dialog-sizes.tsx new file mode 100644 index 000000000..49ec9796d --- /dev/null +++ b/docs-content/html/dialog/dialog-sizes.tsx @@ -0,0 +1,268 @@ +export function DialogSizes() { + return ( + <> +
+ +
+
+
+ Its a simple dialog. +
+
+ The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty five + years of blood sweat and tears, and I'm never giving up, + I'm just getting started. I'm up to something. Fan luv. +
+
+ + +
+
+
+ +
+
+
+ Its a simple dialog. +
+
+ The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty five + years of blood sweat and tears, and I'm never giving up, + I'm just getting started. I'm up to something. Fan luv. +
+
+ + +
+
+
+ +
+
+
+ {`Its a simple dialog.`} +
+
+ {`The key to more success is to have a lot of pillows. Put it this way, it took me + twenty five years to get these plants, twenty five years of blood sweat and tears, and + I'm never giving up, I'm just getting started. I'm up to something. Fan + luv.`} +
+
+ + +
+
+
+
+
+ +
+
+
+ Its a simple dialog. +
+
+ The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty five + years of blood sweat and tears, and I'm never giving up, + I'm just getting started. I'm up to something. Fan luv. +
+
+ + +
+
+
+ +
+
+
+ Its a simple dialog. +
+
+ The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty five + years of blood sweat and tears, and I'm never giving up, + I'm just getting started. I'm up to something. Fan luv. +
+
+ + +
+
+
+ +
+
+
+ {`Its a simple dialog.`} +
+
+ {`The key to more success is to have a lot of pillows. Put it this way, it took me + twenty five years to get these plants, twenty five years of blood sweat and tears, and + I'm never giving up, I'm just getting started. I'm up to something. Fan + luv.`} +
+
+ + +
+
+
+
+ + ); +} diff --git a/docs-content/html/dialog/dialog-with-form.tsx b/docs-content/html/dialog/dialog-with-form.tsx new file mode 100644 index 000000000..c9b33c4de --- /dev/null +++ b/docs-content/html/dialog/dialog-with-form.tsx @@ -0,0 +1,109 @@ +export function DialogWithForm() { + return ( + <> + +
+
+
+

+ Sign In +

+

+ Enter your email and password to Sign In. +

+
+ Your Email +
+
+ + +
+
+ Your Password +
+
+ + +
+
+
+ + +
+
+
+
+ +

+ Don't have an account? + + Sign up + +

+
+
+
+ + ); +} diff --git a/docs-content/html/dialog/dialog-with-image.tsx b/docs-content/html/dialog/dialog-with-image.tsx new file mode 100644 index 000000000..6c7aa68bd --- /dev/null +++ b/docs-content/html/dialog/dialog-with-image.tsx @@ -0,0 +1,118 @@ +export function DialogWithImage() { + return ( + <> +
+ nature +
+
+
+
+
+ tania andrew +
+

+ Tania Andrew +

+

+ @canwu +

+
+
+
+ + +
+
+
+ nature +
+
+
+
+

+ Views +

+

+ 44,082,044 +

+
+
+

+ Downloads +

+

+ 553,031 +

+
+
+ +
+
+
+ + ); +} diff --git a/docs-content/html/dialog/dialog.tsx b/docs-content/html/dialog/dialog.tsx new file mode 100644 index 000000000..4906f1ba6 --- /dev/null +++ b/docs-content/html/dialog/dialog.tsx @@ -0,0 +1,49 @@ +export function DialogDefault() { + return ( + <> + +
+
+
+ Its a simple dialog. +
+
+ The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty five + years of blood sweat and tears, and I'm never giving up, + I'm just getting started. I'm up to something. Fan luv. +
+
+ + +
+
+
+ + ); +} diff --git a/docs-content/html/dialog/index.ts b/docs-content/html/dialog/index.ts new file mode 100644 index 000000000..a6cc29eaa --- /dev/null +++ b/docs-content/html/dialog/index.ts @@ -0,0 +1,6 @@ +export * from "./dialog"; +export * from "./dialog-sizes"; +export * from "./web-3-dialog"; +export * from "./dialog-with-form"; +export * from "./dialog-with-image"; +export * from "./dialog-custom-animation"; diff --git a/docs-content/html/dialog/web-3-dialog.tsx b/docs-content/html/dialog/web-3-dialog.tsx new file mode 100644 index 000000000..8f136cd15 --- /dev/null +++ b/docs-content/html/dialog/web-3-dialog.tsx @@ -0,0 +1,124 @@ +export function Web3Dialog() { + return ( + <> + +
+
+
+
+
+ Connect a Wallet +
+

+ Choose which card you want to connect +

+
+ +
+
+
+

+ Popular +

+
    + + +
+
+
+

+ Other +

+
    + +
+
+
+
+

+ New to Ethereum wallets? +

+ +
+
+
+ + ); +} diff --git a/docs-content/html/footer/footer-with-logo.tsx b/docs-content/html/footer/footer-with-logo.tsx new file mode 100644 index 000000000..2e80b6cbc --- /dev/null +++ b/docs-content/html/footer/footer-with-logo.tsx @@ -0,0 +1,47 @@ +export function FooterWithLogo() { + return ( + + ); +} diff --git a/docs-content/html/footer/footer-with-sitemap.tsx b/docs-content/html/footer/footer-with-sitemap.tsx new file mode 100644 index 000000000..334689cd1 --- /dev/null +++ b/docs-content/html/footer/footer-with-sitemap.tsx @@ -0,0 +1,256 @@ +export function FooterWithSitemap() { + return ( + + ); +} diff --git a/docs-content/html/footer/footer-with-social-links.tsx b/docs-content/html/footer/footer-with-social-links.tsx new file mode 100644 index 000000000..d4cf8c4a3 --- /dev/null +++ b/docs-content/html/footer/footer-with-social-links.tsx @@ -0,0 +1,216 @@ +export function FooterWithSocialLinks() { + return ( + + ); +} diff --git a/docs-content/html/footer/index.ts b/docs-content/html/footer/index.ts new file mode 100644 index 000000000..c872442f4 --- /dev/null +++ b/docs-content/html/footer/index.ts @@ -0,0 +1,4 @@ +export * from "./simple-footer"; +export * from "./footer-with-logo"; +export * from "./footer-with-sitemap"; +export * from "./footer-with-social-links"; \ No newline at end of file diff --git a/docs-content/html/footer/simple-footer.tsx b/docs-content/html/footer/simple-footer.tsx new file mode 100644 index 000000000..fc0cef562 --- /dev/null +++ b/docs-content/html/footer/simple-footer.tsx @@ -0,0 +1,43 @@ +export function SimpleFooter() { + return ( + + ); +} diff --git a/docs-content/html/form/checkout-form.tsx b/docs-content/html/form/checkout-form.tsx new file mode 100644 index 000000000..5ce8a71da --- /dev/null +++ b/docs-content/html/form/checkout-form.tsx @@ -0,0 +1,167 @@ +export function CheckoutForm() { + return ( +
+
+
+ +
+
+ Material Tailwind PRO +
+
+
+
+ +
+
+
+
+

+ Your Email +

+
+ + +
+
+
+

+ Card Details +

+
+
+ +
+ + +
+
+
+

+ Expires +

+
+ + +
+
+
+

+ CVC +

+
+ + +
+
+
+

+ Holder Name +

+
+ + +
+
+ +

+ + Payments are secure and encrypted +

+
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/form/index.ts b/docs-content/html/form/index.ts new file mode 100644 index 000000000..78bf12464 --- /dev/null +++ b/docs-content/html/form/index.ts @@ -0,0 +1,2 @@ +export * from "./simple-registration-form"; +export * from "./checkout-form"; diff --git a/docs-content/html/form/simple-registration-form.tsx b/docs-content/html/form/simple-registration-form.tsx new file mode 100644 index 000000000..c1a0d26a2 --- /dev/null +++ b/docs-content/html/form/simple-registration-form.tsx @@ -0,0 +1,101 @@ +export function SimpleRegistrationForm() { + return ( +
+

+ Sign Up +

+

+ Nice to meet you! Enter your details to register. +

+
+
+
+ Your Name +
+
+ + +
+
+ Your Email +
+
+ + +
+
+ Password +
+
+ + +
+
+
+ + +
+ +

+ Already have an account? + + Sign In + +

+
+
+ ); +} diff --git a/docs-content/html/gallery/default-gallery.tsx b/docs-content/html/gallery/default-gallery.tsx new file mode 100644 index 000000000..8b64fef79 --- /dev/null +++ b/docs-content/html/gallery/default-gallery.tsx @@ -0,0 +1,69 @@ +export function DefaultGallery() { + return ( +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+ ); +} diff --git a/docs-content/html/gallery/featured-image-gallery.tsx b/docs-content/html/gallery/featured-image-gallery.tsx new file mode 100644 index 000000000..8719463bc --- /dev/null +++ b/docs-content/html/gallery/featured-image-gallery.tsx @@ -0,0 +1,51 @@ +import React from "react"; +export function FeaturedImageGallery() { + return ( +
+
+ +
+
+
+ gallery-image +
+
+ gallery-image +
+
+ gallery-image +
+
+ gallery-image +
+
+ gallery-image +
+
+
+ ); +} diff --git a/docs-content/html/gallery/gallery-with-tab.tsx b/docs-content/html/gallery/gallery-with-tab.tsx new file mode 100644 index 000000000..6db5111f7 --- /dev/null +++ b/docs-content/html/gallery/gallery-with-tab.tsx @@ -0,0 +1,200 @@ +export function GalleryWithTab() { + return ( +
+
+ +
+
+
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+
+
+
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+
+
+
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+
+ image-photo +
+ +
+ image-photo +
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/gallery/index.ts b/docs-content/html/gallery/index.ts new file mode 100644 index 000000000..f3fd84ad0 --- /dev/null +++ b/docs-content/html/gallery/index.ts @@ -0,0 +1,5 @@ +export * from "./default-gallery"; +export * from "./masonry-grid-gallery"; +export * from "./featured-image-gallery"; +export * from "./quad-gallery"; +export * from "./gallery-with-tab"; diff --git a/docs-content/html/gallery/masonry-grid-gallery.tsx b/docs-content/html/gallery/masonry-grid-gallery.tsx new file mode 100644 index 000000000..d21c0d775 --- /dev/null +++ b/docs-content/html/gallery/masonry-grid-gallery.tsx @@ -0,0 +1,91 @@ +export function MasonryGridGallery() { + return ( +
+
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+
+
+ gallery-photo +
+
+ gallery-photo +
+
+ gallery-photo +
+
+
+
+ gallery-photo +
+
+ gallery-photo +
+
+
+ ); +} diff --git a/docs-content/html/gallery/quad-gallery.tsx b/docs-content/html/gallery/quad-gallery.tsx new file mode 100644 index 000000000..8ce8c1fd2 --- /dev/null +++ b/docs-content/html/gallery/quad-gallery.tsx @@ -0,0 +1,36 @@ +export function QuadGallery() { + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-colors.tsx b/docs-content/html/icon-button/icon-button-colors.tsx new file mode 100644 index 000000000..2d772e246 --- /dev/null +++ b/docs-content/html/icon-button/icon-button-colors.tsx @@ -0,0 +1,38 @@ +export function IconButtonColors() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-custom-styles.tsx b/docs-content/html/icon-button/icon-button-custom-styles.tsx new file mode 100644 index 000000000..185910793 --- /dev/null +++ b/docs-content/html/icon-button/icon-button-custom-styles.tsx @@ -0,0 +1,38 @@ +export function IconButtonCustomStyles() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-ripple-effect.tsx b/docs-content/html/icon-button/icon-button-ripple-effect.tsx new file mode 100644 index 000000000..382b0f1fd --- /dev/null +++ b/docs-content/html/icon-button/icon-button-ripple-effect.tsx @@ -0,0 +1,24 @@ +export function IconButtonRippleEffect() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-rounded.tsx b/docs-content/html/icon-button/icon-button-rounded.tsx new file mode 100644 index 000000000..974c1c59c --- /dev/null +++ b/docs-content/html/icon-button/icon-button-rounded.tsx @@ -0,0 +1,38 @@ +export function IconButtonRounded() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-sizes.tsx b/docs-content/html/icon-button/icon-button-sizes.tsx new file mode 100644 index 000000000..b86fcb02b --- /dev/null +++ b/docs-content/html/icon-button/icon-button-sizes.tsx @@ -0,0 +1,30 @@ +export function IconButtonSizes() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-variants.tsx b/docs-content/html/icon-button/icon-button-variants.tsx new file mode 100644 index 000000000..7cb45ae90 --- /dev/null +++ b/docs-content/html/icon-button/icon-button-variants.tsx @@ -0,0 +1,38 @@ +export function IconButtonVariants() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/icon-button/icon-button-with-link.tsx b/docs-content/html/icon-button/icon-button-with-link.tsx new file mode 100644 index 000000000..5218b20e7 --- /dev/null +++ b/docs-content/html/icon-button/icon-button-with-link.tsx @@ -0,0 +1,46 @@ +export function IconButtonWithLink() { + return ( + + ); +} diff --git a/docs-content/html/icon-button/icon-button.tsx b/docs-content/html/icon-button/icon-button.tsx new file mode 100644 index 000000000..c5661ba5f --- /dev/null +++ b/docs-content/html/icon-button/icon-button.tsx @@ -0,0 +1,12 @@ +export function IconButtonDefault() { + return ( + + ); +} diff --git a/docs-content/html/icon-button/index.ts b/docs-content/html/icon-button/index.ts new file mode 100644 index 000000000..a570b89b6 --- /dev/null +++ b/docs-content/html/icon-button/index.ts @@ -0,0 +1,8 @@ +export * from "./icon-button"; +export * from "./icon-button-colors"; +export * from "./icon-button-custom-styles"; +export * from "./icon-button-ripple-effect"; +export * from "./icon-button-rounded"; +export * from "./icon-button-sizes"; +export * from "./icon-button-variants"; +export * from "./icon-button-with-link"; diff --git a/docs-content/html/img/circular-img.tsx b/docs-content/html/img/circular-img.tsx new file mode 100644 index 000000000..1ce225a25 --- /dev/null +++ b/docs-content/html/img/circular-img.tsx @@ -0,0 +1,11 @@ +export function CircularImg() { + return ( +
+ nature image +
+ ); +} diff --git a/docs-content/html/img/default-img.tsx b/docs-content/html/img/default-img.tsx new file mode 100644 index 000000000..5087bec3a --- /dev/null +++ b/docs-content/html/img/default-img.tsx @@ -0,0 +1,11 @@ +export function DefaultImg() { + return ( +
+ nature image +
+ ); +} diff --git a/docs-content/html/img/img-with-blurred-caption.tsx b/docs-content/html/img/img-with-blurred-caption.tsx new file mode 100644 index 000000000..959636b22 --- /dev/null +++ b/docs-content/html/img/img-with-blurred-caption.tsx @@ -0,0 +1,26 @@ +export function ImgWithBlurredCaption() { + return ( +
+
+ nature image +
+
+
+ Sara Lamalo +
+

+ 20 July 2022 +

+
+
+ Growth +
+
+
+
+ ); +} diff --git a/docs-content/html/img/img-with-caption.tsx b/docs-content/html/img/img-with-caption.tsx new file mode 100644 index 000000000..8792cdae2 --- /dev/null +++ b/docs-content/html/img/img-with-caption.tsx @@ -0,0 +1,14 @@ +export function ImgWithCaption() { + return ( +
+ nature image +
+ Image caption +
+
+ ); +} diff --git a/docs-content/html/img/img-with-rounded-corners.tsx b/docs-content/html/img/img-with-rounded-corners.tsx new file mode 100644 index 000000000..84497adc2 --- /dev/null +++ b/docs-content/html/img/img-with-rounded-corners.tsx @@ -0,0 +1,11 @@ +export function ImgWithRoundedCorners() { + return ( +
+ nature image +
+ ); +} diff --git a/docs-content/html/img/img-with-shadow.tsx b/docs-content/html/img/img-with-shadow.tsx new file mode 100644 index 000000000..bbda1c007 --- /dev/null +++ b/docs-content/html/img/img-with-shadow.tsx @@ -0,0 +1,11 @@ +export function ImgWithShadow() { + return ( +
+ nature image +
+ ); +} diff --git a/docs-content/html/img/index.ts b/docs-content/html/img/index.ts new file mode 100644 index 000000000..80a5238e0 --- /dev/null +++ b/docs-content/html/img/index.ts @@ -0,0 +1,6 @@ +export * from "./default-img"; +export * from "./circular-img"; +export * from "./img-with-shadow"; +export * from "./img-with-caption"; +export * from "./img-with-rounded-corners"; +export * from "./img-with-blurred-caption"; \ No newline at end of file diff --git a/docs-content/html/input/index.ts b/docs-content/html/input/index.ts new file mode 100644 index 000000000..06f2ad0d8 --- /dev/null +++ b/docs-content/html/input/index.ts @@ -0,0 +1,11 @@ +export * from "./input"; +export * from "./input-colors"; +export * from "./input-custom-styles"; +export * from "./input-disabled"; +export * from "./input-for-dark-surface"; +export * from "./input-icon"; +export * from "./input-sizes"; +export * from "./input-validations"; +export * from "./input-variants"; +export * from "./input-with-button"; +export * from "./input-with-helper-text"; diff --git a/docs-content/html/input/input-colors.tsx b/docs-content/html/input/input-colors.tsx new file mode 100644 index 000000000..32df20506 --- /dev/null +++ b/docs-content/html/input/input-colors.tsx @@ -0,0 +1,42 @@ +export function InputColors() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-custom-styles.tsx b/docs-content/html/input/input-custom-styles.tsx new file mode 100644 index 000000000..44f6fe37a --- /dev/null +++ b/docs-content/html/input/input-custom-styles.tsx @@ -0,0 +1,14 @@ +export function InputCustomStyles() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-disabled.tsx b/docs-content/html/input/input-disabled.tsx new file mode 100644 index 000000000..6a7edfe52 --- /dev/null +++ b/docs-content/html/input/input-disabled.tsx @@ -0,0 +1,16 @@ +export function InputDisabled() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-for-dark-surface.tsx b/docs-content/html/input/input-for-dark-surface.tsx new file mode 100644 index 000000000..26caa2f68 --- /dev/null +++ b/docs-content/html/input/input-for-dark-surface.tsx @@ -0,0 +1,18 @@ +export function InputForDarkSurface() { + return ( +
+
+
+ + +
+
+
+ ); +} diff --git a/docs-content/html/input/input-icon.tsx b/docs-content/html/input/input-icon.tsx new file mode 100644 index 000000000..e57b86154 --- /dev/null +++ b/docs-content/html/input/input-icon.tsx @@ -0,0 +1,18 @@ +export function InputIcon() { + return ( +
+
+
+ +
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-sizes.tsx b/docs-content/html/input/input-sizes.tsx new file mode 100644 index 000000000..d483250b7 --- /dev/null +++ b/docs-content/html/input/input-sizes.tsx @@ -0,0 +1,24 @@ +export function InputSizes() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-validations.tsx b/docs-content/html/input/input-validations.tsx new file mode 100644 index 000000000..3eb30667a --- /dev/null +++ b/docs-content/html/input/input-validations.tsx @@ -0,0 +1,24 @@ +export function InputValidations() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-variants.tsx b/docs-content/html/input/input-variants.tsx new file mode 100644 index 000000000..b00e49ab6 --- /dev/null +++ b/docs-content/html/input/input-variants.tsx @@ -0,0 +1,33 @@ +export function InputVariants() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/input/input-with-button.tsx b/docs-content/html/input/input-with-button.tsx new file mode 100644 index 000000000..5f86daf4a --- /dev/null +++ b/docs-content/html/input/input-with-button.tsx @@ -0,0 +1,24 @@ +export function InputWithButton() { + return ( +
+
+ + +
+ +
+ ); +} diff --git a/docs-content/html/input/input-with-helper-text.tsx b/docs-content/html/input/input-with-helper-text.tsx new file mode 100644 index 000000000..564855c16 --- /dev/null +++ b/docs-content/html/input/input-with-helper-text.tsx @@ -0,0 +1,31 @@ +export function InputWithHelperText() { + return ( +
+
+ + +
+

+ + + + Use at least 8 characters, one uppercase, one lowercase and one number. +

+
+ ); +} diff --git a/docs-content/html/input/input.tsx b/docs-content/html/input/input.tsx new file mode 100644 index 000000000..85216bea8 --- /dev/null +++ b/docs-content/html/input/input.tsx @@ -0,0 +1,15 @@ +export function InputDefault() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/list/index.ts b/docs-content/html/list/index.ts new file mode 100644 index 000000000..5a2316e41 --- /dev/null +++ b/docs-content/html/list/index.ts @@ -0,0 +1,8 @@ +export * from "./list"; +export * from "./list-custom-styles"; +export * from "./list-with-avatar"; +export * from "./list-with-badge"; +export * from "./list-with-disabled-item"; +export * from "./list-with-icon"; +export * from "./list-with-link"; +export * from "./list-with-selected-item"; diff --git a/docs-content/html/list/list-custom-styles.tsx b/docs-content/html/list/list-custom-styles.tsx new file mode 100644 index 000000000..baf205d49 --- /dev/null +++ b/docs-content/html/list/list-custom-styles.tsx @@ -0,0 +1,84 @@ +export function ListCustomStyles() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/list/list-with-avatar.tsx b/docs-content/html/list/list-with-avatar.tsx new file mode 100644 index 000000000..15c86d20a --- /dev/null +++ b/docs-content/html/list/list-with-avatar.tsx @@ -0,0 +1,68 @@ +export function ListWithAvatar() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/list/list-with-badge.tsx b/docs-content/html/list/list-with-badge.tsx new file mode 100644 index 000000000..e135fac81 --- /dev/null +++ b/docs-content/html/list/list-with-badge.tsx @@ -0,0 +1,41 @@ +export function ListWithBadge() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/list/list-with-disabled-item.tsx b/docs-content/html/list/list-with-disabled-item.tsx new file mode 100644 index 000000000..7b579b3c1 --- /dev/null +++ b/docs-content/html/list/list-with-disabled-item.tsx @@ -0,0 +1,26 @@ +export function ListWithDisabledItem() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/list/list-with-icon.tsx b/docs-content/html/list/list-with-icon.tsx new file mode 100644 index 000000000..670f6ed0c --- /dev/null +++ b/docs-content/html/list/list-with-icon.tsx @@ -0,0 +1,89 @@ +export function ListWithIcon() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/list/list-with-link.tsx b/docs-content/html/list/list-with-link.tsx new file mode 100644 index 000000000..f190b6147 --- /dev/null +++ b/docs-content/html/list/list-with-link.tsx @@ -0,0 +1,32 @@ +export function ListWithLink() { + return ( + + ); +} diff --git a/docs-content/html/list/list-with-selected-item.tsx b/docs-content/html/list/list-with-selected-item.tsx new file mode 100644 index 000000000..05f2234f8 --- /dev/null +++ b/docs-content/html/list/list-with-selected-item.tsx @@ -0,0 +1,26 @@ +export function ListWithSelectedItem() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/list/list.tsx b/docs-content/html/list/list.tsx new file mode 100644 index 000000000..5c3ffd1ac --- /dev/null +++ b/docs-content/html/list/list.tsx @@ -0,0 +1,26 @@ +export function ListDefault() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/mega-menu/index.ts b/docs-content/html/mega-menu/index.ts new file mode 100644 index 000000000..9a3c77c54 --- /dev/null +++ b/docs-content/html/mega-menu/index.ts @@ -0,0 +1 @@ +export * from "./mega-menu"; diff --git a/docs-content/html/mega-menu/mega-menu.tsx b/docs-content/html/mega-menu/mega-menu.tsx new file mode 100644 index 000000000..05fcbec25 --- /dev/null +++ b/docs-content/html/mega-menu/mega-menu.tsx @@ -0,0 +1,394 @@ +export function MegaMenuDefault() { + return ( + <> + + + + ); +} diff --git a/docs-content/html/menu/index.ts b/docs-content/html/menu/index.ts new file mode 100644 index 000000000..76b9c5865 --- /dev/null +++ b/docs-content/html/menu/index.ts @@ -0,0 +1,4 @@ +export * from "./menu"; +export * from "./nested-menu"; +export * from "./notifications-menu"; +export * from "./profile-menu"; diff --git a/docs-content/html/menu/menu.tsx b/docs-content/html/menu/menu.tsx new file mode 100644 index 000000000..9486681f9 --- /dev/null +++ b/docs-content/html/menu/menu.tsx @@ -0,0 +1,38 @@ +export function MenuDefault() { + return ( + <> + +
    +
  • + {`Menu Item 1`} +
  • +
  • + {`Menu Item 2`} +
  • +
  • + {`Menu Item 3`} +
  • +
+ + ); +} diff --git a/docs-content/html/menu/nested-menu.tsx b/docs-content/html/menu/nested-menu.tsx new file mode 100644 index 000000000..540625265 --- /dev/null +++ b/docs-content/html/menu/nested-menu.tsx @@ -0,0 +1,72 @@ +export function NestedMenu() { + return ( + <> + +
    +
  • + {`Menu Item 1`} +
  • +
  • + {`Menu Item 2`} +
  • +
  • + {`Nested Menu`} +
  • +
  • + {`Menu Item 3`} +
  • +
+
    +
  • + {`Menu Item 1`} +
  • +
  • + {`Menu Item 2`} +
  • +
  • + {`Menu Item 3`} +
  • +
+ + ); +} diff --git a/docs-content/html/menu/notifications-menu.tsx b/docs-content/html/menu/notifications-menu.tsx new file mode 100644 index 000000000..a23995180 --- /dev/null +++ b/docs-content/html/menu/notifications-menu.tsx @@ -0,0 +1,116 @@ +export function NotificationsMenu() { + return ( + <> + +
    + + + +
+ + ); +} diff --git a/docs-content/html/menu/profile-menu.tsx b/docs-content/html/menu/profile-menu.tsx new file mode 100644 index 000000000..31ef97606 --- /dev/null +++ b/docs-content/html/menu/profile-menu.tsx @@ -0,0 +1,130 @@ +export function ProfileMenu() { + return ( + <> + tania andrew +
    + + + + +
    + +
+ + ); +} diff --git a/docs-content/html/navbar/index.ts b/docs-content/html/navbar/index.ts new file mode 100644 index 000000000..3d081a090 --- /dev/null +++ b/docs-content/html/navbar/index.ts @@ -0,0 +1,5 @@ +export * from "./navbar"; +export * from "./navbar-dark"; +export * from "./navbar-with-search"; +export * from "./navbar-simple"; +export * from "./sticky-navbar"; diff --git a/docs-content/html/navbar/navbar-dark.tsx b/docs-content/html/navbar/navbar-dark.tsx new file mode 100644 index 000000000..3d91e94fd --- /dev/null +++ b/docs-content/html/navbar/navbar-dark.tsx @@ -0,0 +1,74 @@ +export function NavbarDark() { + return ( + + ); +} diff --git a/docs-content/html/navbar/navbar-simple.tsx b/docs-content/html/navbar/navbar-simple.tsx new file mode 100644 index 000000000..4da7dfc7c --- /dev/null +++ b/docs-content/html/navbar/navbar-simple.tsx @@ -0,0 +1,72 @@ +export function NavbarSimple() { + return ( + + ); +} diff --git a/docs-content/html/navbar/navbar-with-search.tsx b/docs-content/html/navbar/navbar-with-search.tsx new file mode 100644 index 000000000..6b24bbe34 --- /dev/null +++ b/docs-content/html/navbar/navbar-with-search.tsx @@ -0,0 +1,149 @@ +export function NavbarWithSearch() { + return ( + + ); +} diff --git a/docs-content/html/navbar/navbar.tsx b/docs-content/html/navbar/navbar.tsx new file mode 100644 index 000000000..544b64771 --- /dev/null +++ b/docs-content/html/navbar/navbar.tsx @@ -0,0 +1,124 @@ +export function NavbarDefault() { + return ( + + ); +} diff --git a/docs-content/html/navbar/sticky-navbar.tsx b/docs-content/html/navbar/sticky-navbar.tsx new file mode 100644 index 000000000..6d30f3790 --- /dev/null +++ b/docs-content/html/navbar/sticky-navbar.tsx @@ -0,0 +1,105 @@ +export function StickyNavbar() { + return ( +
+
+ +
+
+ nature +
+

+ What is Material Tailwind +

+

+ Can you help me out? you will get a lot of free exposure doing this + can my website be in english?. There is too much white space do less + with more, so that will be a conversation piece can you rework to + make the pizza look more delicious other agencies charge much lesser + can you make the blue bluer?. I think we need to start from scratch + can my website be in english?, yet make it sexy i'll pay you in + a week we don't need to pay upfront i hope you understand can + you make it stand out more?. Make the font bigger can you help me + out? you will get a lot of free exposure doing this that's + going to be a chunk of change other agencies charge much lesser. Are + you busy this weekend? I have a new project with a tight deadline + that's going to be a chunk of change. There are more projects + lined up charge extra the next time. +

+
+
+
+ ); +} diff --git a/docs-content/html/pagination/circular-pagination.tsx b/docs-content/html/pagination/circular-pagination.tsx new file mode 100644 index 000000000..901bbf08f --- /dev/null +++ b/docs-content/html/pagination/circular-pagination.tsx @@ -0,0 +1,90 @@ +export function CircularPagination() { + return ( +
+ +
+ + + + + +
+ +
+ ); +} diff --git a/docs-content/html/pagination/default-pagination.tsx b/docs-content/html/pagination/default-pagination.tsx new file mode 100644 index 000000000..96f0b863b --- /dev/null +++ b/docs-content/html/pagination/default-pagination.tsx @@ -0,0 +1,91 @@ +export function DefaultPagination() { + return ( +
+ +
+ + + + + +
+ +
+ ); +} diff --git a/docs-content/html/pagination/index.ts b/docs-content/html/pagination/index.ts new file mode 100644 index 000000000..66a78287c --- /dev/null +++ b/docs-content/html/pagination/index.ts @@ -0,0 +1,4 @@ +export * from "./default-pagination"; +export * from "./circular-pagination"; +export * from "./simple-pagination"; +export * from "./pagination-group"; diff --git a/docs-content/html/pagination/pagination-group.tsx b/docs-content/html/pagination/pagination-group.tsx new file mode 100644 index 000000000..8aa194126 --- /dev/null +++ b/docs-content/html/pagination/pagination-group.tsx @@ -0,0 +1,90 @@ +export function PaginationGroup() { + return ( +
+ + + + + + + +
+ ); +} diff --git a/docs-content/html/pagination/simple-pagination.tsx b/docs-content/html/pagination/simple-pagination.tsx new file mode 100644 index 000000000..27a4e51c5 --- /dev/null +++ b/docs-content/html/pagination/simple-pagination.tsx @@ -0,0 +1,55 @@ +export function SimplePagination() { + return ( +
+ +

+ Page 1 of + 10 +

+ +
+ ); +} diff --git a/docs-content/html/plugins/clipboard/clipboard-default.tsx b/docs-content/html/plugins/clipboard/clipboard-default.tsx new file mode 100644 index 000000000..638c2fcfe --- /dev/null +++ b/docs-content/html/plugins/clipboard/clipboard-default.tsx @@ -0,0 +1,30 @@ +import React from "react"; +import { IconButton, Typography } from "@material-tailwind/react"; +import { useCopyToClipboard } from "usehooks-ts"; +import { CheckIcon, DocumentDuplicateIcon } from "@heroicons/react/24/outline"; + +export function ClipboardDefault() { + const [value, copy] = useCopyToClipboard(); + const [copied, setCopied] = React.useState(false); + + return ( +
+
+ npm i @material-tailwind + setCopied(false)} + onClick={() => { + copy("npm i @material-tailwind"); + setCopied(true); + }} + > + {copied ? ( + + ) : ( + + )} + +
+
+ ); +} diff --git a/docs-content/html/plugins/date-picker.tsx b/docs-content/html/plugins/date-picker.tsx new file mode 100644 index 000000000..f96327e72 --- /dev/null +++ b/docs-content/html/plugins/date-picker.tsx @@ -0,0 +1,38 @@ +import React from "react"; + +export function DatePicker() { + React.useEffect(() => { + const datepicker = flatpickr("#docs-date-picker", {}); + + const calendarContainer = datepicker.calendarContainer; + const calendarMonthNav = datepicker.monthNav; + const calendarNextMonthNav = datepicker.nextMonthNav; + const calendarPrevMonthNav = datepicker.prevMonthNav; + const calendarDaysContainer = datepicker.daysContainer; + + calendarContainer.className = `${calendarContainer.className} bg-white p-4 border border-blue-gray-50 rounded-lg shadow-lg shadow-blue-gray-500/10 font-sans text-sm font-normal text-blue-gray-500 focus:outline-none break-words whitespace-normal`; + + calendarMonthNav.className = `${calendarMonthNav.className} flex items-center justify-between mb-4 [&>div.flatpickr-month]:-translate-y-3`; + + calendarNextMonthNav.className = `${calendarNextMonthNav.className} absolute !top-2.5 !right-1.5 h-6 w-6 bg-transparent hover:bg-blue-gray-50 !p-1 rounded-md transition-colors duration-300`; + + calendarPrevMonthNav.className = `${calendarPrevMonthNav.className} absolute !top-2.5 !left-1.5 h-6 w-6 bg-transparent hover:bg-blue-gray-50 !p-1 rounded-md transition-colors duration-300`; + + calendarDaysContainer.className = `${calendarDaysContainer.className} [&_span.flatpickr-day]:!rounded-md [&_span.flatpickr-day.selected]:!bg-gray-900 [&_span.flatpickr-day.selected]:!border-gray-900`; + }, []); + + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/plugins/index.ts b/docs-content/html/plugins/index.ts new file mode 100644 index 000000000..9e751f884 --- /dev/null +++ b/docs-content/html/plugins/index.ts @@ -0,0 +1,3 @@ +export * from "./date-picker"; +export * from "./text-editor"; +export * from "./clipboard/clipboard-default"; diff --git a/docs-content/html/plugins/test.html b/docs-content/html/plugins/test.html new file mode 100644 index 000000000..14e9542e7 --- /dev/null +++ b/docs-content/html/plugins/test.html @@ -0,0 +1,21 @@ +
+
+
+ +
+
+ +
\ No newline at end of file diff --git a/docs-content/html/plugins/text-editor.tsx b/docs-content/html/plugins/text-editor.tsx new file mode 100644 index 000000000..f6de613e3 --- /dev/null +++ b/docs-content/html/plugins/text-editor.tsx @@ -0,0 +1,421 @@ +import React from "react"; +import { Editor } from "@tiptap/core"; +import Placeholder from "@tiptap/extension-placeholder"; +import StarterKit from "@tiptap/starter-kit"; +import Paragraph from "@tiptap/extension-paragraph"; +import Bold from "@tiptap/extension-bold"; +import Underline from "@tiptap/extension-underline"; +import Link from "@tiptap/extension-link"; +import BulletList from "@tiptap/extension-bullet-list"; +import OrderedList from "@tiptap/extension-ordered-list"; +import Blockquote from "@tiptap/extension-blockquote"; + +export function TextEditor() { + React.useEffect(() => { + const editor = new Editor({ + element: document.querySelector( + "#hs-editor-tiptap [data-hs-editor-field]", + ), + extensions: [ + Placeholder.configure({ + placeholder: "Play around with the editor...", + emptyNodeClass: "text-gray-600", + }), + StarterKit, + Paragraph.configure({ + HTMLAttributes: { + class: "text-gray-600", + }, + }), + Bold.configure({ + HTMLAttributes: { + class: "font-bold", + }, + }), + Underline, + Link.configure({ + HTMLAttributes: { + class: + "inline-flex items-center gap-x-1 text-blue-500 decoration-2 hover:underline font-medium", + }, + }), + BulletList.configure({ + HTMLAttributes: { + class: "list-disc list-inside text-gray-800", + }, + }), + OrderedList.configure({ + HTMLAttributes: { + class: "list-decimal list-inside text-gray-800", + }, + }), + Blockquote.configure({ + HTMLAttributes: { + class: "text-gray-800 sm:text-xl", + }, + }), + ], + }); + const actions = [ + { + id: "#hs-editor-tiptap [data-hs-editor-bold]", + fn: () => editor.chain().focus().toggleBold().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-italic]", + fn: () => editor.chain().focus().toggleItalic().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-underline]", + fn: () => editor.chain().focus().toggleUnderline().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-strike]", + fn: () => editor.chain().focus().toggleStrike().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-link]", + fn: () => { + const url = window.prompt("URL"); + editor + .chain() + .focus() + .extendMarkRange("link") + .setLink({ href: url }) + .run(); + }, + }, + { + id: "#hs-editor-tiptap [data-hs-editor-ol]", + fn: () => editor.chain().focus().toggleOrderedList().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-ul]", + fn: () => editor.chain().focus().toggleBulletList().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-blockquote]", + fn: () => editor.chain().focus().toggleBlockquote().run(), + }, + { + id: "#hs-editor-tiptap [data-hs-editor-code]", + fn: () => editor.chain().focus().toggleCode().run(), + }, + ]; + + actions.forEach(({ id, fn }) => { + const action = document.querySelector(id); + + if (action === null) return; + + action.addEventListener("click", fn); + }); + }, []); + + return ( +
+
+
+ + + + + + + + +
+
+
+
+ ); +} diff --git a/docs-content/html/popover/index.ts b/docs-content/html/popover/index.ts new file mode 100644 index 000000000..2f7e8c39d --- /dev/null +++ b/docs-content/html/popover/index.ts @@ -0,0 +1,7 @@ +export * from "./popover"; +export * from "./popover-custom-animation"; +export * from "./popover-placement"; +export * from "./popover-with-description"; +export * from "./popover-with-image"; +export * from "./profile-info-popover"; +export * from "./subscription-popover"; diff --git a/docs-content/html/popover/popover-custom-animation.tsx b/docs-content/html/popover/popover-custom-animation.tsx new file mode 100644 index 000000000..1a73b2554 --- /dev/null +++ b/docs-content/html/popover/popover-custom-animation.tsx @@ -0,0 +1,22 @@ +export function PopoverCustomAnimation() { + return ( + <> + +
+ {`This is a very beautiful popover, show some love.`} +
+ + ); +} diff --git a/docs-content/html/popover/popover-placement.tsx b/docs-content/html/popover/popover-placement.tsx new file mode 100644 index 000000000..79599b356 --- /dev/null +++ b/docs-content/html/popover/popover-placement.tsx @@ -0,0 +1,182 @@ +export function PopoverPlacement() { + return ( + <> +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+
+
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+
+
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+
+
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+ +
+ {`This is a very beautiful popover, show some love.`} +
+
+ + ); +} diff --git a/docs-content/html/popover/popover-with-description.tsx b/docs-content/html/popover/popover-with-description.tsx new file mode 100644 index 000000000..60465677a --- /dev/null +++ b/docs-content/html/popover/popover-with-description.tsx @@ -0,0 +1,80 @@ +export function PopoverWithDescription() { + return ( + <> + +
+
+ + @material-tailwind + +
+
Public
+
+
+

+ @material-tailwind is an easy-to-use components library htmlFor + Tailwind CSS and Material Design. +

+
+
+ +

+ TypeScript +

+
+
+ +

+ 1,480 +

+
+
+ +

+ Veritied +

+
+
+
+ + ); +} diff --git a/docs-content/html/popover/popover-with-image.tsx b/docs-content/html/popover/popover-with-image.tsx new file mode 100644 index 000000000..dd2bda19a --- /dev/null +++ b/docs-content/html/popover/popover-with-image.tsx @@ -0,0 +1,64 @@ +export function PopoverWithImage() { + return ( + <> + + + + + ); +} diff --git a/docs-content/html/popover/popover.tsx b/docs-content/html/popover/popover.tsx new file mode 100644 index 000000000..79a5626cf --- /dev/null +++ b/docs-content/html/popover/popover.tsx @@ -0,0 +1,26 @@ +import { + Popover, + PopoverHandler, + PopoverContent, + Button, +} from "@material-tailwind/react"; + +export function PopoverDefault() { + return ( + <> + +
+ {`This is a very beautiful popover, show some love.`} +
+ + ); +} diff --git a/docs-content/html/popover/profile-info-popover.tsx b/docs-content/html/popover/profile-info-popover.tsx new file mode 100644 index 000000000..fca04be4b --- /dev/null +++ b/docs-content/html/popover/profile-info-popover.tsx @@ -0,0 +1,89 @@ +export function ProfileInfoPopover() { + return ( + <> + +
+
+ tania andrew + +
+
+ Tania Andrew •{" "} + + @canwu + +
+

+ Frontend Developer • Major interest in Web Development: motivated to + achieve measurable results, to deepen my knowledge and improve my + skills. +

+
+

+ + United Kingdom +

+ + + Material Tailwind + +
+
+ + ); +} diff --git a/docs-content/html/popover/subscription-popover.tsx b/docs-content/html/popover/subscription-popover.tsx new file mode 100644 index 000000000..c827f3873 --- /dev/null +++ b/docs-content/html/popover/subscription-popover.tsx @@ -0,0 +1,43 @@ +export function SubscriptionPopover() { + return ( + <> + + + + ); +} diff --git a/docs-content/html/progress/index.ts b/docs-content/html/progress/index.ts new file mode 100644 index 000000000..766f141a8 --- /dev/null +++ b/docs-content/html/progress/index.ts @@ -0,0 +1,8 @@ +export * from "./progress"; +export * from "./progress-colors"; +export * from "./progress-custom-styles"; +export * from "./progress-label"; +export * from "./progress-label-outside"; +export * from "./progress-sizes"; +export * from "./progress-sizes-label"; +export * from "./progress-variants"; diff --git a/docs-content/html/progress/progress-colors.tsx b/docs-content/html/progress/progress-colors.tsx new file mode 100644 index 000000000..4ef3a9f37 --- /dev/null +++ b/docs-content/html/progress/progress-colors.tsx @@ -0,0 +1,30 @@ +export function ProgressColors() { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/progress/progress-custom-styles.tsx b/docs-content/html/progress/progress-custom-styles.tsx new file mode 100644 index 000000000..bbdef82d3 --- /dev/null +++ b/docs-content/html/progress/progress-custom-styles.tsx @@ -0,0 +1,7 @@ +export function ProgressCustomStyles() { + return ( +
+
+
+ ); +} diff --git a/docs-content/html/progress/progress-label-outside.tsx b/docs-content/html/progress/progress-label-outside.tsx new file mode 100644 index 000000000..1114be480 --- /dev/null +++ b/docs-content/html/progress/progress-label-outside.tsx @@ -0,0 +1,17 @@ +export function ProgressLabelOutside() { + return ( +
+
+
+ Completed +
+
+ 50% +
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/progress/progress-label.tsx b/docs-content/html/progress/progress-label.tsx new file mode 100644 index 000000000..427cf7e92 --- /dev/null +++ b/docs-content/html/progress/progress-label.tsx @@ -0,0 +1,9 @@ +export function ProgressLabel() { + return ( +
+
+ 50% Completed +
+
+ ); +} diff --git a/docs-content/html/progress/progress-sizes-label.tsx b/docs-content/html/progress/progress-sizes-label.tsx new file mode 100644 index 000000000..ec3031824 --- /dev/null +++ b/docs-content/html/progress/progress-sizes-label.tsx @@ -0,0 +1,21 @@ +export function ProgressSizesLabel() { + return ( +
+
+
+ 25% Small +
+
+
+
+ 50% Medium +
+
+
+
+ 75% Large +
+
+
+ ); +} diff --git a/docs-content/html/progress/progress-sizes.tsx b/docs-content/html/progress/progress-sizes.tsx new file mode 100644 index 000000000..e83782659 --- /dev/null +++ b/docs-content/html/progress/progress-sizes.tsx @@ -0,0 +1,17 @@ +import { Progress } from "@material-tailwind/react"; + +export function ProgressSizes() { + return ( +
+
+
+
+
+
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/progress/progress-variants.tsx b/docs-content/html/progress/progress-variants.tsx new file mode 100644 index 000000000..d22d28dce --- /dev/null +++ b/docs-content/html/progress/progress-variants.tsx @@ -0,0 +1,12 @@ +export function ProgressVariants() { + return ( +
+
+
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/progress/progress.tsx b/docs-content/html/progress/progress.tsx new file mode 100644 index 000000000..de03f528f --- /dev/null +++ b/docs-content/html/progress/progress.tsx @@ -0,0 +1,7 @@ +export function ProgressDefault() { + return ( +
+
+
+ ); +} diff --git a/docs-content/html/radio/index.ts b/docs-content/html/radio/index.ts new file mode 100644 index 000000000..29508ebae --- /dev/null +++ b/docs-content/html/radio/index.ts @@ -0,0 +1,10 @@ +export * from "./radio"; +export * from "./radio-colors"; +export * from "./radio-custom-icon"; +export * from "./radio-custom-styles"; +export * from "./radio-disabled"; +export * from "./radio-horizontal-list"; +export * from "./radio-ripple-effect"; +export * from "./radio-vertical-list"; +export * from "./radio-with-description"; +export * from "./radio-with-link"; diff --git a/docs-content/html/radio/radio-colors.tsx b/docs-content/html/radio/radio-colors.tsx new file mode 100644 index 000000000..9aeb3b46a --- /dev/null +++ b/docs-content/html/radio/radio-colors.tsx @@ -0,0 +1,168 @@ +export function RadioColors() { + return ( +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ ); +} diff --git a/docs-content/html/radio/radio-custom-icon.tsx b/docs-content/html/radio/radio-custom-icon.tsx new file mode 100644 index 000000000..8533b7c29 --- /dev/null +++ b/docs-content/html/radio/radio-custom-icon.tsx @@ -0,0 +1,45 @@ +import { Radio } from "@material-tailwind/react"; + +export function RadioCustomIcon() { + return ( + <> + + + + } + /> + + + + } + defaultChecked + /> + + ); +} diff --git a/docs-content/html/radio/radio-custom-styles.tsx b/docs-content/html/radio/radio-custom-styles.tsx new file mode 100644 index 000000000..f33a4fe7a --- /dev/null +++ b/docs-content/html/radio/radio-custom-styles.tsx @@ -0,0 +1,77 @@ +export function RadioCustomStyles() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/radio/radio-disabled.tsx b/docs-content/html/radio/radio-disabled.tsx new file mode 100644 index 000000000..3401d7d31 --- /dev/null +++ b/docs-content/html/radio/radio-disabled.tsx @@ -0,0 +1,67 @@ +export function RadioDisabled() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/radio/radio-horizontal-list.tsx b/docs-content/html/radio/radio-horizontal-list.tsx new file mode 100644 index 000000000..44c014c39 --- /dev/null +++ b/docs-content/html/radio/radio-horizontal-list.tsx @@ -0,0 +1,122 @@ +export function RadioHorizontalList() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/radio/radio-ripple-effect.tsx b/docs-content/html/radio/radio-ripple-effect.tsx new file mode 100644 index 000000000..a798641b2 --- /dev/null +++ b/docs-content/html/radio/radio-ripple-effect.tsx @@ -0,0 +1,65 @@ +export function RadioRippleEffect() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/radio/radio-vertical-list.tsx b/docs-content/html/radio/radio-vertical-list.tsx new file mode 100644 index 000000000..1fee20f20 --- /dev/null +++ b/docs-content/html/radio/radio-vertical-list.tsx @@ -0,0 +1,122 @@ +export function RadioVerticalList() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/radio/radio-with-description.tsx b/docs-content/html/radio/radio-with-description.tsx new file mode 100644 index 000000000..93e797ec0 --- /dev/null +++ b/docs-content/html/radio/radio-with-description.tsx @@ -0,0 +1,259 @@ +export function RadioWithDescription() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/radio/radio-with-link.tsx b/docs-content/html/radio/radio-with-link.tsx new file mode 100644 index 000000000..9e8a4e957 --- /dev/null +++ b/docs-content/html/radio/radio-with-link.tsx @@ -0,0 +1,82 @@ +export function RadioWithLink() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/radio/radio.tsx b/docs-content/html/radio/radio.tsx new file mode 100644 index 000000000..360d33fa0 --- /dev/null +++ b/docs-content/html/radio/radio.tsx @@ -0,0 +1,65 @@ +export function RadioDefault() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/rating/custom-rating-icon.tsx b/docs-content/html/rating/custom-rating-icon.tsx new file mode 100644 index 000000000..43a05ef5e --- /dev/null +++ b/docs-content/html/rating/custom-rating-icon.tsx @@ -0,0 +1,68 @@ +export function CustomRatingIcon() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/html/rating/index.ts b/docs-content/html/rating/index.ts new file mode 100644 index 000000000..3571f42cb --- /dev/null +++ b/docs-content/html/rating/index.ts @@ -0,0 +1,5 @@ +export * from "./rating-with-comment"; +export * from "./rating-with-text"; +export * from "./rating-colors"; +export * from "./rating"; +export * from "./custom-rating-icon"; diff --git a/docs-content/html/rating/rating-colors.tsx b/docs-content/html/rating/rating-colors.tsx new file mode 100644 index 000000000..f87b7f273 --- /dev/null +++ b/docs-content/html/rating/rating-colors.tsx @@ -0,0 +1,336 @@ +export function RatingColors() { + return ( +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ ); +} diff --git a/docs-content/html/rating/rating-with-comment.tsx b/docs-content/html/rating/rating-with-comment.tsx new file mode 100644 index 000000000..0c7da934e --- /dev/null +++ b/docs-content/html/rating/rating-with-comment.tsx @@ -0,0 +1,95 @@ +export function RatingWithComment() { + return ( +
+
+

+ This is an excellent product, the documentation is excellent and + helped me get things done more efficiently. +

+ image +
+ Tania Andrew +
+

+ Lead Frontend Developer +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ ); +} diff --git a/docs-content/html/rating/rating-with-text.tsx b/docs-content/html/rating/rating-with-text.tsx new file mode 100644 index 000000000..238fe0230 --- /dev/null +++ b/docs-content/html/rating/rating-with-text.tsx @@ -0,0 +1,86 @@ +export function RatingWithText() { + return ( +
+
+ 4.7 +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Based on 134 Reviews +

+
+
+ ); +} diff --git a/docs-content/html/rating/rating.tsx b/docs-content/html/rating/rating.tsx new file mode 100644 index 000000000..9eb53ed82 --- /dev/null +++ b/docs-content/html/rating/rating.tsx @@ -0,0 +1,82 @@ +export function DefaultRating() { + return ( + <> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + ); +} diff --git a/docs-content/html/release-notes.tsx b/docs-content/html/release-notes.tsx new file mode 100644 index 000000000..130867058 --- /dev/null +++ b/docs-content/html/release-notes.tsx @@ -0,0 +1,76 @@ +import { + Timeline, + TimelineItem, + TimelineConnector, + TimelineHeader, + TimelineIcon, + TimelineBody, + Typography, + Chip, +} from "@material-tailwind/react"; +import { HomeIcon } from "@heroicons/react/24/solid"; +import releases from "./releases"; + +export function ReleaseNotes() { + return ( +
+ + {releases.map((release, key) => ( + +
+ + + {release.date} + +
+ + + + + + + + + {release.name} + + + + + {release.description} + + {release.content.map((content, idx) => ( +
+ + {content.title} + +
    + {content.data.map((arrData, i) => ( +
  • + + {arrData} + +
  • + ))} +
+
+ ))} +
+
+ ))} +
+
+ ); +} + +export default ReleaseNotes; diff --git a/docs-content/html/releases.ts b/docs-content/html/releases.ts new file mode 100644 index 000000000..4bcac9050 --- /dev/null +++ b/docs-content/html/releases.ts @@ -0,0 +1,321 @@ +export const releases = [ + { + version: "2.2.2", + date: "January 01, 2024", + name: "@material-tailwind/html", + description: "Material Tailwind v2.2.2", + content: [ + { + title: "minor changes", + data: [ + "Add new component collapse.", + "Fix the collapse script issue for accordion component.", + ], + }, + { + title: "docs changes", + data: ["New components: Collapse"], + }, + ], + }, + { + version: "2.1.2", + date: "December 20, 2023", + name: "@material-tailwind/html", + description: "Material Tailwind v2.1.2", + content: [ + { + title: "docs changes", + data: [ + "New components: Skeleton, Gallery, Mega Menu", + "New plugins integration: Tiptap Rich Text Editor, Copy to Clipboard", + "New framework integration guides.", + ], + }, + ], + }, + { + version: "2.1.1", + date: "December 13, 2023", + name: "@material-tailwind/html", + description: "Material Tailwind v2.1.1", + content: [ + { + title: "docs changes", + data: [ + "Fixed broken links.", + "Fixed typos.", + "Updated icon button examples.", + ], + }, + ], + }, + { + version: "2.1.0", + date: "Dec 01, 2023", + name: "@material-tailwind/html", + description: "Material Tailwind v2.1.0", + content: [ + { + title: "Minor Updates", + data: ["Update components design", "Add new components"], + }, + { + title: "Docs Updates", + data: [ + "Add plugins integration guide.", + "Add frameworks integration guide.", + ], + }, + ], + }, + { + version: "2.0.0", + date: "Jan 23, 2023", + name: "@material-tailwind/html", + description: "Material Tailwind v2.0.0", + content: [ + { + title: "Major Updates", + data: [ + "Migration from custom classes to pure tailwind css classes.", + "New scripts for interactive components using the data attributes.", + ], + }, + { + title: "Docs Updates", + data: [ + "Update the entire documentation for the html components.", + "Uses pure tailwind css class for html component rather than custom classes.", + "New demo/code preview added for documentation of components.", + "Add more info and description for each page and how to use the components.", + ], + }, + ], + }, + { + version: "1.2.4", + date: "Jan 01, 2023", + name: "@material-tailwind/html", + description: "Material Tailwind v1.2.4", + content: [ + { + title: "Patch Updates", + data: [ + "Fix css transition typo mistake.", + "Fix css transition typo mistake.", + ], + }, + ], + }, + { + version: "1.2.2", + date: "Sep 30, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.2.2", + content: [ + { + title: "Patch Updates", + data: ["make the components themable."], + }, + ], + }, + { + version: "1.2.1", + date: "Aug 01, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.2.1", + content: [ + { + title: "Patch Updates", + data: ["Update the readme file"], + }, + ], + }, + { + version: "1.2.0", + date: "Jul 29, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.2.0", + content: [ + { + title: "Minor Updates", + data: ["Rename blue-grey to blue-gray", "Rename grey to gray"], + }, + ], + }, + { + version: "1.1.6", + date: "Jun 28, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.6", + content: [ + { + title: "Patch Updates", + data: [ + "Rename minified stylesheet from tailwind.css to material-tailwind.css.", + ], + }, + ], + }, + { + version: "1.1.5", + date: "Jun 28, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.5", + content: [ + { + title: "Patch Updates", + data: [ + "Add minified stylesheet with all classes and styles for CDN usage.", + ], + }, + ], + }, + { + version: "1.1.4", + date: "Jun 28, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.4", + content: [ + { + title: "Patch Updates", + data: [ + "Add minified stylesheet with all classes and styles for CDN usage", + ], + }, + ], + }, + { + version: "1.1.3", + date: "Jun 28, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.3", + content: [ + { + title: "Patch Updates", + data: [ + "Fix the components radio button issue", + "Update radio button input style", + ], + }, + { + title: "Docs Updates", + data: [ + "Update radio button page.", + "Update switch/toggle page", + "Update the screens page", + ], + }, + { + title: "Others", + data: ["Add new script for compiling utils directory"], + }, + ], + }, + { + version: "1.1.2", + date: "Jun 24, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.2", + content: [ + { + title: "Docs Updates", + data: [ + "Update the installation guide.", + "Add theming and customization guide", + "Update overall components documentation pages and add the required-script section for necessary component.", + ], + }, + ], + }, + { + version: "1.1.1", + date: "Jun 24, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.1", + content: [ + { + title: "Patch Updates", + data: ["Fix nested menu component issue."], + }, + ], + }, + { + version: "1.1.0", + date: "May 31, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.1.0", + content: [ + { + title: "Minor Updates", + data: [ + "Menu", + "Dialog", + "Navbar", + "Accordion", + "Breadcrumbs", + "Card", + "Pagination", + "Popover", + "Tabs", + "Select", + "Tooltip", + ], + }, + ], + }, + { + version: "1.0.3", + date: "May 11, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.0.3", + content: [ + { + title: "Patch Updates", + data: ["Update Readme file"], + }, + ], + }, + { + version: "1.0.2", + date: "May 11, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.0.2", + content: [ + { + title: "Patch Updates", + data: ["Update Readme file"], + }, + ], + }, + { + version: "1.0.1", + date: "May 11, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.0.1", + content: [ + { + title: "Patch Updates", + data: ["Update Readme file"], + }, + ], + }, + { + version: "1.0.0", + date: "May 11, 2022", + name: "@material-tailwind/html", + description: "Material Tailwind v1.0.0", + content: [ + { + title: "Original Release", + data: [ + "Started project from Tailwind CSS and Material Design 2", + "Added design from Material Design 2 using Tailwind CSS", + ], + }, + ], + }, +]; + +export default releases; diff --git a/components/docs/countries-select.tsx b/docs-content/html/select/countries-select.tsx similarity index 82% rename from components/docs/countries-select.tsx rename to docs-content/html/select/countries-select.tsx index f7c2babe9..f37193dd7 100644 --- a/components/docs/countries-select.tsx +++ b/docs-content/html/select/countries-select.tsx @@ -1,9 +1,8 @@ -/* eslint-disable @next/next/no-img-element */ import React from "react"; import { useCountries } from "use-react-countries"; import { Select, Option } from "@material-tailwind/react"; -export default function CountriesSelect() { +export function CountriesSelect() { const { countries } = useCountries(); return ( @@ -14,7 +13,9 @@ export default function CountriesSelect() { selected={(element) => element && React.cloneElement(element, { - className: "flex items-center px-0 gap-2 pointer-events-none", + disabled: true, + className: + "flex items-center opacity-100 px-0 gap-2 pointer-events-none", }) } > diff --git a/docs-content/html/select/index.ts b/docs-content/html/select/index.ts new file mode 100644 index 000000000..30f07f0b4 --- /dev/null +++ b/docs-content/html/select/index.ts @@ -0,0 +1,8 @@ +export * from "./countries-select"; +export * from "./select"; +export * from "./select-colors"; +export * from "./select-custom-animation"; +export * from "./select-disabled"; +export * from "./select-sizes"; +export * from "./select-validations"; +export * from "./select-variants"; diff --git a/docs-content/html/select/select-colors.tsx b/docs-content/html/select/select-colors.tsx new file mode 100644 index 000000000..49abce0c2 --- /dev/null +++ b/docs-content/html/select/select-colors.tsx @@ -0,0 +1,29 @@ +import { Select, Option } from "@material-tailwind/react"; + +export function SelectColors() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/html/select/select-custom-animation.tsx b/docs-content/html/select/select-custom-animation.tsx new file mode 100644 index 000000000..6b15609b0 --- /dev/null +++ b/docs-content/html/select/select-custom-animation.tsx @@ -0,0 +1,21 @@ +import { Select, Option } from "@material-tailwind/react"; + +export function SelectCustomAnimation() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/select/select-disabled.tsx b/docs-content/html/select/select-disabled.tsx new file mode 100644 index 000000000..279c36d35 --- /dev/null +++ b/docs-content/html/select/select-disabled.tsx @@ -0,0 +1,15 @@ +import { Select, Option } from "@material-tailwind/react"; + +export function SelectDisabled() { + return ( +
+ +
+ ); +} diff --git a/docs-content/html/select/select-sizes.tsx b/docs-content/html/select/select-sizes.tsx new file mode 100644 index 000000000..d43538054 --- /dev/null +++ b/docs-content/html/select/select-sizes.tsx @@ -0,0 +1,22 @@ +import { Select, Option } from "@material-tailwind/react"; + +export function SelectSizes() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/select/select-validations.tsx b/docs-content/html/select/select-validations.tsx new file mode 100644 index 000000000..086df79fb --- /dev/null +++ b/docs-content/html/select/select-validations.tsx @@ -0,0 +1,22 @@ +import { Select, Option } from "@material-tailwind/react"; + +export function SelectValidations() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/select/select-variants.tsx b/docs-content/html/select/select-variants.tsx new file mode 100644 index 000000000..7a2b3f617 --- /dev/null +++ b/docs-content/html/select/select-variants.tsx @@ -0,0 +1,29 @@ +import { Select, Option } from "@material-tailwind/react"; + +export function SelectVariants() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/html/select/select.tsx b/docs-content/html/select/select.tsx new file mode 100644 index 000000000..c58a6ccc2 --- /dev/null +++ b/docs-content/html/select/select.tsx @@ -0,0 +1,15 @@ +export function SelectDefault() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/html/sidebar/default-sidebar.tsx b/docs-content/html/sidebar/default-sidebar.tsx new file mode 100644 index 000000000..c1a27aa62 --- /dev/null +++ b/docs-content/html/sidebar/default-sidebar.tsx @@ -0,0 +1,144 @@ +export function DefaultSidebar() { + return ( +
+
+
+ Sidebar +
+
+ +
+ ); +} diff --git a/docs-content/html/sidebar/index.ts b/docs-content/html/sidebar/index.ts new file mode 100644 index 000000000..16d253ca4 --- /dev/null +++ b/docs-content/html/sidebar/index.ts @@ -0,0 +1,6 @@ +export * from "./default-sidebar"; +export * from "./multi-level-sidebar"; +export * from "./sidebar-with-content-separator"; +export * from "./sidebar-with-cta"; +export * from "./sidebar-with-logo"; +export * from "./sidebar-with-search"; diff --git a/docs-content/html/sidebar/multi-level-sidebar.tsx b/docs-content/html/sidebar/multi-level-sidebar.tsx new file mode 100644 index 000000000..bc2a3af94 --- /dev/null +++ b/docs-content/html/sidebar/multi-level-sidebar.tsx @@ -0,0 +1,323 @@ +export function MultiLevelSidebar() { + return ( +
+
+
+ Sidebar +
+
+ +
+ ); +} diff --git a/docs-content/html/sidebar/sidebar-with-content-separator.tsx b/docs-content/html/sidebar/sidebar-with-content-separator.tsx new file mode 100644 index 000000000..d3eee3cfa --- /dev/null +++ b/docs-content/html/sidebar/sidebar-with-content-separator.tsx @@ -0,0 +1,324 @@ +export function SidebarWithContentSeparator() { + return ( +
+
+
+ Sidebar +
+
+ +
+ ); +} diff --git a/docs-content/html/sidebar/sidebar-with-cta.tsx b/docs-content/html/sidebar/sidebar-with-cta.tsx new file mode 100644 index 000000000..93f0da0d2 --- /dev/null +++ b/docs-content/html/sidebar/sidebar-with-cta.tsx @@ -0,0 +1,388 @@ +export function SidebarWithCta() { + return ( +
+
+
+ Sidebar +
+
+ +
+
+ +
+ Upgrade to PRO +
+

+ Upgrade to Material Tailwind PRO and get even more components, + plugins, advanced features and premium. +

+ +
+ +
+
+ ); +} diff --git a/docs-content/html/sidebar/sidebar-with-logo.tsx b/docs-content/html/sidebar/sidebar-with-logo.tsx new file mode 100644 index 000000000..2df08d43c --- /dev/null +++ b/docs-content/html/sidebar/sidebar-with-logo.tsx @@ -0,0 +1,393 @@ +export function SidebarWithLogo() { + return ( +
+
+ brand +
+ Sidebar +
+
+ +
+
+ +
+ Upgrade to PRO +
+

+ Upgrade to Material Tailwind PRO and get even more components, + plugins, advanced features and premium. +

+ +
+ +
+
+ ); +} diff --git a/docs-content/html/sidebar/sidebar-with-search.tsx b/docs-content/html/sidebar/sidebar-with-search.tsx new file mode 100644 index 000000000..9eb3be66a --- /dev/null +++ b/docs-content/html/sidebar/sidebar-with-search.tsx @@ -0,0 +1,421 @@ +export function SidebarWithSearch() { + return ( +
+
+ brand +
+ Sidebar +
+
+
+
+
+ +
+ + +
+
+ +
+
+ +
+ Upgrade to PRO +
+

+ Upgrade to Material Tailwind PRO and get even more components, + plugins, advanced features and premium. +

+ +
+ +
+
+ ); +} diff --git a/docs-content/html/skeleton/card-placeholder-skeleton.tsx b/docs-content/html/skeleton/card-placeholder-skeleton.tsx new file mode 100644 index 000000000..f9d80c1be --- /dev/null +++ b/docs-content/html/skeleton/card-placeholder-skeleton.tsx @@ -0,0 +1,47 @@ +export function CardPlacehoderSkeleton() { + return ( +
+
+ + + +
+
+
+   +
+
+   +
+
+   +
+
+   +
+
+   +
+
+
+ +
+
+ ); +} diff --git a/docs-content/html/skeleton/default-skeleton.tsx b/docs-content/html/skeleton/default-skeleton.tsx new file mode 100644 index 000000000..5ee52d3d5 --- /dev/null +++ b/docs-content/html/skeleton/default-skeleton.tsx @@ -0,0 +1,21 @@ +export function DefaultSkeleton() { + return ( +
+
+   +
+
+   +
+
+   +
+
+   +
+
+   +
+
+ ); +} diff --git a/docs-content/html/skeleton/image-placeholder-skeleton.tsx b/docs-content/html/skeleton/image-placeholder-skeleton.tsx new file mode 100644 index 000000000..221efc4cf --- /dev/null +++ b/docs-content/html/skeleton/image-placeholder-skeleton.tsx @@ -0,0 +1,45 @@ +export function ImagePlacehoderSkeleton() { + return ( +
+
+ + + +
+
+
+   +
+
+   +
+
+   +
+
+   +
+
+   +
+
+   +
+
+   +
+
+
+ ); +} diff --git a/docs-content/html/skeleton/index.ts b/docs-content/html/skeleton/index.ts new file mode 100644 index 000000000..84a69c265 --- /dev/null +++ b/docs-content/html/skeleton/index.ts @@ -0,0 +1,4 @@ +export * from "./default-skeleton"; +export * from "./image-placeholder-skeleton"; +export * from "./video-placeholder-skeleton"; +export * from "./card-placeholder-skeleton"; diff --git a/docs-content/html/skeleton/video-placeholder-skeleton.tsx b/docs-content/html/skeleton/video-placeholder-skeleton.tsx new file mode 100644 index 000000000..948871af3 --- /dev/null +++ b/docs-content/html/skeleton/video-placeholder-skeleton.tsx @@ -0,0 +1,20 @@ +export function VideoPlacehoderSkeleton() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/html/speed-dial/controlled-speed-dial.tsx b/docs-content/html/speed-dial/controlled-speed-dial.tsx new file mode 100644 index 000000000..9d1ed7346 --- /dev/null +++ b/docs-content/html/speed-dial/controlled-speed-dial.tsx @@ -0,0 +1,43 @@ +import React from "react"; +import { + IconButton, + SpeedDial, + SpeedDialHandler, + SpeedDialContent, + SpeedDialAction, +} from "@material-tailwind/react"; +import { + PlusIcon, + HomeIcon, + CogIcon, + Square3Stack3DIcon, +} from "@heroicons/react/24/outline"; + +export function ControlledSpeedDial() { + const [open, setOpen] = React.useState(false); + + return ( +
+
+ + + + + + + + + + + + + + + + + + +
+
+ ); +} diff --git a/docs-content/html/speed-dial/custom-speed-dial.tsx b/docs-content/html/speed-dial/custom-speed-dial.tsx new file mode 100644 index 000000000..de81ae646 --- /dev/null +++ b/docs-content/html/speed-dial/custom-speed-dial.tsx @@ -0,0 +1,91 @@ +export function CustomSpeedDial() { + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ ); +} diff --git a/docs-content/html/speed-dial/default-speed-dial.tsx b/docs-content/html/speed-dial/default-speed-dial.tsx new file mode 100644 index 000000000..66313df4f --- /dev/null +++ b/docs-content/html/speed-dial/default-speed-dial.tsx @@ -0,0 +1,91 @@ +export function DefaultSpeedDial() { + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ ); +} diff --git a/docs-content/html/speed-dial/index.ts b/docs-content/html/speed-dial/index.ts new file mode 100644 index 000000000..4aeac1447 --- /dev/null +++ b/docs-content/html/speed-dial/index.ts @@ -0,0 +1,7 @@ +export * from "./default-speed-dial"; +export * from "./speed-dial-placement"; +export * from "./controlled-speed-dial"; +export * from "./speed-dial-custom-icon"; +export * from "./speed-dial-with-text-inside"; +export * from "./speed-dial-with-text-outside"; +export * from "./custom-speed-dial"; diff --git a/docs-content/html/speed-dial/speed-dial-custom-icon.tsx b/docs-content/html/speed-dial/speed-dial-custom-icon.tsx new file mode 100644 index 000000000..9c1112ab4 --- /dev/null +++ b/docs-content/html/speed-dial/speed-dial-custom-icon.tsx @@ -0,0 +1,106 @@ +export function SpeedDialCustomIcon() { + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ ); +} diff --git a/docs-content/html/speed-dial/speed-dial-placement.tsx b/docs-content/html/speed-dial/speed-dial-placement.tsx new file mode 100644 index 000000000..20ad9e80f --- /dev/null +++ b/docs-content/html/speed-dial/speed-dial-placement.tsx @@ -0,0 +1,348 @@ +export function SpeedDialPlacement() { + return ( +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/speed-dial/speed-dial-with-text-inside.tsx b/docs-content/html/speed-dial/speed-dial-with-text-inside.tsx new file mode 100644 index 000000000..55f47de23 --- /dev/null +++ b/docs-content/html/speed-dial/speed-dial-with-text-inside.tsx @@ -0,0 +1,100 @@ +export function SpeedDialWithTextInside() { + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ ); +} diff --git a/docs-content/html/speed-dial/speed-dial-with-text-outside.tsx b/docs-content/html/speed-dial/speed-dial-with-text-outside.tsx new file mode 100644 index 000000000..8d451d153 --- /dev/null +++ b/docs-content/html/speed-dial/speed-dial-with-text-outside.tsx @@ -0,0 +1,100 @@ +export function SpeedDialWithTextOutside() { + return ( +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ ); +} diff --git a/docs-content/html/spinner/custom-spinner.tsx b/docs-content/html/spinner/custom-spinner.tsx new file mode 100644 index 000000000..2d2abbdc2 --- /dev/null +++ b/docs-content/html/spinner/custom-spinner.tsx @@ -0,0 +1,30 @@ +export function CustomSpinner() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/spinner/default-spinner.tsx b/docs-content/html/spinner/default-spinner.tsx new file mode 100644 index 000000000..71cb72e04 --- /dev/null +++ b/docs-content/html/spinner/default-spinner.tsx @@ -0,0 +1,30 @@ +export function DefaultSpinner() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/html/spinner/index.ts b/docs-content/html/spinner/index.ts new file mode 100644 index 000000000..9990e3bd6 --- /dev/null +++ b/docs-content/html/spinner/index.ts @@ -0,0 +1,4 @@ +export * from "./default-spinner"; +export * from "./spinner-sizes"; +export * from "./spinner-colors"; +export * from "./custom-spinner"; diff --git a/docs-content/html/spinner/spinner-colors.tsx b/docs-content/html/spinner/spinner-colors.tsx new file mode 100644 index 000000000..fd3ade0a8 --- /dev/null +++ b/docs-content/html/spinner/spinner-colors.tsx @@ -0,0 +1,200 @@ +export function SpinnerColors() { + return ( +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ ); +} diff --git a/docs-content/html/spinner/spinner-sizes.tsx b/docs-content/html/spinner/spinner-sizes.tsx new file mode 100644 index 000000000..1be0aa4f3 --- /dev/null +++ b/docs-content/html/spinner/spinner-sizes.tsx @@ -0,0 +1,128 @@ +export function SpinnerSizes() { + return ( +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ ); +} diff --git a/docs-content/html/stepper/custom-stepper.tsx b/docs-content/html/stepper/custom-stepper.tsx new file mode 100644 index 000000000..32b6f0d0b --- /dev/null +++ b/docs-content/html/stepper/custom-stepper.tsx @@ -0,0 +1,42 @@ +export function CustomStepper() { + return ( +
+
+
+
+
+
+
+
+
+ HTML +
+
+
+
+
+
+ React +
+
+
+
+
+
+ Vue +
+
+
+
+
+
+ Svelte +
+
+
+
+
+
+
+ ); +} diff --git a/docs-content/html/stepper/default-stepper.tsx b/docs-content/html/stepper/default-stepper.tsx new file mode 100644 index 000000000..8e981f03a --- /dev/null +++ b/docs-content/html/stepper/default-stepper.tsx @@ -0,0 +1,34 @@ +export function DefaultStepper() { + return ( +
+
+
+
+
+ 1 +
+
+ 2 +
+
+ 3 +
+
+
+ + +
+
+ ); +} diff --git a/docs-content/html/stepper/index.ts b/docs-content/html/stepper/index.ts new file mode 100644 index 000000000..51091103e --- /dev/null +++ b/docs-content/html/stepper/index.ts @@ -0,0 +1,5 @@ +export * from "./default-stepper"; +export * from "./stepper-with-content"; +export * from "./stepper-with-dots"; +export * from "./stepper-with-icon"; +export * from "./custom-stepper"; diff --git a/docs-content/html/stepper/stepper-with-content.tsx b/docs-content/html/stepper/stepper-with-content.tsx new file mode 100644 index 000000000..84d59eaee --- /dev/null +++ b/docs-content/html/stepper/stepper-with-content.tsx @@ -0,0 +1,99 @@ +export function StepperWithContent() { + return ( +
+
+
+
+
+ +
+
+ Step 1 +
+

+ Details about yout account. +

+
+
+
+ +
+
+ Step 2 +
+

+ Details about yout account. +

+
+
+
+ +
+
+ Step 3 +
+

+ Details about yout account. +

+
+
+
+
+ + +
+
+ ); +} diff --git a/docs-content/html/stepper/stepper-with-dots.tsx b/docs-content/html/stepper/stepper-with-dots.tsx new file mode 100644 index 000000000..95e367749 --- /dev/null +++ b/docs-content/html/stepper/stepper-with-dots.tsx @@ -0,0 +1,28 @@ +export function StepperWithDots() { + return ( +
+
+
+
+
+
+
+
+
+ + +
+
+ ); +} diff --git a/docs-content/html/stepper/stepper-with-icon.tsx b/docs-content/html/stepper/stepper-with-icon.tsx new file mode 100644 index 000000000..4fa9143eb --- /dev/null +++ b/docs-content/html/stepper/stepper-with-icon.tsx @@ -0,0 +1,76 @@ +export function StepperWithIcon() { + return ( +
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+ ); +} diff --git a/docs-content/html/switch/checked-switch.tsx b/docs-content/html/switch/checked-switch.tsx new file mode 100644 index 000000000..30e5c91eb --- /dev/null +++ b/docs-content/html/switch/checked-switch.tsx @@ -0,0 +1,23 @@ +export function CheckedSwitch() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/switch/index.ts b/docs-content/html/switch/index.ts new file mode 100644 index 000000000..f08588e36 --- /dev/null +++ b/docs-content/html/switch/index.ts @@ -0,0 +1,8 @@ +export * from "./checked-switch"; +export * from "./switch"; +export * from "./switch-colors"; +export * from "./switch-custom-styles"; +export * from "./switch-disabled"; +export * from "./switch-label"; +export * from "./switch-ripple-effect"; +export * from "./switch-with-description"; diff --git a/docs-content/html/switch/switch-colors.tsx b/docs-content/html/switch/switch-colors.tsx new file mode 100644 index 000000000..45426bcec --- /dev/null +++ b/docs-content/html/switch/switch-colors.tsx @@ -0,0 +1,159 @@ +export function SwitchColors() { + return ( +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+
+ + +
+
+
+ ); +} diff --git a/docs-content/html/switch/switch-custom-styles.tsx b/docs-content/html/switch/switch-custom-styles.tsx new file mode 100644 index 000000000..befe589d7 --- /dev/null +++ b/docs-content/html/switch/switch-custom-styles.tsx @@ -0,0 +1,17 @@ +export function SwitchCustomStyles() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/switch/switch-disabled.tsx b/docs-content/html/switch/switch-disabled.tsx new file mode 100644 index 000000000..441273e9d --- /dev/null +++ b/docs-content/html/switch/switch-disabled.tsx @@ -0,0 +1,20 @@ +export function SwitchDisabled() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/switch/switch-label.tsx b/docs-content/html/switch/switch-label.tsx new file mode 100644 index 000000000..2bbb8361a --- /dev/null +++ b/docs-content/html/switch/switch-label.tsx @@ -0,0 +1,29 @@ +export function SwitchLabel() { + return ( +
+
+ + +
+ +
+ ); +} diff --git a/docs-content/html/switch/switch-ripple-effect.tsx b/docs-content/html/switch/switch-ripple-effect.tsx new file mode 100644 index 000000000..1207f1894 --- /dev/null +++ b/docs-content/html/switch/switch-ripple-effect.tsx @@ -0,0 +1,49 @@ +export function SwitchRippleEffect() { + return ( +
+
+
+ + +
+ +
+
+
+ + +
+ +
+
+ ); +} diff --git a/docs-content/html/switch/switch-with-description.tsx b/docs-content/html/switch/switch-with-description.tsx new file mode 100644 index 000000000..55bd001d3 --- /dev/null +++ b/docs-content/html/switch/switch-with-description.tsx @@ -0,0 +1,32 @@ +export function SwitchWithDescription() { + return ( +
+
+ + +
+ +
+ ); +} diff --git a/docs-content/html/switch/switch.tsx b/docs-content/html/switch/switch.tsx new file mode 100644 index 000000000..1a9fe8b16 --- /dev/null +++ b/docs-content/html/switch/switch.tsx @@ -0,0 +1,22 @@ +export function SwitchDefault() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/table/default-table.tsx b/docs-content/html/table/default-table.tsx new file mode 100644 index 000000000..0178a5e76 --- /dev/null +++ b/docs-content/html/table/default-table.tsx @@ -0,0 +1,157 @@ +export function DefaultTable() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Name +

+
+

+ Job +

+
+

+ Employed +

+
+

+
+

+ John Michael +

+
+

+ Manager +

+
+

+ 23/04/18 +

+
+ + Edit + +
+

+ Alexa Liras +

+
+

+ Developer +

+
+

+ 23/04/18 +

+
+ + Edit + +
+

+ Laurent Perrier +

+
+

+ Executive +

+
+

+ 19/09/17 +

+
+ + Edit + +
+

+ Michael Levi +

+
+

+ Developer +

+
+

+ 24/12/08 +

+
+ + Edit + +
+

+ Richard Gran +

+
+

+ Manager +

+
+

+ 04/10/21 +

+
+ + Edit + +
+
+ ); +} diff --git a/docs-content/html/table/index.ts b/docs-content/html/table/index.ts new file mode 100644 index 000000000..2856aa117 --- /dev/null +++ b/docs-content/html/table/index.ts @@ -0,0 +1,6 @@ +export * from "./default-table"; +export * from "./table-with-striped-rows"; +export * from "./table-with-striped-columns"; +export * from "./transactions-table"; +export * from "./members-table"; +export * from "./sortable-table"; \ No newline at end of file diff --git a/docs-content/html/table/members-table.tsx b/docs-content/html/table/members-table.tsx new file mode 100644 index 000000000..087a55a1e --- /dev/null +++ b/docs-content/html/table/members-table.tsx @@ -0,0 +1,456 @@ +export function MembersTable() { + return ( +
+
+
+
+
+ Members list +
+

+ See information about all members +

+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+ + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Member +

+
+

+ Function +

+
+

+ Status +

+
+

+ Employed +

+
+

+
+
+ John Michael +
+

+ John Michael +

+

+ john@creative-tim.com +

+
+
+
+
+

+ Manager +

+

+ Organization +

+
+
+
+
+ online +
+
+
+

+ 23/04/18 +

+
+ +
+
+ Alexa Liras +
+

+ Alexa Liras +

+

+ alexa@creative-tim.com +

+
+
+
+
+

+ Programator +

+

+ Developer +

+
+
+
+
+ offline +
+
+
+

+ 23/04/18 +

+
+ +
+
+ Laurent Perrier +
+

+ Laurent Perrier +

+

+ laurent@creative-tim.com +

+
+
+
+
+

+ Executive +

+

+ Projects +

+
+
+
+
+ offline +
+
+
+

+ 19/09/17 +

+
+ +
+
+ Michael Levi +
+

+ Michael Levi +

+

+ michael@creative-tim.com +

+
+
+
+
+

+ Programator +

+

+ Developer +

+
+
+
+
+ online +
+
+
+

+ 24/12/08 +

+
+ +
+
+ Richard Gran +
+

+ Richard Gran +

+

+ richard@creative-tim.com +

+
+
+
+
+

+ Manager +

+

+ Executive +

+
+
+
+
+ offline +
+
+
+

+ 04/10/21 +

+
+ +
+
+
+

+ Page 1 of 10 +

+
+ + +
+
+
+ ); +} diff --git a/docs-content/html/table/sortable-table.tsx b/docs-content/html/table/sortable-table.tsx new file mode 100644 index 000000000..9ed251c97 --- /dev/null +++ b/docs-content/html/table/sortable-table.tsx @@ -0,0 +1,516 @@ +export function SortableTable() { + return ( +
+
+
+
+
+ Members list +
+

+ See information about all members +

+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+ + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Member + +

+
+

+ Function + +

+
+

+ Status + +

+
+

+ Employed + +

+
+

+
+
+ John Michael +
+

+ John Michael +

+

+ john@creative-tim.com +

+
+
+
+
+

+ Manager +

+

+ Organization +

+
+
+
+
+ online +
+
+
+

+ 23/04/18 +

+
+ +
+
+ Alexa Liras +
+

+ Alexa Liras +

+

+ alexa@creative-tim.com +

+
+
+
+
+

+ Programator +

+

+ Developer +

+
+
+
+
+ offline +
+
+
+

+ 23/04/18 +

+
+ +
+
+ Laurent Perrier +
+

+ Laurent Perrier +

+

+ laurent@creative-tim.com +

+
+
+
+
+

+ Executive +

+

+ Projects +

+
+
+
+
+ offline +
+
+
+

+ 19/09/17 +

+
+ +
+
+ Michael Levi +
+

+ Michael Levi +

+

+ michael@creative-tim.com +

+
+
+
+
+

+ Programator +

+

+ Developer +

+
+
+
+
+ online +
+
+
+

+ 24/12/08 +

+
+ +
+
+ Richard Gran +
+

+ Richard Gran +

+

+ richard@creative-tim.com +

+
+
+
+
+

+ Manager +

+

+ Executive +

+
+
+
+
+ offline +
+
+
+

+ 04/10/21 +

+
+ +
+
+
+

+ Page 1 of 10 +

+
+ + +
+
+
+ ); +} diff --git a/docs-content/html/table/table-with-striped-columns.tsx b/docs-content/html/table/table-with-striped-columns.tsx new file mode 100644 index 000000000..7119da70b --- /dev/null +++ b/docs-content/html/table/table-with-striped-columns.tsx @@ -0,0 +1,107 @@ +import { Card, Typography } from "@material-tailwind/react"; + +const TABLE_HEAD = ["Name", "Job", "Employed", ""]; + +const TABLE_ROWS = [ + { + name: "John Michael", + job: "Manager", + date: "23/04/18", + }, + { + name: "Alexa Liras", + job: "Developer", + date: "23/04/18", + }, + { + name: "Laurent Perrier", + job: "Executive", + date: "19/09/17", + }, + { + name: "Michael Levi", + job: "Developer", + date: "24/12/08", + }, + { + name: "Richard Gran", + job: "Manager", + date: "04/10/21", + }, +]; + +export function TableWithStripedColumns() { + return ( + + + + + {TABLE_HEAD.map((head) => ( + + ))} + + + + {TABLE_ROWS.map(({ name, job, date }, index) => { + const isLast = index === TABLE_ROWS.length - 1; + const classes = isLast ? "p-4" : "p-4 border-b border-blue-gray-50"; + + return ( + + + + + + + ); + })} + +
+ + {head} + +
+ + {name} + + + + {job} + + + + {date} + + + + Edit + +
+
+ ); +} diff --git a/docs-content/html/table/table-with-striped-rows.tsx b/docs-content/html/table/table-with-striped-rows.tsx new file mode 100644 index 000000000..0dffc0f05 --- /dev/null +++ b/docs-content/html/table/table-with-striped-rows.tsx @@ -0,0 +1,157 @@ +export function TableWithStripedRows() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Name +

+
+

+ Job +

+
+

+ Employed +

+
+

+
+

+ John Michael +

+
+

+ Manager +

+
+

+ 23/04/18 +

+
+ + Edit + +
+

+ Alexa Liras +

+
+

+ Developer +

+
+

+ 23/04/18 +

+
+ + Edit + +
+

+ Laurent Perrier +

+
+

+ Executive +

+
+

+ 19/09/17 +

+
+ + Edit + +
+

+ Michael Levi +

+
+

+ Developer +

+
+

+ 24/12/08 +

+
+ + Edit + +
+

+ Richard Gran +

+
+

+ Manager +

+
+

+ 04/10/21 +

+
+ + Edit + +
+
+ ); +} diff --git a/docs-content/html/table/transactions-table.tsx b/docs-content/html/table/transactions-table.tsx new file mode 100644 index 000000000..0ddae72a4 --- /dev/null +++ b/docs-content/html/table/transactions-table.tsx @@ -0,0 +1,519 @@ +export function TransactionsTable() { + return ( +
+
+
+
+
+ Recent Transactions +
+

+ These are details about the last transactions +

+
+
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Transaction +

+
+

+ Amount +

+
+

+ Date +

+
+

+ Status +

+
+

+ Account +

+
+

+
+
+ Spotify +

+ Spotify +

+
+
+

+ $2,500 +

+
+

+ Wed 3:00pm +

+
+
+
+ paid +
+
+
+
+
+ visa +
+
+

+ visa 1234 +

+

+ 06/2026 +

+
+
+
+ +
+
+ Amazon +

+ Amazon +

+
+
+

+ $5,000 +

+
+

+ Wed 1:00pm +

+
+
+
+ paid +
+
+
+
+
+ master-card +
+
+

+ master card 1234 +

+

+ 06/2026 +

+
+
+
+ +
+
+ Pinterest +

+ Pinterest +

+
+
+

+ $3,400 +

+
+

+ Mon 7:40pm +

+
+
+
+ pending +
+
+
+
+
+ master-card +
+
+

+ master card 1234 +

+

+ 06/2026 +

+
+
+
+ +
+
+ Google +

+ Google +

+
+
+

+ $1,000 +

+
+

+ Wed 5:00pm +

+
+
+
+ paid +
+
+
+
+
+ visa +
+
+

+ visa 1234 +

+

+ 06/2026 +

+
+
+
+ +
+
+ netflix +

+ netflix +

+
+
+

+ $14,000 +

+
+

+ Wed 3:30am +

+
+
+
+ cancelled +
+
+
+
+
+ visa +
+
+

+ visa 1234 +

+

+ 06/2026 +

+
+
+
+ +
+
+
+ +
+ + + + + + + +
+ +
+
+ ); +} diff --git a/docs-content/html/tabs/index.ts b/docs-content/html/tabs/index.ts new file mode 100644 index 000000000..55b90a4aa --- /dev/null +++ b/docs-content/html/tabs/index.ts @@ -0,0 +1,3 @@ +export * from "./tabs"; +export * from "./tabs-with-content"; +export * from "./tabs-with-icon"; diff --git a/docs-content/html/tabs/tabs-with-content.tsx b/docs-content/html/tabs/tabs-with-content.tsx new file mode 100644 index 000000000..7b0adbd7b --- /dev/null +++ b/docs-content/html/tabs/tabs-with-content.tsx @@ -0,0 +1,67 @@ +export function TabsWithContent() { + return ( +
+
+ +
+
+

+ Because it's about motivating the doers. Because I'm + here to follow my dreams and inspire other people to follow their + dreams, too. +

+
+
+

+ The reading of all good books is like a conversation with the + finest minds of past centuries. +

+
+
+

+ Comparing yourself to others is the thief of joy. +

+
+
+
+
+ ); +} diff --git a/docs-content/html/tabs/tabs-with-icon.tsx b/docs-content/html/tabs/tabs-with-icon.tsx new file mode 100644 index 000000000..f3c385340 --- /dev/null +++ b/docs-content/html/tabs/tabs-with-icon.tsx @@ -0,0 +1,81 @@ +export function TabsWithIcon() { + return ( + + ); +} diff --git a/docs-content/html/tabs/tabs.tsx b/docs-content/html/tabs/tabs.tsx new file mode 100644 index 000000000..6a19973d3 --- /dev/null +++ b/docs-content/html/tabs/tabs.tsx @@ -0,0 +1,64 @@ +export function TabsDefault() { + return ( + + ); +} diff --git a/docs-content/html/textarea/comment-box-textarea.tsx b/docs-content/html/textarea/comment-box-textarea.tsx new file mode 100644 index 000000000..3469dfb8f --- /dev/null +++ b/docs-content/html/textarea/comment-box-textarea.tsx @@ -0,0 +1,53 @@ +export function CommentBoxTextarea() { + return ( +
+
+ + +
+
+ +
+ + +
+
+
+ ); +} diff --git a/docs-content/html/textarea/index.ts b/docs-content/html/textarea/index.ts new file mode 100644 index 000000000..a1030ad74 --- /dev/null +++ b/docs-content/html/textarea/index.ts @@ -0,0 +1,8 @@ +export * from "./comment-box-textarea"; +export * from "./textarea"; +export * from "./textarea-colors"; +export * from "./textarea-disabled"; +export * from "./textarea-sizes"; +export * from "./textarea-validations"; +export * from "./textarea-variants"; +export * from "./twitter-chatbox-textarea"; diff --git a/docs-content/html/textarea/textarea-colors.tsx b/docs-content/html/textarea/textarea-colors.tsx new file mode 100644 index 000000000..54c93da42 --- /dev/null +++ b/docs-content/html/textarea/textarea-colors.tsx @@ -0,0 +1,42 @@ +export function TextareaColors() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/textarea/textarea-disabled.tsx b/docs-content/html/textarea/textarea-disabled.tsx new file mode 100644 index 000000000..28e8e82c5 --- /dev/null +++ b/docs-content/html/textarea/textarea-disabled.tsx @@ -0,0 +1,16 @@ +export function TextareaDisabled() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/textarea/textarea-sizes.tsx b/docs-content/html/textarea/textarea-sizes.tsx new file mode 100644 index 000000000..0072ee0f5 --- /dev/null +++ b/docs-content/html/textarea/textarea-sizes.tsx @@ -0,0 +1,24 @@ +export function TextareaSizes() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/textarea/textarea-validations.tsx b/docs-content/html/textarea/textarea-validations.tsx new file mode 100644 index 000000000..582a4804b --- /dev/null +++ b/docs-content/html/textarea/textarea-validations.tsx @@ -0,0 +1,24 @@ +export function TextareaValidations() { + return ( +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/textarea/textarea-variants.tsx b/docs-content/html/textarea/textarea-variants.tsx new file mode 100644 index 000000000..ab5b0ee6a --- /dev/null +++ b/docs-content/html/textarea/textarea-variants.tsx @@ -0,0 +1,33 @@ +export function TextareaVariants() { + return ( +
+
+ + +
+
+ + +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/textarea/textarea.tsx b/docs-content/html/textarea/textarea.tsx new file mode 100644 index 000000000..1a8ff10e4 --- /dev/null +++ b/docs-content/html/textarea/textarea.tsx @@ -0,0 +1,17 @@ +import { Textarea } from "@material-tailwind/react"; + +export function TextareaDefault() { + return ( +
+
+ + +
+
+ ); +} diff --git a/docs-content/html/textarea/twitter-chatbox-textarea.tsx b/docs-content/html/textarea/twitter-chatbox-textarea.tsx new file mode 100644 index 000000000..9b8483d28 --- /dev/null +++ b/docs-content/html/textarea/twitter-chatbox-textarea.tsx @@ -0,0 +1,77 @@ +export function TwitterChatboxTextarea() { + return ( +
+
+ + +
+
+ + +
+
+ +
+
+ ); +} diff --git a/docs-content/html/timeline/activities-timeline.tsx b/docs-content/html/timeline/activities-timeline.tsx new file mode 100644 index 000000000..a3f617cb6 --- /dev/null +++ b/docs-content/html/timeline/activities-timeline.tsx @@ -0,0 +1,97 @@ +export function ActivitiesTimeline() { + return ( +
+
    +
  • + + + +
    + + + +
    +
    + $2400, Design changes +
    +

    + 22 DEC 7:20 PM +

    +
    +
    +
  • +
  • + + + +
    + + + +
    +
    + New order #1832412 +
    +

    + 21 DEC 11 PM +

    +
    +
    +
  • +
  • +
    + + + +
    +
    + Payment completed for order #4395133 +
    +

    + 20 DEC 2:20 AM +

    +
    +
    +
  • +
+
+ ); +} diff --git a/docs-content/html/timeline/default-timeline.tsx b/docs-content/html/timeline/default-timeline.tsx new file mode 100644 index 000000000..9eaa00dc3 --- /dev/null +++ b/docs-content/html/timeline/default-timeline.tsx @@ -0,0 +1,74 @@ +export function DefaultTimeline() { + return ( +
+
    +
  • + + + +
    + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
  • + + + +
    + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
  • +
    + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
+
+ ); +} diff --git a/docs-content/html/timeline/index.ts b/docs-content/html/timeline/index.ts new file mode 100644 index 000000000..565725258 --- /dev/null +++ b/docs-content/html/timeline/index.ts @@ -0,0 +1,4 @@ +export * from "./default-timeline"; +export * from "./timeline-with-icon"; +export * from "./timeline-with-avatar"; +export * from "./activities-timeline"; diff --git a/docs-content/html/timeline/timeline-with-avatar.tsx b/docs-content/html/timeline/timeline-with-avatar.tsx new file mode 100644 index 000000000..c3090ca17 --- /dev/null +++ b/docs-content/html/timeline/timeline-with-avatar.tsx @@ -0,0 +1,92 @@ +export function TimelineWithAvatar() { + return ( +
+
    +
  • + + + +
    + + user 1 + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
  • + + + +
    + + user 2 + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
  • +
    + + user 3 + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
+
+ ); +} diff --git a/docs-content/html/timeline/timeline-with-icon.tsx b/docs-content/html/timeline/timeline-with-icon.tsx new file mode 100644 index 000000000..189ea67b1 --- /dev/null +++ b/docs-content/html/timeline/timeline-with-icon.tsx @@ -0,0 +1,114 @@ +export function TimelineWithIcon() { + return ( +
+
    +
  • + + + +
    + + + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
  • + + + +
    + + + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
  • +
    + + + +
    + Timeline Title Here. +
    +
    +
    + +
    +

    + The key to more success is to have a lot of pillows. Put it this + way, it took me twenty five years to get these plants, twenty + five years of blood sweat and tears, and I'm never giving + up, I'm just getting started. I'm up to something. Fan + luv. +

    +
    +
    +
  • +
+
+ ); +} diff --git a/docs-content/html/tooltip/index.ts b/docs-content/html/tooltip/index.ts new file mode 100644 index 000000000..bd27cebb0 --- /dev/null +++ b/docs-content/html/tooltip/index.ts @@ -0,0 +1,3 @@ +export * from "./tooltip"; +export * from "./tooltip-custom-animation"; +export * from "./tooltip-placement"; diff --git a/docs-content/html/tooltip/tooltip-custom-animation.tsx b/docs-content/html/tooltip/tooltip-custom-animation.tsx new file mode 100644 index 000000000..eef440353 --- /dev/null +++ b/docs-content/html/tooltip/tooltip-custom-animation.tsx @@ -0,0 +1,22 @@ +export function TooltipCustomAnimation() { + return ( + <> + +
+ {`Material Tailwind`} +
+ + ); +} diff --git a/docs-content/html/tooltip/tooltip-placement.tsx b/docs-content/html/tooltip/tooltip-placement.tsx new file mode 100644 index 000000000..74fc834d4 --- /dev/null +++ b/docs-content/html/tooltip/tooltip-placement.tsx @@ -0,0 +1,182 @@ +export function TooltipPlacement() { + return ( + <> +
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+
+
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+
+
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+
+
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+ +
+ {`Material Tailwind`} +
+
+ + ); +} diff --git a/docs-content/html/tooltip/tooltip.tsx b/docs-content/html/tooltip/tooltip.tsx new file mode 100644 index 000000000..d4358567e --- /dev/null +++ b/docs-content/html/tooltip/tooltip.tsx @@ -0,0 +1,19 @@ +export function TooltipDefault() { + return ( + <> + +
+ {`Material Tailwind`} +
+ + ); +} diff --git a/docs-content/html/typography/index.ts b/docs-content/html/typography/index.ts new file mode 100644 index 000000000..eba342914 --- /dev/null +++ b/docs-content/html/typography/index.ts @@ -0,0 +1,7 @@ +export * from "./typography"; +export * from "./typography-colors"; +export * from "./typography-gradient-color"; +export * from "./typography-variants"; +export * from "./typography-load-text"; +export * from "./typography-paragraph"; +export * from "./typography-small-text"; diff --git a/docs-content/html/typography/typography-colors.tsx b/docs-content/html/typography/typography-colors.tsx new file mode 100644 index 000000000..f5f09e646 --- /dev/null +++ b/docs-content/html/typography/typography-colors.tsx @@ -0,0 +1,18 @@ +export function TypographyColors() { + return ( +
+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+
+ ); +} diff --git a/docs-content/html/typography/typography-gradient-color.tsx b/docs-content/html/typography/typography-gradient-color.tsx new file mode 100644 index 000000000..d77d6c78f --- /dev/null +++ b/docs-content/html/typography/typography-gradient-color.tsx @@ -0,0 +1,7 @@ +export function TypographyGradientColor() { + return ( +

+ Material Tailwind +

+ ); +} diff --git a/docs-content/html/typography/typography-load-text.tsx b/docs-content/html/typography/typography-load-text.tsx new file mode 100644 index 000000000..10df487be --- /dev/null +++ b/docs-content/html/typography/typography-load-text.tsx @@ -0,0 +1,10 @@ +export function TypographyLoadText() { + return ( +

+ Material Tailwind is an easy to use components library for Tailwind CSS + and Material Design. It provides a simple way to customize your + components, you can change the colors, fonts, breakpoints and everything + you need. +

+ ); +} diff --git a/docs-content/html/typography/typography-paragraph.tsx b/docs-content/html/typography/typography-paragraph.tsx new file mode 100644 index 000000000..753309d58 --- /dev/null +++ b/docs-content/html/typography/typography-paragraph.tsx @@ -0,0 +1,10 @@ +export function TypographyParagraph() { + return ( +

+ Material Tailwind is an easy to use components library for Tailwind CSS + and Material Design. It provides a simple way to customize your + components, you can change the colors, fonts, breakpoints and everything + you need. +

+ ); +} diff --git a/docs-content/html/typography/typography-small-text.tsx b/docs-content/html/typography/typography-small-text.tsx new file mode 100644 index 000000000..d90c727ac --- /dev/null +++ b/docs-content/html/typography/typography-small-text.tsx @@ -0,0 +1,10 @@ +export function TypographySmallText() { + return ( +

+ Material Tailwind is an easy to use components library for Tailwind CSS + and Material Design. It provides a simple way to customize your + components, you can change the colors, fonts, breakpoints and everything + you need. +

+ ); +} diff --git a/docs-content/html/typography/typography-variants.tsx b/docs-content/html/typography/typography-variants.tsx new file mode 100644 index 000000000..8c57e3fa5 --- /dev/null +++ b/docs-content/html/typography/typography-variants.tsx @@ -0,0 +1,24 @@ +export function TypographyVariants() { + return ( +
+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+
+ Material Tailwind +
+
+ Material Tailwind +
+
+ ); +} diff --git a/docs-content/html/typography/typography.tsx b/docs-content/html/typography/typography.tsx new file mode 100644 index 000000000..3e3d72684 --- /dev/null +++ b/docs-content/html/typography/typography.tsx @@ -0,0 +1,10 @@ +export function TypographyDefault() { + return ( +

+ Material Tailwind is an easy to use components library for Tailwind CSS + and Material Design. It provides a simple way to customize your + components, you can change the colors, fonts, breakpoints and everything + you need. +

+ ); +} diff --git a/docs-content/html/video/autoplay-video.tsx b/docs-content/html/video/autoplay-video.tsx new file mode 100644 index 000000000..16dd7f5d3 --- /dev/null +++ b/docs-content/html/video/autoplay-video.tsx @@ -0,0 +1,8 @@ +export function AutoplayVideo() { + return ( + + ); +} diff --git a/docs-content/html/video/default-video.tsx b/docs-content/html/video/default-video.tsx new file mode 100644 index 000000000..349ba14dd --- /dev/null +++ b/docs-content/html/video/default-video.tsx @@ -0,0 +1,11 @@ +export function DefaultVideo() { + return ( + + ); +} diff --git a/docs-content/html/video/index.ts b/docs-content/html/video/index.ts new file mode 100644 index 000000000..690476492 --- /dev/null +++ b/docs-content/html/video/index.ts @@ -0,0 +1,3 @@ +export * from "./default-video"; +export * from "./autoplay-video"; +export * from "./muted-video"; \ No newline at end of file diff --git a/docs-content/html/video/muted-video.tsx b/docs-content/html/video/muted-video.tsx new file mode 100644 index 000000000..b853968d3 --- /dev/null +++ b/docs-content/html/video/muted-video.tsx @@ -0,0 +1,8 @@ +export function MutedVideo() { + return ( + + ); +} diff --git a/docs-content/react/accordion/accordion-all-open.tsx b/docs-content/react/accordion/accordion-all-open.tsx new file mode 100644 index 000000000..abf248b76 --- /dev/null +++ b/docs-content/react/accordion/accordion-all-open.tsx @@ -0,0 +1,54 @@ +import React from "react"; +import { + Accordion, + AccordionHeader, + AccordionBody, +} from "@material-tailwind/react"; + +export function AccordionAllOpen() { + const [openAcc1, setOpenAcc1] = React.useState(true); + const [openAcc2, setOpenAcc2] = React.useState(true); + const [openAcc3, setOpenAcc3] = React.useState(true); + + const handleOpenAcc1 = () => setOpenAcc1((cur) => !cur); + const handleOpenAcc2 = () => setOpenAcc2((cur) => !cur); + const handleOpenAcc3 = () => setOpenAcc3((cur) => !cur); + + return ( + <> + + + What is Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + + How to use Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + ); +} diff --git a/docs-content/react/accordion/accordion-always-open.tsx b/docs-content/react/accordion/accordion-always-open.tsx new file mode 100644 index 000000000..92e45a595 --- /dev/null +++ b/docs-content/react/accordion/accordion-always-open.tsx @@ -0,0 +1,52 @@ +import React from "react"; +import { + Accordion, + AccordionHeader, + AccordionBody, +} from "@material-tailwind/react"; + +export function AccordionAlwaysOpen() { + const [open, setOpen] = React.useState(0); + const [alwaysOpen, setAlwaysOpen] = React.useState(true); + + const handleAlwaysOpen = () => setAlwaysOpen((cur) => !cur); + const handleOpen = (value) => setOpen(open === value ? 0 : value); + + return ( + <> + + + What is Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(1)}> + How to use Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(2)}> + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + ); +} diff --git a/docs-content/react/accordion/accordion-custom-animation.tsx b/docs-content/react/accordion/accordion-custom-animation.tsx new file mode 100644 index 000000000..15efcd394 --- /dev/null +++ b/docs-content/react/accordion/accordion-custom-animation.tsx @@ -0,0 +1,55 @@ +import React from "react"; +import { + Accordion, + AccordionHeader, + AccordionBody, +} from "@material-tailwind/react"; + +const CUSTOM_ANIMATION = { + mount: { scale: 1 }, + unmount: { scale: 0.9 }, +}; + +export function AccordionCustomAnimation() { + const [open, setOpen] = React.useState(0); + + const handleOpen = (value) => setOpen(open === value ? 0 : value); + + return ( + <> + + handleOpen(1)}> + What is Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(2)}> + How to use Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(3)}> + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + ); +} diff --git a/docs-content/react/accordion/accordion-custom-icon.tsx b/docs-content/react/accordion/accordion-custom-icon.tsx new file mode 100644 index 000000000..60404d677 --- /dev/null +++ b/docs-content/react/accordion/accordion-custom-icon.tsx @@ -0,0 +1,71 @@ +import React from "react"; +import { + Accordion, + AccordionHeader, + AccordionBody, +} from "@material-tailwind/react"; + +function Icon({ id, open }) { + return ( + + + + ); +} + +export function AccordionCustomIcon() { + const [open, setOpen] = React.useState(0); + + const handleOpen = (value) => setOpen(open === value ? 0 : value); + + return ( + <> + }> + handleOpen(1)}> + What is Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + }> + handleOpen(2)}> + How to use Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + }> + handleOpen(3)}> + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + ); +} diff --git a/docs-content/react/accordion/accordion-custom-styles.tsx b/docs-content/react/accordion/accordion-custom-styles.tsx new file mode 100644 index 000000000..c74ff24cb --- /dev/null +++ b/docs-content/react/accordion/accordion-custom-styles.tsx @@ -0,0 +1,74 @@ +import React from "react"; +import { + Accordion, + AccordionHeader, + AccordionBody, +} from "@material-tailwind/react"; + +export function AccordionCustomStyles() { + const [open, setOpen] = React.useState(1); + + const handleOpen = (value) => setOpen(open === value ? 0 : value); + + return ( + <> + + handleOpen(1)} + className={`border-b-0 transition-colors ${ + open === 1 ? "text-blue-500 hover:!text-blue-700" : "" + }`} + > + What is Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(2)} + className={`border-b-0 transition-colors ${ + open === 2 ? "text-blue-500 hover:!text-blue-700" : "" + }`} + > + How to use Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(3)} + className={`border-b-0 transition-colors ${ + open === 3 ? "text-blue-500 hover:!text-blue-700" : "" + }`} + > + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + ); +} diff --git a/docs-content/react/accordion/accordion-disabled.tsx b/docs-content/react/accordion/accordion-disabled.tsx new file mode 100644 index 000000000..44e38b546 --- /dev/null +++ b/docs-content/react/accordion/accordion-disabled.tsx @@ -0,0 +1,50 @@ +import React from "react"; +import { + Accordion, + AccordionHeader, + AccordionBody, +} from "@material-tailwind/react"; + +export function AccordionDisabled() { + const [open, setOpen] = React.useState(0); + + const handleOpen = (value) => setOpen(open === value ? 0 : value); + + return ( + <> + + handleOpen(1)}> + What is Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(2)}> + How to use Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + handleOpen(3)}> + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. + We're constantly growing. We're constantly making mistakes. + We're constantly trying to express ourselves and actualize our + dreams. + + + + ); +} diff --git a/docs-content/react/accordion/accordion.tsx b/docs-content/react/accordion/accordion.tsx new file mode 100644 index 000000000..9e51eedc3 --- /dev/null +++ b/docs-content/react/accordion/accordion.tsx @@ -0,0 +1,41 @@ +import React from "react"; +import { Accordion, AccordionHeader, AccordionBody } from "@material-tailwind/react"; + +export function DefaultAccordion() { + const [open, setOpen] = React.useState(1); + + const handleOpen = (value) => setOpen(open === value ? 0 : value); + + return ( + <> + + handleOpen(1)}>What is Material Tailwind? + + We're not always in the position that we want to be at. We're constantly + growing. We're constantly making mistakes. We're constantly trying to express + ourselves and actualize our dreams. + + + + handleOpen(2)}> + How to use Material Tailwind? + + + We're not always in the position that we want to be at. We're constantly + growing. We're constantly making mistakes. We're constantly trying to express + ourselves and actualize our dreams. + + + + handleOpen(3)}> + What can I do with Material Tailwind? + + + We're not always in the position that we want to be at. We're constantly + growing. We're constantly making mistakes. We're constantly trying to express + ourselves and actualize our dreams. + + + + ); +} diff --git a/docs-content/react/accordion/index.ts b/docs-content/react/accordion/index.ts new file mode 100644 index 000000000..851f064e5 --- /dev/null +++ b/docs-content/react/accordion/index.ts @@ -0,0 +1,7 @@ +export * from "./accordion"; +export * from "./accordion-all-open"; +export * from "./accordion-always-open"; +export * from "./accordion-custom-animation"; +export * from "./accordion-custom-icon"; +export * from "./accordion-custom-styles"; +export * from "./accordion-disabled"; diff --git a/docs-content/react/alert/alert-colors.tsx b/docs-content/react/alert/alert-colors.tsx new file mode 100644 index 000000000..667a19dc1 --- /dev/null +++ b/docs-content/react/alert/alert-colors.tsx @@ -0,0 +1,12 @@ +import { Alert } from "@material-tailwind/react"; + +export function AlertColors() { + return ( +
+ An info alert for showing message. + An error alert for showing message. + A success alert for showing message. + A warning alert for showing message. +
+ ); +} diff --git a/docs-content/react/alert/alert-custom-animation.tsx b/docs-content/react/alert/alert-custom-animation.tsx new file mode 100644 index 000000000..af640e036 --- /dev/null +++ b/docs-content/react/alert/alert-custom-animation.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { Alert, Button } from "@material-tailwind/react"; + +export function AlertCustomAnimation() { + const [open, setOpen] = React.useState(true); + + return ( + <> + {!open && ( + + )} + setOpen(false)} + animate={{ + mount: { y: 0 }, + unmount: { y: 100 }, + }} + > + A dismissible alert with custom animation. + + + ); +} diff --git a/docs-content/react/alert/alert-custom-close-icon.tsx b/docs-content/react/alert/alert-custom-close-icon.tsx new file mode 100644 index 000000000..183201131 --- /dev/null +++ b/docs-content/react/alert/alert-custom-close-icon.tsx @@ -0,0 +1,51 @@ +import React from "react"; +import { Alert, Button } from "@material-tailwind/react"; + +function Icon() { + return ( + + + + ); +} + +export function AlertCustomCloseIcon() { + const [open, setOpen] = React.useState(true); + + return ( + <> + {!open && ( + + )} + } + action={ + + } + > + Sorry, something went wrong please try again. + + + ); +} diff --git a/docs-content/react/alert/alert-custom-styles.tsx b/docs-content/react/alert/alert-custom-styles.tsx new file mode 100644 index 000000000..9ad0717b1 --- /dev/null +++ b/docs-content/react/alert/alert-custom-styles.tsx @@ -0,0 +1,29 @@ +import { Alert } from "@material-tailwind/react"; + +function Icon() { + return ( + + + + ); +} + +export function AlertCustomStyles() { + return ( + } + className="rounded-none border-l-4 border-[#2ec946] bg-[#2ec946]/10 font-medium text-[#2ec946]" + > + A simple alert for showing message. + + ); +} diff --git a/docs-content/react/alert/alert-dismissible.tsx b/docs-content/react/alert/alert-dismissible.tsx new file mode 100644 index 000000000..772df23f1 --- /dev/null +++ b/docs-content/react/alert/alert-dismissible.tsx @@ -0,0 +1,19 @@ +import React from "react"; +import { Alert, Button } from "@material-tailwind/react"; + +export function AlertDismissible() { + const [open, setOpen] = React.useState(true); + + return ( + <> + {!open && ( + + )} + setOpen(false)}> + A dismissible alert for showing message. + + + ); +} diff --git a/docs-content/react/alert/alert-icon.tsx b/docs-content/react/alert/alert-icon.tsx new file mode 100644 index 000000000..d997cb65d --- /dev/null +++ b/docs-content/react/alert/alert-icon.tsx @@ -0,0 +1,26 @@ +import { Alert } from "@material-tailwind/react"; + +function Icon() { + return ( + + + + ); +} + +export function AlertIcon() { + return ( + }>A simple alert with icon for showing message + ); +} diff --git a/docs-content/react/alert/alert-variants.tsx b/docs-content/react/alert/alert-variants.tsx new file mode 100644 index 000000000..c112f0c10 --- /dev/null +++ b/docs-content/react/alert/alert-variants.tsx @@ -0,0 +1,18 @@ +import { Alert } from "@material-tailwind/react"; + +export function AlertVariants() { + return ( +
+ A simple filled alert for showing message. + + A simple gradient alert for showing message. + + + A simple outlined alert for showing message. + + + A simple ghost alert for showing message. + +
+ ); +} diff --git a/docs-content/react/alert/alert-with-content.tsx b/docs-content/react/alert/alert-with-content.tsx new file mode 100644 index 000000000..d8881fea3 --- /dev/null +++ b/docs-content/react/alert/alert-with-content.tsx @@ -0,0 +1,48 @@ +import React from "react"; +import { Alert, Button, Typography } from "@material-tailwind/react"; + +function Icon() { + return ( + + + + ); +} + +export function AlertWithContent() { + const [open, setOpen] = React.useState(true); + + return ( + <> + {!open && ( + + )} + } + onClose={() => setOpen(false)} + > + + Success + + + I don't know what that word means. I'm happy. But success, + that goes back to what in somebody's eyes success means. For me, + success is inner peace. That's a good day for me. + + + + ); +} diff --git a/docs-content/react/alert/alert-with-list.tsx b/docs-content/react/alert/alert-with-list.tsx new file mode 100644 index 000000000..862757f9b --- /dev/null +++ b/docs-content/react/alert/alert-with-list.tsx @@ -0,0 +1,84 @@ +import { Alert, Typography } from "@material-tailwind/react"; + +function IconOutlined() { + return ( + + + + ); +} + +function IconSolid() { + return ( + + + + ); +} + +export function AlertWithList() { + return ( +
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+
+ ); +} diff --git a/docs-content/react/alert/alert.tsx b/docs-content/react/alert/alert.tsx new file mode 100644 index 000000000..909aa1020 --- /dev/null +++ b/docs-content/react/alert/alert.tsx @@ -0,0 +1,5 @@ +import { Alert } from "@material-tailwind/react"; + +export function AlertDefault() { + return A simple alert for showing message.; +} diff --git a/docs-content/react/alert/index.ts b/docs-content/react/alert/index.ts new file mode 100644 index 000000000..0de1cfd3a --- /dev/null +++ b/docs-content/react/alert/index.ts @@ -0,0 +1,10 @@ +export * from "./alert"; +export * from "./alert-colors"; +export * from "./alert-custom-animation"; +export * from "./alert-custom-close-icon"; +export * from "./alert-custom-styles"; +export * from "./alert-dismissible"; +export * from "./alert-icon"; +export * from "./alert-variants"; +export * from "./alert-with-content"; +export * from "./alert-with-list"; diff --git a/docs-content/react/avatar/avatar-custom-styles.tsx b/docs-content/react/avatar/avatar-custom-styles.tsx new file mode 100644 index 000000000..019d0c7ff --- /dev/null +++ b/docs-content/react/avatar/avatar-custom-styles.tsx @@ -0,0 +1,12 @@ +import { Avatar } from "@material-tailwind/react"; + +export function AvatarCustomStyles() { + return ( + + ); +} diff --git a/docs-content/react/avatar/avatar-sizes.tsx b/docs-content/react/avatar/avatar-sizes.tsx new file mode 100644 index 000000000..1b3570bfd --- /dev/null +++ b/docs-content/react/avatar/avatar-sizes.tsx @@ -0,0 +1,38 @@ +import { Avatar } from "@material-tailwind/react"; + +export function AvatarSizes() { + return ( +
+ + + + + + +
+ ); +} diff --git a/components/docs/avatar-stack.tsx b/docs-content/react/avatar/avatar-stack.tsx similarity index 97% rename from components/docs/avatar-stack.tsx rename to docs-content/react/avatar/avatar-stack.tsx index cfcfebadb..25489999c 100644 --- a/components/docs/avatar-stack.tsx +++ b/docs-content/react/avatar/avatar-stack.tsx @@ -1,6 +1,6 @@ import { Avatar } from "@material-tailwind/react"; -export default function AvatarStack() { +export function AvatarStack() { return (
+ + + +
+ ); +} diff --git a/docs-content/react/avatar/avatar-with-border.tsx b/docs-content/react/avatar/avatar-with-border.tsx new file mode 100644 index 000000000..7aafc6032 --- /dev/null +++ b/docs-content/react/avatar/avatar-with-border.tsx @@ -0,0 +1,30 @@ +import { Avatar } from "@material-tailwind/react"; + +export function AvatarWithBorder() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/react/avatar/avatar-with-dot-indicator.tsx b/docs-content/react/avatar/avatar-with-dot-indicator.tsx new file mode 100644 index 000000000..a90a95707 --- /dev/null +++ b/docs-content/react/avatar/avatar-with-dot-indicator.tsx @@ -0,0 +1,34 @@ +import { Avatar, Badge } from "@material-tailwind/react"; + +export function AvatarWithDotIndicator() { + return ( +
+ + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/avatar/avatar-with-text.tsx b/docs-content/react/avatar/avatar-with-text.tsx new file mode 100644 index 000000000..e9d64fe87 --- /dev/null +++ b/docs-content/react/avatar/avatar-with-text.tsx @@ -0,0 +1,46 @@ +import { Avatar, Typography } from "@material-tailwind/react"; + +export function AvatarWithText() { + return ( +
+
+ +
+ Tania Andrew + + Web Developer + +
+
+
+ +
+ Tania Andrew + + Web Developer + +
+
+
+ +
+ Tania Andrew + + Web Developer + +
+
+
+ ); +} diff --git a/docs-content/react/avatar/avatar-with-user-dropdown.tsx b/docs-content/react/avatar/avatar-with-user-dropdown.tsx new file mode 100644 index 000000000..2fc6dc93a --- /dev/null +++ b/docs-content/react/avatar/avatar-with-user-dropdown.tsx @@ -0,0 +1,98 @@ +import React from "react"; +import { + Avatar, + Button, + Menu, + MenuHandler, + MenuItem, + MenuList, + Typography, +} from "@material-tailwind/react"; +import { + Cog6ToothIcon, + InboxArrowDownIcon, + LifebuoyIcon, + PowerIcon, + UserCircleIcon, +} from "@heroicons/react/24/solid"; + +// profile menu component +const profileMenuItems = [ + { + label: "My Profile", + icon: UserCircleIcon, + }, + { + label: "Edit Profile", + icon: Cog6ToothIcon, + }, + { + label: "Inbox", + icon: InboxArrowDownIcon, + }, + { + label: "Help", + icon: LifebuoyIcon, + }, + { + label: "Sign Out", + icon: PowerIcon, + }, +]; + +export function AvatarWithUserDropdown() { + const [isMenuOpen, setIsMenuOpen] = React.useState(false); + + const closeMenu = () => setIsMenuOpen(false); + + return ( + + + + + + {profileMenuItems.map(({ label, icon }, key) => { + const isLastItem = key === profileMenuItems.length - 1; + return ( + + {React.createElement(icon, { + className: `h-4 w-4 ${isLastItem ? "text-red-500" : ""}`, + strokeWidth: 2, + })} + + {label} + + + ); + })} + + + ); +} diff --git a/docs-content/react/avatar/avatar.tsx b/docs-content/react/avatar/avatar.tsx new file mode 100644 index 000000000..e011daded --- /dev/null +++ b/docs-content/react/avatar/avatar.tsx @@ -0,0 +1,10 @@ +import { Avatar } from "@material-tailwind/react"; + +export function AvatarDefault() { + return ( + + ); +} diff --git a/docs-content/react/avatar/index.ts b/docs-content/react/avatar/index.ts new file mode 100644 index 000000000..ea51a373f --- /dev/null +++ b/docs-content/react/avatar/index.ts @@ -0,0 +1,9 @@ +export * from "./avatar"; +export * from "./avatar-custom-styles"; +export * from "./avatar-stack"; +export * from "./avatar-sizes"; +export * from "./avatar-variants"; +export * from "./avatar-with-border"; +export * from "./avatar-with-text"; +export * from "./avatar-with-dot-indicator"; +export * from "./avatar-with-user-dropdown"; diff --git a/docs-content/react/badge/badge-colors.tsx b/docs-content/react/badge/badge-colors.tsx new file mode 100644 index 000000000..2b1fed271 --- /dev/null +++ b/docs-content/react/badge/badge-colors.tsx @@ -0,0 +1,20 @@ +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeColors() { + return ( +
+ + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/badge/badge-custom-styles.tsx b/docs-content/react/badge/badge-custom-styles.tsx new file mode 100644 index 000000000..8bd16db82 --- /dev/null +++ b/docs-content/react/badge/badge-custom-styles.tsx @@ -0,0 +1,13 @@ +import { Badge, Button } from "@material-tailwind/react"; +import {CheckIcon} from "@heroicons/react/24/outline"; + +export function BadgeCustomStyles() { + return ( + } + className="bg-gradient-to-tr from-green-400 to-green-600 border-2 border-white shadow-lg shadow-black/20" + > + + + ); +} diff --git a/docs-content/react/badge/badge-dot.tsx b/docs-content/react/badge/badge-dot.tsx new file mode 100644 index 000000000..71b044c2c --- /dev/null +++ b/docs-content/react/badge/badge-dot.tsx @@ -0,0 +1,9 @@ +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeDot() { + return ( + + + + ); +} diff --git a/docs-content/react/badge/badge-overlap.tsx b/docs-content/react/badge/badge-overlap.tsx new file mode 100644 index 000000000..272dcbee8 --- /dev/null +++ b/docs-content/react/badge/badge-overlap.tsx @@ -0,0 +1,31 @@ +import { Badge, IconButton, Avatar } from "@material-tailwind/react"; +import { HomeIcon } from "@heroicons/react/24/solid"; + +export function BadgeOverlap() { + return ( +
+ + + + + + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/badge/badge-placement.tsx b/docs-content/react/badge/badge-placement.tsx new file mode 100644 index 000000000..9232203ba --- /dev/null +++ b/docs-content/react/badge/badge-placement.tsx @@ -0,0 +1,20 @@ +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgePlacement() { + return ( +
+ + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/badge/badge-with-border.tsx b/docs-content/react/badge/badge-with-border.tsx new file mode 100644 index 000000000..892334bb3 --- /dev/null +++ b/docs-content/react/badge/badge-with-border.tsx @@ -0,0 +1,9 @@ +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeWithBorder() { + return ( + + + + ); +} diff --git a/docs-content/react/badge/badge.tsx b/docs-content/react/badge/badge.tsx new file mode 100644 index 000000000..ec168d32d --- /dev/null +++ b/docs-content/react/badge/badge.tsx @@ -0,0 +1,9 @@ +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeDefault() { + return ( + + + + ); +} diff --git a/docs-content/react/badge/index.ts b/docs-content/react/badge/index.ts new file mode 100644 index 000000000..9ff7b1afb --- /dev/null +++ b/docs-content/react/badge/index.ts @@ -0,0 +1,7 @@ +export * from "./badge"; +export * from "./badge-colors"; +export * from "./badge-dot"; +export * from "./badge-overlap"; +export * from "./badge-placement"; +export * from "./badge-with-border"; +export * from "./badge-custom-styles"; diff --git a/docs-content/react/breadcrumbs/block-level-breadcrumbs.tsx b/docs-content/react/breadcrumbs/block-level-breadcrumbs.tsx new file mode 100644 index 000000000..b22c289fe --- /dev/null +++ b/docs-content/react/breadcrumbs/block-level-breadcrumbs.tsx @@ -0,0 +1,15 @@ +import { Breadcrumbs } from "@material-tailwind/react"; + +export function BlockLevelBreadcrumbs() { + return ( + + + Docs + + + Components + + Breadcrumbs + + ); +} diff --git a/docs-content/react/breadcrumbs/breadcrumbs-custom-separator.tsx b/docs-content/react/breadcrumbs/breadcrumbs-custom-separator.tsx new file mode 100644 index 000000000..d80e4e97f --- /dev/null +++ b/docs-content/react/breadcrumbs/breadcrumbs-custom-separator.tsx @@ -0,0 +1,15 @@ +import { Breadcrumbs } from "@material-tailwind/react"; + +export function BreadcrumbsCustomSeparator() { + return ( + + + Docs + + + Components + + Breadcrumbs + + ); +} diff --git a/docs-content/react/breadcrumbs/breadcrumbs-custom-styles.tsx b/docs-content/react/breadcrumbs/breadcrumbs-custom-styles.tsx new file mode 100644 index 000000000..0fb6bb3cb --- /dev/null +++ b/docs-content/react/breadcrumbs/breadcrumbs-custom-styles.tsx @@ -0,0 +1,32 @@ +import { Breadcrumbs } from "@material-tailwind/react"; +import { ArrowLongRightIcon } from "@heroicons/react/24/outline"; + +export function BreadcrumbsCustomStyles() { + return ( + + } + className="rounded-full border border-white bg-gradient-to-tr from-gray-900 to-gray-800 p-1" + > + + Docs + + + Components + + + Breadcrumbs + + + ); +} diff --git a/docs-content/react/breadcrumbs/breadcrumbs-with-icon.tsx b/docs-content/react/breadcrumbs/breadcrumbs-with-icon.tsx new file mode 100644 index 000000000..02e3b1ea1 --- /dev/null +++ b/docs-content/react/breadcrumbs/breadcrumbs-with-icon.tsx @@ -0,0 +1,22 @@ +import { Breadcrumbs } from "@material-tailwind/react"; + +export function BreadcrumbsWithIcon() { + return ( + + + + + + + + Components + + Breadcrumbs + + ); +} diff --git a/docs-content/react/breadcrumbs/breadcrumbs.tsx b/docs-content/react/breadcrumbs/breadcrumbs.tsx new file mode 100644 index 000000000..486cbcd6f --- /dev/null +++ b/docs-content/react/breadcrumbs/breadcrumbs.tsx @@ -0,0 +1,15 @@ +import { Breadcrumbs } from "@material-tailwind/react"; + +export function BreadcrumbsDefault() { + return ( + + + Docs + + + Components + + Breadcrumbs + + ); +} diff --git a/docs-content/react/breadcrumbs/index.ts b/docs-content/react/breadcrumbs/index.ts new file mode 100644 index 000000000..3b5a3737c --- /dev/null +++ b/docs-content/react/breadcrumbs/index.ts @@ -0,0 +1,5 @@ +export * from "./breadcrumbs"; +export * from "./block-level-breadcrumbs"; +export * from "./breadcrumbs-custom-separator"; +export * from "./breadcrumbs-custom-styles"; +export * from "./breadcrumbs-with-icon"; diff --git a/docs-content/react/button-group/block-level-button-group.tsx b/docs-content/react/button-group/block-level-button-group.tsx new file mode 100644 index 000000000..2e9f3697b --- /dev/null +++ b/docs-content/react/button-group/block-level-button-group.tsx @@ -0,0 +1,11 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function BlockLevelButtonGroup() { + return ( + + + + + + ); +} diff --git a/docs-content/react/button-group/button-group-colors.tsx b/docs-content/react/button-group/button-group-colors.tsx new file mode 100644 index 000000000..74b315854 --- /dev/null +++ b/docs-content/react/button-group/button-group-colors.tsx @@ -0,0 +1,28 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupColors() { + return ( +
+ + + + + + + + + + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/button-group/button-group-custom-styles.tsx b/docs-content/react/button-group/button-group-custom-styles.tsx new file mode 100644 index 000000000..40983a405 --- /dev/null +++ b/docs-content/react/button-group/button-group-custom-styles.tsx @@ -0,0 +1,11 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupCustomStyles() { + return ( + + + + + + ); +} diff --git a/docs-content/react/button-group/button-group-ripple-effect.tsx b/docs-content/react/button-group/button-group-ripple-effect.tsx new file mode 100644 index 000000000..3791bfc26 --- /dev/null +++ b/docs-content/react/button-group/button-group-ripple-effect.tsx @@ -0,0 +1,18 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupRippleEffect() { + return ( +
+ + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/button-group/button-group-sizes.tsx b/docs-content/react/button-group/button-group-sizes.tsx new file mode 100644 index 000000000..a48032d7a --- /dev/null +++ b/docs-content/react/button-group/button-group-sizes.tsx @@ -0,0 +1,23 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupSizes() { + return ( +
+ + + + + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/button-group/button-group-variants.tsx b/docs-content/react/button-group/button-group-variants.tsx new file mode 100644 index 000000000..2ef0fcb80 --- /dev/null +++ b/docs-content/react/button-group/button-group-variants.tsx @@ -0,0 +1,28 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupVariants() { + return ( +
+ + + + + + + + + + + + + + + + + + + + +
+ ); +} diff --git a/docs-content/react/button-group/button-group.tsx b/docs-content/react/button-group/button-group.tsx new file mode 100644 index 000000000..76ca53c44 --- /dev/null +++ b/docs-content/react/button-group/button-group.tsx @@ -0,0 +1,11 @@ +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupDefault() { + return ( + + + + + + ); +} diff --git a/docs-content/react/button-group/index.ts b/docs-content/react/button-group/index.ts new file mode 100644 index 000000000..05d595fd5 --- /dev/null +++ b/docs-content/react/button-group/index.ts @@ -0,0 +1,7 @@ +export * from "./button-group"; +export * from "./block-level-button-group"; +export * from "./button-group-colors"; +export * from "./button-group-custom-styles"; +export * from "./button-group-ripple-effect"; +export * from "./button-group-sizes"; +export * from "./button-group-variants"; diff --git a/docs-content/react/button/auth-buttons.tsx b/docs-content/react/button/auth-buttons.tsx new file mode 100644 index 000000000..f9aea27ae --- /dev/null +++ b/docs-content/react/button/auth-buttons.tsx @@ -0,0 +1,44 @@ +import { Button } from "@material-tailwind/react"; + +export function AuthButtons() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/react/button/block-level-button.tsx b/docs-content/react/button/block-level-button.tsx new file mode 100644 index 000000000..b39292253 --- /dev/null +++ b/docs-content/react/button/block-level-button.tsx @@ -0,0 +1,5 @@ +import { Button } from "@material-tailwind/react"; + +export function BlockLevelButton() { + return ; +} diff --git a/docs-content/react/button/button-colors.tsx b/docs-content/react/button/button-colors.tsx new file mode 100644 index 000000000..410c81719 --- /dev/null +++ b/docs-content/react/button/button-colors.tsx @@ -0,0 +1,12 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonColors() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/button/button-loading.tsx b/docs-content/react/button/button-loading.tsx new file mode 100644 index 000000000..4f6287a50 --- /dev/null +++ b/docs-content/react/button/button-loading.tsx @@ -0,0 +1,18 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonLoading() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/button/button-ripple-effect.tsx b/docs-content/react/button/button-ripple-effect.tsx new file mode 100644 index 000000000..5dfe7ff48 --- /dev/null +++ b/docs-content/react/button/button-ripple-effect.tsx @@ -0,0 +1,10 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonRippleEffect() { + return ( +
+ + +
+ ); +} diff --git a/docs-content/react/button/button-rounded.tsx b/docs-content/react/button/button-rounded.tsx new file mode 100644 index 000000000..b6b0b56c5 --- /dev/null +++ b/docs-content/react/button/button-rounded.tsx @@ -0,0 +1,18 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonRounded() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/button/button-sizes.tsx b/docs-content/react/button/button-sizes.tsx new file mode 100644 index 000000000..8d45fade0 --- /dev/null +++ b/docs-content/react/button/button-sizes.tsx @@ -0,0 +1,11 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonSizes() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/react/button/button-variants.tsx b/docs-content/react/button/button-variants.tsx new file mode 100644 index 000000000..09c7c7b51 --- /dev/null +++ b/docs-content/react/button/button-variants.tsx @@ -0,0 +1,12 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonVariants() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/button/button-with-icon.tsx b/docs-content/react/button/button-with-icon.tsx new file mode 100644 index 000000000..5c0c4963b --- /dev/null +++ b/docs-content/react/button/button-with-icon.tsx @@ -0,0 +1,76 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonWithIcon() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/button/button-with-link.tsx b/docs-content/react/button/button-with-link.tsx new file mode 100644 index 000000000..43275e433 --- /dev/null +++ b/docs-content/react/button/button-with-link.tsx @@ -0,0 +1,20 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonWithLink() { + return ( + + ); +} diff --git a/docs-content/react/button/button.tsx b/docs-content/react/button/button.tsx new file mode 100644 index 000000000..067f4e8fa --- /dev/null +++ b/docs-content/react/button/button.tsx @@ -0,0 +1,5 @@ +import { Button } from "@material-tailwind/react"; + +export function ButtonDefault() { + return ; +} diff --git a/docs-content/react/button/index.ts b/docs-content/react/button/index.ts new file mode 100644 index 000000000..06222a170 --- /dev/null +++ b/docs-content/react/button/index.ts @@ -0,0 +1,11 @@ +export * from "./button"; +export * from "./auth-buttons"; +export * from "./block-level-button"; +export * from "./button-colors"; +export * from "./button-ripple-effect"; +export * from "./button-rounded"; +export * from "./button-sizes"; +export * from "./button-variants"; +export * from "./button-with-icon"; +export * from "./button-with-link"; +export * from "./button-loading"; diff --git a/docs-content/react/card/background-blog-card.tsx b/docs-content/react/card/background-blog-card.tsx new file mode 100644 index 000000000..df70fde73 --- /dev/null +++ b/docs-content/react/card/background-blog-card.tsx @@ -0,0 +1,44 @@ +import { + Card, + CardHeader, + CardBody, + Typography, + Avatar, +} from "@material-tailwind/react"; + +export function BackgroundBlogCard() { + return ( + + +
+ + + + How we design and code open-source projects? + + + Tania Andrew + + + + + ); +} diff --git a/docs-content/react/card/blog-card.tsx b/docs-content/react/card/blog-card.tsx new file mode 100644 index 000000000..30592cc25 --- /dev/null +++ b/docs-content/react/card/blog-card.tsx @@ -0,0 +1,59 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Avatar, + Tooltip, +} from "@material-tailwind/react"; + +export function BlogCard() { + return ( + + + ui/ux review check + + + + UI/UX Review Check + + + Because it's about motivating the doers. Because I'm here to + follow my dreams and inspire others. + + + +
+ + + + + + +
+ January 10 +
+
+ ); +} diff --git a/docs-content/react/card/booking-card.tsx b/docs-content/react/card/booking-card.tsx new file mode 100644 index 000000000..b4809e38b --- /dev/null +++ b/docs-content/react/card/booking-card.tsx @@ -0,0 +1,160 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Button, + Tooltip, + IconButton, +} from "@material-tailwind/react"; + +export function BookingCard() { + return ( + + + ui/ux review check +
+ + + + + + + +
+ + Wooden House, Florida + + + + + + 5.0 + +
+ + Enter a freshly updated and thoughtfully furnished peaceful home + surrounded by ancient trees, stone walls, and open meadows. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +20 + + +
+
+ + + + + ); +} diff --git a/docs-content/react/card/card-with-link.tsx b/docs-content/react/card/card-with-link.tsx new file mode 100644 index 000000000..31da23109 --- /dev/null +++ b/docs-content/react/card/card-with-link.tsx @@ -0,0 +1,57 @@ +import { + Card, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function CardWithLink() { + return ( + + + + + + + + UI/UX Review Check + + + Because it's about motivating the doers. Because I'm here to + follow my dreams and inspire others. + + + + + + + + + ); +} diff --git a/docs-content/react/card/card-with-list.tsx b/docs-content/react/card/card-with-list.tsx new file mode 100644 index 000000000..3b0d1a95e --- /dev/null +++ b/docs-content/react/card/card-with-list.tsx @@ -0,0 +1,85 @@ +import { Card, CardBody, Typography, Avatar } from "@material-tailwind/react"; + +const customers = [ + { + name: "Tania Andrew", + email: "tania@gmail.com", + price: 400, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-1.jpg", + }, + { + name: "John Micheal", + email: "john@gmail.com", + price: 420, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-6.jpg", + }, + { + name: "Alexa Liras", + email: "alexa@gmail.com", + price: 340, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-2.jpg", + }, + { + name: "Richard Gran", + email: "richard@gmail.com", + price: 520, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-3.jpg", + }, + { + name: "Micheal Levi", + email: "levi@gmail.com", + price: 780, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-4.jpg", + }, +]; + +export function CardWithList() { + return ( + + +
+ + Latest Customers + + + View all + +
+
+ {customers.map(({ name, email, price, image }, index) => ( +
+
+ +
+ + {name} + + + {email} + +
+
+ + ${price} + +
+ ))} +
+
+
+ ); +} diff --git a/docs-content/react/card/card.tsx b/docs-content/react/card/card.tsx new file mode 100644 index 000000000..e40df5a64 --- /dev/null +++ b/docs-content/react/card/card.tsx @@ -0,0 +1,34 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function CardDefault() { + return ( + + + card-image + + + + UI/UX Review Check + + + The place is close to Barceloneta Beach and bus stop just 2 min by + walk and near to "Naviglio" where you can enjoy the main + night life in Barcelona. + + + + + + + ); +} diff --git a/docs-content/react/card/ecommerce-card.tsx b/docs-content/react/card/ecommerce-card.tsx new file mode 100644 index 000000000..4a0c7685a --- /dev/null +++ b/docs-content/react/card/ecommerce-card.tsx @@ -0,0 +1,49 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function EcommerceCard() { + return ( + + + card-image + + +
+ + Apple AirPods + + + $95.00 + +
+ + With plenty of talk and listen time, voice-activated Siri access, and + an available wireless charging case. + +
+ + + +
+ ); +} diff --git a/docs-content/react/card/horizontal-card.tsx b/docs-content/react/card/horizontal-card.tsx new file mode 100644 index 000000000..c771a9c69 --- /dev/null +++ b/docs-content/react/card/horizontal-card.tsx @@ -0,0 +1,58 @@ +import { + Card, + CardHeader, + CardBody, + Typography, + Button, +} from "@material-tailwind/react"; + +export function HorizontalCard() { + return ( + + + card-image + + + + startups + + + Lyft launching cross-platform service this week + + + Like so many organizations these days, Autodesk is a company in + transition. It was until recently a traditional boxed software company + selling licenses. Yet its own business model disruption is only part + of the story + + + + + + + ); +} diff --git a/docs-content/react/card/index.ts b/docs-content/react/card/index.ts new file mode 100644 index 000000000..c6eaf1db1 --- /dev/null +++ b/docs-content/react/card/index.ts @@ -0,0 +1,13 @@ +export * from "./card"; +export * from "./background-blog-card"; +export * from "./blog-card"; +export * from "./booking-card"; +export * from "./card-with-link"; +export * from "./ecommerce-card"; +export * from "./horizontal-card"; +export * from "./login-card"; +export * from "./pricing-card"; +export * from "./profile-card"; +export * from "./simple-card"; +export * from "./testimonial-card"; +export * from "./card-with-list"; diff --git a/docs-content/react/card/login-card.tsx b/docs-content/react/card/login-card.tsx new file mode 100644 index 000000000..9864a35b6 --- /dev/null +++ b/docs-content/react/card/login-card.tsx @@ -0,0 +1,50 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Input, + Checkbox, + Button, +} from "@material-tailwind/react"; + +export function LoginCard() { + return ( + + + + Sign In + + + + + +
+ +
+
+ + + + Don't have an account? + + Sign up + + + +
+ ); +} diff --git a/docs-content/react/card/pricing-card.tsx b/docs-content/react/card/pricing-card.tsx new file mode 100644 index 000000000..738da812a --- /dev/null +++ b/docs-content/react/card/pricing-card.tsx @@ -0,0 +1,103 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +function CheckIcon() { + return ( + + + + ); +} + +export function PricingCard() { + return ( + + + + standard + + + $29{" "} + /mo + + + +
    +
  • + + + + 5 team members +
  • +
  • + + + + 200+ components +
  • +
  • + + + + 40+ built-in pages +
  • +
  • + + + + 1 year free updates +
  • +
  • + + + + + Life time technical support + +
  • +
+
+ + + +
+ ); +} diff --git a/docs-content/react/card/profile-card.tsx b/docs-content/react/card/profile-card.tsx new file mode 100644 index 000000000..ac33af355 --- /dev/null +++ b/docs-content/react/card/profile-card.tsx @@ -0,0 +1,64 @@ +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Tooltip, +} from "@material-tailwind/react"; + +export function ProfileCard() { + return ( + + + profile-picture + + + + Natalie Paisley + + + CEO / Co-Founder + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/docs-content/react/card/simple-card.tsx b/docs-content/react/card/simple-card.tsx new file mode 100644 index 000000000..145699676 --- /dev/null +++ b/docs-content/react/card/simple-card.tsx @@ -0,0 +1,27 @@ +import { + Card, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function SimpleCard() { + return ( + + + + UI/UX Review Check + + + The place is close to Barceloneta Beach and bus stop just 2 min by + walk and near to "Naviglio" where you can enjoy the main + night life in Barcelona. + + + + + + + ); +} diff --git a/docs-content/react/card/testimonial-card.tsx b/docs-content/react/card/testimonial-card.tsx new file mode 100644 index 000000000..8fa1594f8 --- /dev/null +++ b/docs-content/react/card/testimonial-card.tsx @@ -0,0 +1,66 @@ +import { + Card, + CardHeader, + CardBody, + Typography, + Avatar, +} from "@material-tailwind/react"; + +function StarIcon() { + return ( + + + + ); +} + +export function TestimonialCard() { + return ( + + + +
+
+ + Tania Andrew + +
+ + + + + +
+
+ Frontend Lead @ Google +
+
+ + + "I found solution to all my design needs from Creative Tim. I use + them as a freelancer in my hobby projects for fun! And its really + affordable, very humble guys !!!" + + +
+ ); +} diff --git a/docs-content/react/carousel/carousel-custom-arrows.tsx b/docs-content/react/carousel/carousel-custom-arrows.tsx new file mode 100644 index 000000000..f66cc85d2 --- /dev/null +++ b/docs-content/react/carousel/carousel-custom-arrows.tsx @@ -0,0 +1,73 @@ +import { Carousel, IconButton } from "@material-tailwind/react"; + +export function CarouselCustomArrows() { + return ( + ( + + + + + + )} + nextArrow={({ handleNext }) => ( + + + + + + )} + > + image 1 + image 2 + image 3 + + ); +} diff --git a/docs-content/react/carousel/carousel-custom-navigation.tsx b/docs-content/react/carousel/carousel-custom-navigation.tsx new file mode 100644 index 000000000..e88219e49 --- /dev/null +++ b/docs-content/react/carousel/carousel-custom-navigation.tsx @@ -0,0 +1,38 @@ +import { Carousel } from "@material-tailwind/react"; + +export function CarouselCustomNavigation() { + return ( + ( +
+ {new Array(length).fill("").map((_, i) => ( + setActiveIndex(i)} + /> + ))} +
+ )} + > + image 1 + image 2 + image 3 +
+ ); +} diff --git a/docs-content/react/carousel/carousel-transition.tsx b/docs-content/react/carousel/carousel-transition.tsx new file mode 100644 index 000000000..4868fef4e --- /dev/null +++ b/docs-content/react/carousel/carousel-transition.tsx @@ -0,0 +1,23 @@ +import { Carousel } from "@material-tailwind/react"; + +export function CarouselTransition() { + return ( + + image 1 + image 2 + image 3 + + ); +} diff --git a/docs-content/react/carousel/carousel-with-content.tsx b/docs-content/react/carousel/carousel-with-content.tsx new file mode 100644 index 000000000..43b597020 --- /dev/null +++ b/docs-content/react/carousel/carousel-with-content.tsx @@ -0,0 +1,116 @@ +import { Carousel, Typography, Button } from "@material-tailwind/react"; + +export function CarouselWithContent() { + return ( + +
+ image 1 +
+
+ + The Beauty of Nature + + + It is not so much for its beauty that the forest makes a claim + upon men's hearts, as for that subtle something, that quality + of air that emanation from old trees, that so wonderfully changes + and renews a weary spirit. + +
+ + +
+
+
+
+
+ image 2 +
+
+ + The Beauty of Nature + + + It is not so much for its beauty that the forest makes a claim + upon men's hearts, as for that subtle something, that quality + of air that emanation from old trees, that so wonderfully changes + and renews a weary spirit. + +
+ + +
+
+
+
+
+ image 3 +
+
+ + The Beauty of Nature + + + It is not so much for its beauty that the forest makes a claim + upon men's hearts, as for that subtle something, that quality + of air that emanation from old trees, that so wonderfully changes + and renews a weary spirit. + +
+ + +
+
+
+
+
+ ); +} diff --git a/docs-content/react/carousel/carousel.tsx b/docs-content/react/carousel/carousel.tsx new file mode 100644 index 000000000..a786007b0 --- /dev/null +++ b/docs-content/react/carousel/carousel.tsx @@ -0,0 +1,23 @@ +import { Carousel } from "@material-tailwind/react"; + +export function CarouselDefault() { + return ( + + image 1 + image 2 + image 3 + + ); +} diff --git a/docs-content/react/carousel/index.ts b/docs-content/react/carousel/index.ts new file mode 100644 index 000000000..09dd3f2b6 --- /dev/null +++ b/docs-content/react/carousel/index.ts @@ -0,0 +1,5 @@ +export * from "./carousel"; +export * from "./carousel-custom-arrows"; +export * from "./carousel-custom-navigation"; +export * from "./carousel-transition"; +export * from "./carousel-with-content"; diff --git a/docs-content/react/checkbox/checkbox-colors.tsx b/docs-content/react/checkbox/checkbox-colors.tsx new file mode 100644 index 000000000..1b2ffc5a1 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-colors.tsx @@ -0,0 +1,16 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxColors() { + return ( +
+ + + + + + + + +
+ ); +} diff --git a/docs-content/react/checkbox/checkbox-custom-icon.tsx b/docs-content/react/checkbox/checkbox-custom-icon.tsx new file mode 100644 index 000000000..800dcbe62 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-custom-icon.tsx @@ -0,0 +1,23 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxCustomIcon() { + return ( + + + + } + defaultChecked + /> + ); +} diff --git a/docs-content/react/checkbox/checkbox-custom-styles.tsx b/docs-content/react/checkbox/checkbox-custom-styles.tsx new file mode 100644 index 000000000..7a2027f73 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-custom-styles.tsx @@ -0,0 +1,11 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxCustomStyles() { + return ( + + ); +} diff --git a/docs-content/react/checkbox/checkbox-horizontal-list-group.tsx b/docs-content/react/checkbox/checkbox-horizontal-list-group.tsx new file mode 100644 index 000000000..f184e44ac --- /dev/null +++ b/docs-content/react/checkbox/checkbox-horizontal-list-group.tsx @@ -0,0 +1,77 @@ +import { + Checkbox, + Card, + List, + ListItem, + ListItemPrefix, + Typography, +} from "@material-tailwind/react"; + +export function CheckboxHorizontalListGroup() { + return ( + + + + + + + + + + + + + + ); +} diff --git a/docs-content/react/checkbox/checkbox-label.tsx b/docs-content/react/checkbox/checkbox-label.tsx new file mode 100644 index 000000000..cc367a21b --- /dev/null +++ b/docs-content/react/checkbox/checkbox-label.tsx @@ -0,0 +1,5 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxLabel() { + return ; +} diff --git a/docs-content/react/checkbox/checkbox-ripple-effect.tsx b/docs-content/react/checkbox/checkbox-ripple-effect.tsx new file mode 100644 index 000000000..0ce3769d7 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-ripple-effect.tsx @@ -0,0 +1,10 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxRippleEffect() { + return ( + <> + + + + ); +} diff --git a/docs-content/react/checkbox/checkbox-vertical-list-group.tsx b/docs-content/react/checkbox/checkbox-vertical-list-group.tsx new file mode 100644 index 000000000..2f1562212 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-vertical-list-group.tsx @@ -0,0 +1,77 @@ +import { + Checkbox, + Card, + List, + ListItem, + ListItemPrefix, + Typography, +} from "@material-tailwind/react"; + +export function CheckboxVerticalListGroup() { + return ( + + + + + + + + + + + + + + ); +} diff --git a/docs-content/react/checkbox/checkbox-with-description.tsx b/docs-content/react/checkbox/checkbox-with-description.tsx new file mode 100644 index 000000000..8f2a84496 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-with-description.tsx @@ -0,0 +1,21 @@ +import { Checkbox, Typography } from "@material-tailwind/react"; + +export function CheckboxWithDescription() { + return ( + + + Remember Me + + + You'll be able to login without password for 24 hours. + +
+ } + containerProps={{ + className: "-mt-5", + }} + /> + ); +} diff --git a/docs-content/react/checkbox/checkbox-with-link.tsx b/docs-content/react/checkbox/checkbox-with-link.tsx new file mode 100644 index 000000000..0e2b3e170 --- /dev/null +++ b/docs-content/react/checkbox/checkbox-with-link.tsx @@ -0,0 +1,22 @@ +import { Checkbox, Typography } from "@material-tailwind/react"; + +export function CheckboxWithLink() { + return ( + + I agree with the + +  terms and conditions + + . + + } + /> + ); +} diff --git a/docs-content/react/checkbox/checkbox.tsx b/docs-content/react/checkbox/checkbox.tsx new file mode 100644 index 000000000..f34347252 --- /dev/null +++ b/docs-content/react/checkbox/checkbox.tsx @@ -0,0 +1,5 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxDefault() { + return ; +} diff --git a/docs-content/react/checkbox/disabled-checkbox.tsx b/docs-content/react/checkbox/disabled-checkbox.tsx new file mode 100644 index 000000000..2b5056143 --- /dev/null +++ b/docs-content/react/checkbox/disabled-checkbox.tsx @@ -0,0 +1,5 @@ +import { Checkbox } from "@material-tailwind/react"; + +export function DisabledCheckbox() { + return ; +} diff --git a/docs-content/react/checkbox/index.ts b/docs-content/react/checkbox/index.ts new file mode 100644 index 000000000..ecdc43999 --- /dev/null +++ b/docs-content/react/checkbox/index.ts @@ -0,0 +1,11 @@ +export * from "./checkbox"; +export * from "./checkbox-colors"; +export * from "./checkbox-custom-icon"; +export * from "./checkbox-custom-styles"; +export * from "./checkbox-horizontal-list-group"; +export * from "./checkbox-label"; +export * from "./checkbox-ripple-effect"; +export * from "./checkbox-vertical-list-group"; +export * from "./checkbox-with-description"; +export * from "./checkbox-with-link"; +export * from "./disabled-checkbox"; diff --git a/docs-content/react/chip/chip-colors.tsx b/docs-content/react/chip/chip-colors.tsx new file mode 100644 index 000000000..0bae50d87 --- /dev/null +++ b/docs-content/react/chip/chip-colors.tsx @@ -0,0 +1,17 @@ +import { Chip } from "@material-tailwind/react"; + +export function ChipColors() { + return ( +
+ + + + + + + + + +
+ ); +} diff --git a/docs-content/react/chip/chip-custom-animation.tsx b/docs-content/react/chip/chip-custom-animation.tsx new file mode 100644 index 000000000..e44a09830 --- /dev/null +++ b/docs-content/react/chip/chip-custom-animation.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import { Chip, Button } from "@material-tailwind/react"; + +export function ChipCustomAnimation() { + const [open, setOpen] = React.useState(true); + + return ( + <> + {!open && ( + + )} + setOpen(false)} + /> + + ); +} diff --git a/docs-content/react/chip/chip-dismissible.tsx b/docs-content/react/chip/chip-dismissible.tsx new file mode 100644 index 000000000..85874a082 --- /dev/null +++ b/docs-content/react/chip/chip-dismissible.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import { Chip, Button } from "@material-tailwind/react"; + +export function ChipDismissible() { + const [open, setOpen] = React.useState(true); + + return ( + <> + {!open && ( + + )} + setOpen(false)} /> + + ); +} diff --git a/docs-content/react/chip/chip-icon.tsx b/docs-content/react/chip/chip-icon.tsx new file mode 100644 index 000000000..694691c40 --- /dev/null +++ b/docs-content/react/chip/chip-icon.tsx @@ -0,0 +1,29 @@ +import { Chip } from "@material-tailwind/react"; + +function Icon() { + return ( + + + + ); +} + +export function ChipIcon() { + return ( +
+ } /> + } /> + } /> + } /> +
+ ); +} diff --git a/docs-content/react/chip/chip-pills.tsx b/docs-content/react/chip/chip-pills.tsx new file mode 100644 index 000000000..c5c15651b --- /dev/null +++ b/docs-content/react/chip/chip-pills.tsx @@ -0,0 +1,12 @@ +import { Chip } from "@material-tailwind/react"; + +export function ChipPills() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/chip/chip-sizes.tsx b/docs-content/react/chip/chip-sizes.tsx new file mode 100644 index 000000000..ba1116302 --- /dev/null +++ b/docs-content/react/chip/chip-sizes.tsx @@ -0,0 +1,11 @@ +import { Chip } from "@material-tailwind/react"; + +export function ChipSizes() { + return ( +
+ + + +
+ ); +} diff --git a/docs-content/react/chip/chip-variants.tsx b/docs-content/react/chip/chip-variants.tsx new file mode 100644 index 000000000..6c395d0b4 --- /dev/null +++ b/docs-content/react/chip/chip-variants.tsx @@ -0,0 +1,12 @@ +import { Chip } from "@material-tailwind/react"; + +export function ChipVariants() { + return ( +
+ + + + +
+ ); +} diff --git a/docs-content/react/chip/chip-with-avatar.tsx b/docs-content/react/chip/chip-with-avatar.tsx new file mode 100644 index 000000000..4bc5935e3 --- /dev/null +++ b/docs-content/react/chip/chip-with-avatar.tsx @@ -0,0 +1,27 @@ +import { Chip, Avatar, Typography } from "@material-tailwind/react"; + +export function ChipWithAvatar() { + return ( + + } + value={ + + Tania Andrew + + } + className="rounded-full py-1.5" + /> + ); +} diff --git a/docs-content/react/chip/chip-with-checkbox.tsx b/docs-content/react/chip/chip-with-checkbox.tsx new file mode 100644 index 000000000..b22720c60 --- /dev/null +++ b/docs-content/react/chip/chip-with-checkbox.tsx @@ -0,0 +1,34 @@ +import { Chip, Checkbox } from "@material-tailwind/react"; + +export function ChipWithCheckbox() { + return ( +
+ + } + /> + + } + /> +
+ ); +} diff --git a/docs-content/react/chip/chip-with-status.tsx b/docs-content/react/chip/chip-with-status.tsx new file mode 100644 index 000000000..590b86a73 --- /dev/null +++ b/docs-content/react/chip/chip-with-status.tsx @@ -0,0 +1,26 @@ +import { Chip } from "@material-tailwind/react"; + +export function ChipWithStatus() { + return ( +
+ + } + /> + + } + /> +
+ ); +} diff --git a/docs-content/react/chip/chip.tsx b/docs-content/react/chip/chip.tsx new file mode 100644 index 000000000..3e0859d7b --- /dev/null +++ b/docs-content/react/chip/chip.tsx @@ -0,0 +1,5 @@ +import { Chip } from "@material-tailwind/react"; + +export function ChipDefault() { + return ; +} diff --git a/docs-content/react/chip/index.ts b/docs-content/react/chip/index.ts new file mode 100644 index 000000000..8fd6d0ba7 --- /dev/null +++ b/docs-content/react/chip/index.ts @@ -0,0 +1,11 @@ +export * from "./chip"; +export * from "./chip-colors"; +export * from "./chip-custom-animation"; +export * from "./chip-dismissible"; +export * from "./chip-icon"; +export * from "./chip-pills"; +export * from "./chip-sizes"; +export * from "./chip-variants"; +export * from "./chip-with-avatar"; +export * from "./chip-with-checkbox"; +export * from "./chip-with-status"; diff --git a/docs-content/react/collapse/collapse.tsx b/docs-content/react/collapse/collapse.tsx new file mode 100644 index 000000000..beee7232e --- /dev/null +++ b/docs-content/react/collapse/collapse.tsx @@ -0,0 +1,30 @@ +import React from "react"; +import { + Collapse, + Button, + Card, + Typography, + CardBody, +} from "@material-tailwind/react"; + +export function CollapseDefault() { + const [open, setOpen] = React.useState(false); + + const toggleOpen = () => setOpen((cur) => !cur); + + return ( + <> + + + + + + Use our Tailwind CSS collapse for your website. You can use if for + accordion, collapsible items and much more. + + + + + + ); +} diff --git a/docs-content/react/collapse/index.ts b/docs-content/react/collapse/index.ts new file mode 100644 index 000000000..85ececbfd --- /dev/null +++ b/docs-content/react/collapse/index.ts @@ -0,0 +1 @@ +export * from "./collapse"; diff --git a/docs-content/react/dialog/dialog-custom-animation.tsx b/docs-content/react/dialog/dialog-custom-animation.tsx new file mode 100644 index 000000000..c4e1613ae --- /dev/null +++ b/docs-content/react/dialog/dialog-custom-animation.tsx @@ -0,0 +1,51 @@ +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, +} from "@material-tailwind/react"; + +export function DialogCustomAnimation() { + const [open, setOpen] = React.useState(false); + + const handleOpen = () => setOpen(!open); + + return ( + <> + + + Its a simple dialog. + + The key to more success is to have a lot of pillows. Put it this way, + it took me twenty five years to get these plants, twenty five years of + blood sweat and tears, and I'm never giving up, I'm just + getting started. I'm up to something. Fan luv. + + + + + + + + ); +} diff --git a/docs-content/react/dialog/dialog-sizes.tsx b/docs-content/react/dialog/dialog-sizes.tsx new file mode 100644 index 000000000..bbc956646 --- /dev/null +++ b/docs-content/react/dialog/dialog-sizes.tsx @@ -0,0 +1,78 @@ +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, +} from "@material-tailwind/react"; + +export function DialogSizes() { + const [size, setSize] = React.useState(null); + + const handleOpen = (value) => setSize(value); + + return ( + <> +
+ + + +
+
+ + + +
+ + Its a simple dialog. + + The key to more success is to have a lot of pillows. Put it this way, + it took me twenty five years to get these plants, twenty five years of + blood sweat and tears, and I'm never giving up, I'm just + getting started. I'm up to something. Fan luv. + + + + + + + + ); +} diff --git a/components/docs/dialog-with-form.tsx b/docs-content/react/dialog/dialog-with-form.tsx similarity index 66% rename from components/docs/dialog-with-form.tsx rename to docs-content/react/dialog/dialog-with-form.tsx index 3a9c02083..0ecb46f00 100644 --- a/components/docs/dialog-with-form.tsx +++ b/docs-content/react/dialog/dialog-with-form.tsx @@ -11,12 +11,12 @@ import { Checkbox, } from "@material-tailwind/react"; -export default function DialogWithForm() { +export function DialogWithForm() { const [open, setOpen] = React.useState(false); const handleOpen = () => setOpen((cur) => !cur); return ( - + <> - - + + Sign In - - + + Enter your email and password to Sign In. + + + Your Email + + + Your Password + -
+
@@ -45,13 +52,13 @@ export default function DialogWithForm() { - + Don't have an account? @@ -61,6 +68,6 @@ export default function DialogWithForm() {
-
+ ); } diff --git a/components/docs/dialog-with-image.tsx b/docs-content/react/dialog/dialog-with-image.tsx similarity index 76% rename from components/docs/dialog-with-image.tsx rename to docs-content/react/dialog/dialog-with-image.tsx index a42b0c3be..6f28228c5 100644 --- a/components/docs/dialog-with-image.tsx +++ b/docs-content/react/dialog/dialog-with-image.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @next/next/no-img-element */ import React from "react"; import { Button, @@ -11,16 +10,16 @@ import { Typography, Card, } from "@material-tailwind/react"; -import { HeartIcon, ShareIcon } from "@heroicons/react/24/solid"; -export default function DialogWithImage() { +export function DialogWithImage() { const [open, setOpen] = React.useState(false); const [isFavorite, setIsFavorite] = React.useState(false); + const handleOpen = () => setOpen((cur) => !cur); const handleIsFavorite = () => setIsFavorite((cur) => !cur); return ( - + <>
@@ -46,14 +45,14 @@ export default function DialogWithImage() { color="blue-gray" className="font-medium" > - Candice Wu + Tania Andrew - @canwu + @emmaroberts
@@ -64,17 +63,24 @@ export default function DialogWithImage() { color={isFavorite ? "red" : "blue-gray"} onClick={handleIsFavorite} > - + + + - - + nature @@ -101,12 +107,12 @@ export default function DialogWithImage() { size="sm" variant="outlined" color="blue-gray" - className="flex items-center gap-3" + className="mr-5 flex items-center" > - Share + Share - + ); } diff --git a/docs-content/react/dialog/dialog.tsx b/docs-content/react/dialog/dialog.tsx new file mode 100644 index 000000000..93dd23c26 --- /dev/null +++ b/docs-content/react/dialog/dialog.tsx @@ -0,0 +1,44 @@ +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, +} from "@material-tailwind/react"; + +export function DialogDefault() { + const [open, setOpen] = React.useState(false); + + const handleOpen = () => setOpen(!open); + + return ( + <> + + + Its a simple dialog. + + The key to more success is to have a lot of pillows. Put it this way, + it took me twenty five years to get these plants, twenty five years of + blood sweat and tears, and I'm never giving up, I'm just + getting started. I'm up to something. Fan luv. + + + + + + + + ); +} diff --git a/docs-content/react/dialog/index.ts b/docs-content/react/dialog/index.ts new file mode 100644 index 000000000..042e8cfca --- /dev/null +++ b/docs-content/react/dialog/index.ts @@ -0,0 +1,9 @@ +export * from "./dialog"; +export * from "./long-dialog"; +export * from "./dialog-sizes"; +export * from "./web-3-dialog"; +export * from "./message-dialog"; +export * from "./dialog-with-form"; +export * from "./dialog-with-image"; +export * from "./notification-dialog"; +export * from "./dialog-custom-animation"; diff --git a/docs-content/react/dialog/long-dialog.tsx b/docs-content/react/dialog/long-dialog.tsx new file mode 100644 index 000000000..668cade1b --- /dev/null +++ b/docs-content/react/dialog/long-dialog.tsx @@ -0,0 +1,68 @@ +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, + Typography, +} from "@material-tailwind/react"; + +export function LongDialog() { + const [open, setOpen] = React.useState(false); + + const handleOpen = () => setOpen(!open); + + return ( + <> + + + Long Dialog + + + I've always had unwavering confidence in my abilities, and I + believe our thoughts and self-perception are the primary forces that + shape us. Many people limit themselves by their own self-doubt, + slowing their progress. Fortunately, I was raised with the belief + that I could achieve anything. +
+
+ As we journey through life, we often encounter challenges that + harden our hearts. Pain, insults, broken trust, and betrayal can + make us hesitant to help others. Love can lead to heartbreak, and + time can distance us from family. These experiences can gradually + erode our optimism. +

+ Life doesn't always place us where we want to be. We grow, make + mistakes, and strive to express ourselves and fulfill our dreams. If + we're fortunate enough to participate in life's journey, + we should cherish every moment. Regrettably, some only recognize the + value of a moment after it's passed. +

+ One thing I've learned is that I can excel at anything I set my + mind to. My skill is my ability to learn. I'm here to learn, to + grow, and to inspire others to do the same. Don't fear making + mistakes; they teach us far more than compliments ever will. + Ultimately, what truly matters is how our actions inspire and + motivate others. Some will be ignited by our endeavors, while others + may be offended—it's all part of the process. I'm here to + pursue my dreams and encourage others to do the same. +

+ Now is the time to embrace greatness without fear of judgment. Some + may resent those who shine brightly or stand out, but it's time + to be the best version of ourselves. Do you have faith in your + beliefs, even if you're the only one who does? +
+
+ + + + +
+ + ); +} diff --git a/docs-content/react/dialog/message-dialog.tsx b/docs-content/react/dialog/message-dialog.tsx new file mode 100644 index 000000000..84b6d3120 --- /dev/null +++ b/docs-content/react/dialog/message-dialog.tsx @@ -0,0 +1,66 @@ +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, + Input, + Textarea, + Typography, +} from "@material-tailwind/react"; + +export function MessageDialog() { + const [open, setOpen] = React.useState(false); + + const handleOpen = () => setOpen(!open); + + return ( + <> + + +
+ + {" "} + + New message to @{" "} + + + + + +
+ + + Write the message and then click button. + +
+ + Username + + + - -
- - } + component={} > - ```html +```html
-
- - -
+
+ +
- ``` +
+``` --- ## Textarea Variants +Using Material Tailwind’s component, you can implement different variants of textareas. + -
- - -
-
- - -
-
- - -
- - } + component={} > - ```html -
-
- - -
-
- - -
-
- - -
+```html +
+
+ + +
+
+ +
- ``` +
+ + +
+
+``` +
+This coded example showcases three types of textareas: + +• Static textarea with placeholder, border-bottom, and label.
+• Standard textarea with placeholder text with a single space character and border-bottom.
+• Outlined textarea with complete border, rounded corners, placeholder text, and label. + +The labels use various CSS classes and transitions to provide a smooth visual effect when the textareas are focused. + --- ## Textarea Sizes +Check this coded example to see how you can implement textarea components for different text input sizes. + -
- - -
-
- - -
-
- } + component={} > - ```html -
-
- - -
-
- - -
+```html +
+
+ + +
+
+ +
- ``` +
+``` --- ## Textarea Colors +Our component comes with various color styling options. The examples below include four textarea components, each with a different color scheme and associated label. + +• To change the border color, use the focus:border-\{color\} class.
+• To change the text color, use the focus:text-\{color\} class. + + + -
- - -
-
- - -
-
- - -
-
- - -
-
- } + component={} > - ```html -
-
- - -
-
- - -
-
- - -
-
- - -
+```html +
+
+ + +
+
+ + +
+
+ + +
+
+ +
- ``` +
+``` --- ## Textarea Validations +Use this textareas with error and success themes, contrasting border colors (red for error and green for success), and matching text colors. + -
- - -
-
- - -
-
- } + component={} > - ```html -
-
- - -
-
- - -
+```html +
+
+ + +
+
+ +
- ``` +
+``` --- ## Disabled Textarea +Use this example if you want to display information to users without allowing them to make changes to the content. + -
- - -
-
- } + component={} > - ```html -
-
- - +```html +
+
+ + +
+
+``` + + +
+ +It is usually used for read-only purposes or for displaying content that should not be modified by users. The use of a different border color and disabled state makes it visually clear that the textarea is not editable. + +--- + + +## Comment Box Textarea + +Use this component that contains a textarea with submitting and canceling button controls for your blog or application if you want to let users leave comments. + +} +> +```html +
+
+ + +
+
+ +
+ +
- ``` +
+``` +
+ +
+This comment box maintains a consistent blue-gray color scheme throughout and uses transitions to enhance the user experience during interactions. + +--- + +## Twitter Chatbox Textarea + +This code snippet represents a stylish and functional textarea component with accompanying buttons, designed for a modern web interface +using Tailwind CSS. + +The component is flexible and responsive, with attention to details like hover states and focus effects. + +} +> +```html +
+
+ + +
+
+ + +
+
+ +
+
+```
+ + +--- + + +### Textarea Best Practices For Developers + +• Make sure that textareas are accessible to all users (including those with disabilities), using appropriate HTML attributes like aria-label and aria-describedby to provide meaningful labels and descriptions for screen readers.
+• Use descriptive and clear placeholder text to provide hints of the expected input.
+• Implement client-side validation for user input in textareas. Validate input for length, format, and any specific requirements. + + diff --git a/documentation/html/theming.mdx b/documentation/html/theming.mdx index 1596f2a45..f4fbb074c 100644 --- a/documentation/html/theming.mdx +++ b/documentation/html/theming.mdx @@ -14,7 +14,7 @@ Customize @material-tailwind/html with your own theme. You can change the base s like the colors, typography, box-shadows and breakpoints as well as the components style. -@material-tailwind/html is customizable using the tailwind.config.js and you can set your own theme and styles through the Tailwind CSS configurations for all of the components. +@material-tailwind/html is customizable using the tailwind.config.js and you can set your own theme and styles through the Tailwind CSS configurations for all of the components. --- @@ -22,11 +22,11 @@ style. -Each component has a class attribute that you can use to add tailwindcss classnames or your own custom classnames. +Each component has a class attribute that you can use to add tailwindcss classnames or your own custom classnames. -The class attribute overrides the tailwindcss classnames for a component and sometimes you need to use the ! modifier before the tailwindcss classnames to override the classnames for a component. +The class attribute overrides the tailwindcss classnames for a component and sometimes you need to use the ! modifier before the tailwindcss classnames to override the classnames for a component. -e.g. !text-blue-500 +e.g. !text-blue-500 ```html -
- {`Material Tailwind`} -
- - } + component={} > - ```html - -
+
Material Tailwind
- ``` +``` --- ## Tooltip Placement -You can change the position of the tooltip relative to it's trigger element by adding the data-tooltip-placement="`{top}`" data attribute to the tooltip element by default it set's to top.
Check the placement values for tooltip here. +You can change the position of the tooltip relative to it's trigger element by adding the data-tooltip-placement="`{top}`" data attribute to the tooltip element by default it set's to top.
Check the placement values for tooltip here. -
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
-
-
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
-
-
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
-
-
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
- -
- {`Material Tailwind`} -
-
- - } + component={} > - ```html -
- -
+
Material Tailwind
- -
+
Material Tailwind
- -
+
Material Tailwind
-
- -
+
Material Tailwind
- -
+
Material Tailwind
- -
+
Material Tailwind
-
- -
+
Material Tailwind
- -
+
Material Tailwind
- -
+
Material Tailwind
-
- -
+
Material Tailwind
- -
+
Material Tailwind
- -
+
Material Tailwind
- ``` +``` --- ## Custom Tooltip Animation -You can modify the open/close state animation for tooltip by adding the data-tooltip-mount="`{opacity-100}`", data-tooltip-unmount="`{opacity-0}`" and data-tooltip-transition="`{transition-opacity}`" data attributes to the tooltip element. You can pass tailwind css classnames for those data attributes for animation the tooltip.
Check more about animation data attributes for tooltip here. +You can modify the open/close state animation for tooltip by adding the data-tooltip-mount="`{opacity-100}`", data-tooltip-unmount="`{opacity-0}`" and data-tooltip-transition="`{transition-opacity}`" data attributes to the tooltip element. You can pass tailwind css classnames for those data attributes for animation the tooltip.
Check more about animation data attributes for tooltip here. - -
- {`Material Tailwind`} -
- - } + component={} > - ```html - -
+ class="absolute z-50 whitespace-normal break-words rounded-lg bg-black py-1.5 px-3 font-sans text-sm font-normal text-white focus:outline-none"> Material Tailwind
- ``` +```
--- @@ -507,14 +214,14 @@ The following data attributes are available for tooltip element. | ------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | `data-tooltip` | Set the name of the tooltip and reference it to the
tooltip trigger element. | | | `data-tooltip-offset` | Set the offset between the tooltip and the tooltip trigger element. | 5 | -| `data-tooltip-placement` | Set the position of the tooltip relative to it's trigger element. | top | -| `data-tooltip-mount` | Set the classnaes that should be used when the
tooltip is visible. | opacity-1 | -| `data-tooltip-unmount` | Set the classnaes that should be used when the
tooltip is hidden. | opacity-0
pointer-events-none | -| `data-tooltip-transition` | Set the classnaes that should be used for
transition of the tooltip. | transition-opacity
duration-300 | +| `data-tooltip-placement` | Set the position of the tooltip relative to it's trigger element. | top | +| `data-tooltip-mount` | Set the classnaes that should be used when the
tooltip is visible. | opacity-1 | +| `data-tooltip-unmount` | Set the classnaes that should be used when the
tooltip is hidden. | opacity-0
pointer-events-none | +| `data-tooltip-transition` | Set the classnaes that should be used for
transition of the tooltip. | transition-opacity
duration-300 | --- -## Required Scrips +## Required Scripts diff --git a/documentation/html/typography.mdx b/documentation/html/typography.mdx index e72df08db..1a69f89c7 100644 --- a/documentation/html/typography.mdx +++ b/documentation/html/typography.mdx @@ -3,6 +3,7 @@ title: Tailwind CSS Typography - Material Tailwind description: Customise your web projects with our easy-to-use Typography component for Tailwind CSS using Material Design guidelines. navigation: [ + "default-paragraph", "headings", "lead-text", "paragraph", @@ -17,205 +18,183 @@ next: footer # Tailwind CSS Typography -Customise your web projects with our amazing Tailwind CSS headings! +Create website or app projects easier with our amazing typography component! -The headings are titles or subtitles that you want to display on a webpage. They communicate the organization of the content and guide the users on the page. +Our typography component includes elements like headings, paragraphs, text, and colors that you want to display on a webpage. They communicate the organization of the content and guide the users on the page. -Below we are presenting 6 levels of headings that you can use in your Tailwind CSS project. The examples come in different colors so you can adapt them easily to your needs. +Check out below our examples of typography elements styled with Tailwind CSS.
+## Typography Examples: + + +## Default Paragraph + +Use this simple paragraph example for any type of web page. + +} +> +```html +

+ Material Tailwind is an easy to use components library for Tailwind CSS + and Material Design. It provides a simple way to customize your + components, you can change the colors, fonts, breakpoints and everything + you need. +

+``` +
+ +--- + ## Headings +Organize and structure text to improve readability and accessibility with Material Tailwind's headings. + -

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-
- Material Tailwind -
-
- Material Tailwind -
-
- } + component={} > - ```html -
-

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-
- Material Tailwind -
-
- Material Tailwind -
-
- ``` +```html +
+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+
+ Material Tailwind +
+
+ Material Tailwind +
+ +
+``` --- ## Lead Text +Highlight the key message or value proposition of a page or section with our lead text example. + - Material Tailwind is an easy to use components library for Tailwind CSS - and Material Design. It provides a simple way to customize your - components, you can change the colors, fonts, breakpoints and everything - you need. -

- } + component={} > - ```html -

+```html +

Material Tailwind is an easy to use components library for Tailwind CSS and Material Design. It provides a simple way to customize your components, you can change the colors, fonts, breakpoints and everything you need.

- ``` +```
--- ## Paragraph +See below how you can implement a paragraph with Material Tailwind. + - Material Tailwind is an easy to use components library for Tailwind CSS - and Material Design. It provides a simple way to customize your - components, you can change the colors, fonts, breakpoints and everything - you need. -

- } + component={} > - ```html -

+```html +

Material Tailwind is an easy to use components library for Tailwind CSS and Material Design. It provides a simple way to customize your components, you can change the colors, fonts, breakpoints and everything you need.

- ``` +```
--- ## Small Text +Use this example of small text for disclaimers, footnotes, labels, and as secondary information. + - Material Tailwind is an easy to use components library for Tailwind CSS - and Material Design. It provides a simple way to customize your - components, you can change the colors, fonts, breakpoints and everything - you need. -

- } + component={} > - ```html -

+```html +

Material Tailwind is an easy to use components library for Tailwind CSS and Material Design. It provides a simple way to customize your components, you can change the colors, fonts, breakpoints and everything you need.

- ``` +```
--- ## Typography Colors +Implement different colors for your typography depending on the message you want to transmit. + -

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-
- } + component={} > - ```html -
-

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-

- Material Tailwind -

-
- ``` +```html +
+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+

+ Material Tailwind +

+
+``` --- ## Typography Gradient Color +You can implement gradient colors for your typography. See below how you can do this with Material Tailwind. + + component={} +> +```html +

Material Tailwind

- } -> - ```html -

- Material Tailwind -

- ``` +```
diff --git a/documentation/html/video.mdx b/documentation/html/video.mdx new file mode 100644 index 000000000..07eafc56e --- /dev/null +++ b/documentation/html/video.mdx @@ -0,0 +1,83 @@ +--- +title: Tailwind CSS Video - Material Tailwind +description: Build your web projects faster with our easy-to-use video player examples for Tailwind CSS and HTML using Material Design guidelines. +navigation: + [ + "video", + "autoplay-video", + "muted-video", + ] +github: video +prev: img +next: sidebar +--- + + +# Tailwind CSS Video + + +Use our Tailwind CSS video examples to add video player to your web project. This component displays media content (video) on your website. + +Our component encapsulates all the functionalities needed to play videos, including but not limited to playback controls (like play/pause, volume control, fullscreen toggle), loading of video sources, display of video metadata (such as duration and current time). + +Check out below our component examples. + +
+ +## Video Examples: + +## Simple Video Player + +Add videos to your website using our component that comes with rounded corners and playback controls. + +}> +```html + +``` + + +--- + + +## Autoplay Video + + +This example includes the autoPlay attribute on the \ tag making the video start playing automatically as soon as it is loaded, without requiring the user to initiate playback manually. + +}> +```html + +``` + + +--- + + +## Muted Video + + +By adding muted to the \
-}> +}> ```jsx import { Alert } from "@material-tailwind/react"; -export default function Variants() { +export function AlertVariants() { return ( -
- A simple filled alert for showing message. +
+ A simple filled alert for showing message. - A simple gradient alert for showing message. + A simple gradient alert for showing message. + + + A simple outlined alert for showing message. + + + A simple ghost alert for showing message.
); @@ -84,22 +81,17 @@ export default function Variants() { --- + ## Alert Colors + The Alert component comes with 19 different colors that you can change it using the color prop. - - An info alert for showing message. - An error alert for showing message. - A success alert for showing message. - A warning alert for showing message. -
-}> +}> ```jsx import { Alert } from "@material-tailwind/react"; -export default function Colors() { +export function AlertColors() { return (
An info alert for showing message. @@ -114,57 +106,38 @@ export default function Colors() { --- -## Alert with Icon + +## Alert Icon + You can add an icon at the beginning of Alert component using the icon prop. - - - - } - > - {`A simple alert with icon for showing message.`} - -}> +}> ```jsx import { Alert } from "@material-tailwind/react"; -export default function Example() { +function Icon() { return ( - - - - } + - A simple alert with icon for showing message. - + + + ); +} + +export function AlertIcon() { + return ( + }>A simple alert with icon for showing message ); } ``` @@ -172,299 +145,284 @@ export default function Example() { --- + +## Alert with List + + +You can add any element you want for the Alert component, below is a example of alert with a list inside. + +}> +```jsx +import { Alert, Typography } from "@material-tailwind/react"; + +function IconOutlined() { + return ( + + + + ); +} + +function IconSolid() { + return ( + + + + ); +} + +export function AlertWithList() { + return ( +
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+ }> + + Ensure that these requirements are met: + +
    +
  • At least 10 characters (and up to 100 characters)
  • +
  • At least one lowercase character
  • +
  • Inclusion of at least one special character, e.g., ! @ # ?
  • +
+
+
+ ); +} +``` +
+ +--- + + ## Alert Dismissible + -The Alert component is a dismissible component that you can control it using the dismissible and show props. - - - - {({ setState, show }) => ( - <> - {!show && ( - - )} - setState((s) => ({ show: false })), - }} - > - A dismissible alert for showing message. - - - )} - - -}> +The Alert component is a dismissible component that you can control it using the onClose and open props. + +}> ```jsx -import { useState, Fragment } from "react"; +import React from "react"; import { Alert, Button } from "@material-tailwind/react"; -export default function Colors() { - const [show, setShow] = useState(true); - -return ( +export function AlertDismissible() { + const [open, setOpen] = React.useState(true); - - {!show && ( - - )} - setShow(false), - }} - > - A dismissible alert for showing message. - - -); } - -```` + return ( + <> + {!open && ( + + )} + setOpen(false)}> + A dismissible alert for showing message. + + + ); +} +``` --- -## Custom Alert Animation + +## Alert Custom Animation + You can modify the open/close state animation for Alert component using the animate prop. - - - {({ setState, show }) => ( - <> - {!show && ( - - )} - setState((s) => ({ show: false })), - }} - > - A dismissible alert with custom animation. - - - )} - - -}> +}> ```jsx -import { useState, Fragment } from "react"; +import React from "react"; import { Alert, Button } from "@material-tailwind/react"; -export default function Colors() { - const [show, setShow] = useState(true); +export function AlertCustomAnimation() { + const [open, setOpen] = React.useState(true); return ( - - {!show && ( - )} setOpen(false)} animate={{ mount: { y: 0 }, unmount: { y: 100 }, }} - dismissible={{ - onClose: () => setShow(false), - }} > A dismissible alert with custom animation. - + ); } -```` - +``` --- -## Custom Alert Close Icon + +## Alert Custom Close Icon + You can modify the close icon for Alert component using the dismissible prop. - - - {({ setState, show }) => ( - <> - {!show && ( - - )} - } - dismissible={{ - onClose: () => setState((s) => ({ show: false })), - action: ( - - ), - }} - > - Sorry, something went wrong please try again. - - - )} - - -}> +}> ```jsx import React from "react"; import { Alert, Button } from "@material-tailwind/react"; -import { ExclamationTriangleIcon } from "@heroicons/react/24/solid"; - -export default function Example() { - const [show, setShow] = React.useState(true); - -return ( - - - {!show && ( - - )} - } - dismissible={{ - onClose: () => setShow(false), - action: ( - - ), - }} - > - Sorry, something went wrong please try again. - - -); } - -```` + )} + } + action={ + + } + > + Sorry, something went wrong please try again. + + + ); +} +``` --- + ## Alert with Content + Use the example below to use Alert component with more content like title and description. - - - {({ setState, show }) => ( - <> - {!show && ( - - )} - } - dismissible={{ - onClose: () => setState((s) => ({ show: false })), - }} - > - - Success - - - I don't know what that word means. I'm happy. But success, - that goes back to what in somebody's eyes success means. For me, - success is inner peace. That's a good day for me. - - - - )} - - -}> +}> ```jsx import React from "react"; import { Alert, Button, Typography } from "@material-tailwind/react"; -import { CheckCircleIcon } from "@heroicons/react/24/solid"; -export default function Example() { - const [show, setShow] = React.useState(true); +function Icon() { + return ( + + + + ); +} + +export function AlertWithContent() { + const [open, setOpen] = React.useState(true); return ( - - {!show && ( + <> + {!open && ( )} } - dismissible={{ - onClose: () => setShow(false), - }} + icon={} + onClose={() => setOpen(false)} > Success @@ -475,12 +433,581 @@ export default function Example() { success is inner peace. That's a good day for me. - + ); } -```` +``` + + +--- + + +## Alert Custom Styles + + +You can use the className prop to add custom styles to the Alert component. +}> +```jsx +import { Alert } from "@material-tailwind/react"; + +function Icon() { + return ( + + + + ); +} + +export function AlertCustomStyles() { + return ( + } + className="rounded-none border-l-4 border-[#2ec946] bg-[#2ec946]/10 font-medium text-[#2ec946]" + > + A simple alert for showing message. + + ); +} +``` - - +--- + + +## Alert Props + + +The following props are available for button component. These are the custom props +that we've added for the alert component and you can use all the other native props +as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | --------------------------------------------- | -------------------------------------- | +| `variant` | [Variant](#types-variant) | Change alert variant | filled | +| `color` | [Color](#types-color) | Change alert color | gray | +| `onClose` | func | Callback for closing the alert component | undefined | +| `action` | node | Change the onClose action button | undefined | +| `animate` | [Animate](#types-animate) | Change alert animation | undefined | +| `open` | boolean | Change alert visibility | true | +| `icon` | node | Add icon at the beginning of alert | undefined | +| `className` | string | Add custom className for alert | `''` | +| `children` | node | Add content for alert | No default value it's a required prop. | + +
+
+ +### For TypeScript Only + +```tsx +import type { AlertProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Variant + + +```ts +type variant = "filled" | "gradient" | "outlined" | "ghost"; +``` + +--- + + +## Types - Color + + +```ts +type color = + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Types - Animate + + +```ts +type animate = { + mount?: object; + unmount?: object; +}; +``` + +--- + + +## Alert Theme + + +Learn how to customize the theme and styles for alert component, the theme object for alert component has three main objects: + +**A.** The defaultProps object for setting up the default value for props of alert component.
+**B.** The valid object for customizing the valid values for alert component props.
+**C.** The styles object for customizing the theme and styles of alert component.
+ +You can customize the theme and styles of alert component by adding Tailwind CSS classes as key paired values for objects. + +
+
+ + +## Alert Theme Object Type + + +```ts +interface AlertStylesType { + defaultProps: { + variant: string; + color: string; + icon: node; + open: boolean; + action: node; + onClose: func; + animate: { + mount: object; + unmount: object; + }; + className: string; + }; + valid: { + variants: string[]; + colors: string[]; + }; + styles: { + base: { + alert: object; + action: object; + }; + variants: { + filled: object; + gradient: object; + outlined: object; + ghost: object; + }; + }; +} +``` + +
+
+ +### For TypeScript Only + +```tsx +import { AlertStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Alert Theme Customization + + +```ts +const theme = { + alert: { + defaultProps: { + variant: "filled", + color: "blue", + icon: undefined, + open: true, + action: undefined, + onClose: undefined, + animate: { + unmount: {}, + mount: {}, + }, + className: "", + }, + valid: { + variants: ["filled", "gradient", "outlined", "ghost"], + colors: [ + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + alert: { + position: "relative", + display: "block", + width: "w-full", + fontFamily: "font-sans", + fontSize: "text-base", + fontWeight: "font-regular", + px: "px-4", + py: "py-4", + borderRadius: "rounded-lg", + }, + action: { + position: "!absolute", + top: "top-3", + right: "right-3", + }, + }, + variants: { + filled: { + "blue-gray": { + backgroud: "bg-blue-gray-500", + color: "text-white", + }, + gray: { + backgroud: "bg-gray-500", + color: "text-white", + }, + brown: { + backgroud: "bg-brown-500", + color: "text-white", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500", + color: "text-white", + }, + orange: { + backgroud: "bg-orange-500", + color: "text-white", + }, + amber: { + backgroud: "bg-amber-500", + color: "text-black", + }, + yellow: { + backgroud: "bg-yellow-500", + color: "text-black", + }, + lime: { + backgroud: "bg-lime-500", + color: "text-black", + }, + "light-green": { + backgroud: "bg-light-green-500", + color: "text-white", + }, + green: { + backgroud: "bg-green-500", + color: "text-white", + }, + teal: { + backgroud: "bg-teal-500", + color: "text-white", + }, + cyan: { + backgroud: "bg-cyan-500", + color: "text-white", + }, + "light-blue": { + backgroud: "bg-light-blue-500", + color: "text-white", + }, + blue: { + backgroud: "bg-blue-500", + color: "text-white", + }, + indigo: { + backgroud: "bg-indigo-500", + color: "text-white", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500", + color: "text-white", + }, + purple: { + backgroud: "bg-purple-500", + color: "text-white", + }, + pink: { + backgroud: "bg-pink-500", + color: "text-white", + }, + red: { + backgroud: "bg-red-500", + color: "text-white", + }, + }, + gradient: { + "blue-gray": { + backgroud: "bg-gradient-to-tr from-blue-gray-600 to-blue-gray-400", + color: "text-white", + }, + gray: { + backgroud: "bg-gradient-to-tr from-gray-600 to-gray-400", + color: "text-white", + }, + brown: { + backgroud: "bg-gradient-to-tr from-brown-600 to-brown-400", + color: "text-white", + }, + "deep-orange": { + backgroud: "bg-gradient-to-tr from-deep-orange-600 to-deep-orange-400", + color: "text-white", + }, + orange: { + backgroud: "bg-gradient-to-tr from-orange-600 to-orange-400", + color: "text-white", + }, + amber: { + backgroud: "bg-gradient-to-tr from-amber-600 to-amber-400", + color: "text-black", + }, + yellow: { + backgroud: "bg-gradient-to-tr from-yellow-600 to-yellow-400", + color: "text-black", + }, + lime: { + backgroud: "bg-gradient-to-tr from-lime-600 to-lime-400", + color: "text-black", + }, + "light-green": { + backgroud: "bg-gradient-to-tr from-light-green-600 to-light-green-400", + color: "text-white", + }, + green: { + backgroud: "bg-gradient-to-tr from-green-600 to-green-400", + color: "text-white", + }, + teal: { + backgroud: "bg-gradient-to-tr from-teal-600 to-teal-400", + color: "text-white", + }, + cyan: { + backgroud: "bg-gradient-to-tr from-cyan-600 to-cyan-400", + color: "text-white", + }, + "light-blue": { + backgroud: "bg-gradient-to-tr from-light-blue-600 to-light-blue-400", + color: "text-white", + }, + blue: { + backgroud: "bg-gradient-to-tr from-blue-600 to-blue-400", + color: "text-white", + }, + indigo: { + backgroud: "bg-gradient-to-tr from-indigo-600 to-indigo-400", + color: "text-white", + }, + "deep-purple": { + backgroud: "bg-gradient-to-tr from-deep-purple-600 to-deep-purple-400", + color: "text-white", + }, + purple: { + backgroud: "bg-gradient-to-tr from-purple-600 to-purple-400", + color: "text-white", + }, + pink: { + backgroud: "bg-gradient-to-tr from-pink-600 to-pink-400", + color: "text-white", + }, + red: { + backgroud: "bg-gradient-to-tr from-red-600 to-red-400", + color: "text-white", + }, + }, + outlined: { + "blue-gray": { + border: "border border-blue-gray-500", + color: "text-blue-gray-700", + }, + gray: { + border: "border border-gray-500", + color: "text-gray-700", + }, + brown: { + border: "border border-brown-500", + color: "text-brown-700", + }, + "deep-orange": { + border: "border border-deep-orange-500", + color: "text-deep-orange-700", + }, + orange: { + border: "border border-orange-500", + color: "text-orange-700", + }, + amber: { + border: "border border-amber-500", + color: "text-amber-700", + }, + yellow: { + border: "border border-yellow-500", + color: "text-yellow-700", + }, + lime: { + border: "border border-lime-500", + color: "text-lime-700", + }, + "light-green": { + border: "border border-light-green-500", + color: "text-light-green-700", + }, + green: { + border: "border border-green-500", + color: "text-green-700", + }, + teal: { + border: "border border-teal-500", + color: "text-teal-700", + }, + cyan: { + border: "border border-cyan-500", + color: "text-cyan-700", + }, + "light-blue": { + border: "border border-light-blue-500", + color: "text-light-blue-700", + }, + blue: { + border: "border border-blue-500", + color: "text-blue-700", + }, + indigo: { + border: "border border-indigo-500", + color: "text-indigo-700", + }, + "deep-purple": { + border: "border border-deep-purple-500", + color: "text-deep-purple-700", + }, + purple: { + border: "border border-purple-500", + color: "text-purple-700", + }, + pink: { + border: "border border-pink-500", + color: "text-pink-700", + }, + red: { + border: "border border-red-500", + color: "text-red-700", + }, + }, + ghost: { + "blue-gray": { + backgroud: "bg-blue-gray-500/20", + color: "text-blue-gray-900", + }, + gray: { + backgroud: "bg-gray-500/20", + color: "text-gray-900", + }, + brown: { + backgroud: "bg-brown-500/20", + color: "text-brown-900", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500/20", + color: "text-deep-orange-900", + }, + orange: { + backgroud: "bg-orange-500/20", + color: "text-orange-900", + }, + amber: { + backgroud: "bg-amber-500/20", + color: "text-amber-900", + }, + yellow: { + backgroud: "bg-yellow-500/20", + color: "text-yellow-900", + }, + lime: { + backgroud: "bg-lime-500/20", + color: "text-lime-900", + }, + "light-green": { + backgroud: "bg-light-green-500/20", + color: "text-light-green-900", + }, + green: { + backgroud: "bg-green-500/20", + color: "text-green-900", + }, + teal: { + backgroud: "bg-teal-500/20", + color: "text-teal-900", + }, + cyan: { + backgroud: "bg-cyan-500/20", + color: "text-cyan-900", + }, + "light-blue": { + backgroud: "bg-light-blue-500/20", + color: "text-light-blue-900", + }, + blue: { + backgroud: "bg-blue-500/20", + color: "text-blue-900", + }, + indigo: { + backgroud: "bg-indigo-500/20", + color: "text-indigo-900", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500/20", + color: "text-deep-purple-900", + }, + purple: { + backgroud: "bg-purple-500/20", + color: "text-purple-900", + }, + pink: { + backgroud: "bg-pink-500/20", + color: "text-pink-900", + }, + red: { + backgroud: "bg-red-500/20", + color: "text-red-900", + }, + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/avatar.mdx b/documentation/react/avatar.mdx index 2ba2a3588..75ea36504 100644 --- a/documentation/react/avatar.mdx +++ b/documentation/react/avatar.mdx @@ -1,112 +1,228 @@ --- title: Tailwind CSS Avatar for React - Material Tailwind description: Customise your web projects with our easy-to-use avatar component for Tailwind CSS and React using Material Design guidelines. -navigation: ["avatar", "avatar-variants", "avatar-sizes", "avatar-stack", "props", "theme"] -related: +navigation: [ - { - title: "Props", - route: "props/avatar", - description: "Learn more about props definition and types of avatar component.", - }, - { - title: "Theme", - route: "theme/avatar", - description: "Learn how to customize the theme and styles for avatar component.", - }, + "avatar", + "avatar-variants", + "avatar-sizes", + "avatar-with-border", + "avatar-with-text", + "avatar-stack", + "avatar-with-dot-indicator", + avatar-with-user-dropdown, + "avatar-custom-styles", + "avatar-props", + "types-variant", + "types-size", + "types-color", + "avatar-theme", + "avatar-theme-object-type", + "avatar-theme-customization" ] github: avatar prev: alert -next: breadcrumbs +next: badge --- + # Tailwind CSS Avatar - React + + +Our React Avatar component is used to represent people or objects in your web projects. The avatar component usually displays a profile picture or a placeholder graphic if no image is available. Commonly places for avatars include: user profiles, comment sections, user lists, and anywhere else where a visual representation of a user is needed. -Use our Tailwind CSS Avatar component to portray people or objects in your web projects. The Avatar can be used as a visual identifier for a user profile on your website. -See below our beautiful Avatar example that you can use in your Tailwind CSS and React project. The example also comes in different styles and colors so you can adapt it easily to your needs. +To jumpstart your development process, we offer a range of pre-designed Avatar examples that are ready to be integrated into your project. All our examples are based on React and styled with Tailwind CSS.
-}> +## Avatar Examples + + +## Default Avatar + + +Get started with this simple avatar example that comes with a pre-set image, ensuring that your avatars look great from the start. You can easily replace the default src with any image URL to display user-specific avatars. + +}> ```jsx import { Avatar } from "@material-tailwind/react"; -export default function Example() { - return ; +export function AvatarDefault() { + return ; } ``` +
+ +Also, use the alt tag, set as "avatar", to make sure that the component is accessible. This feature is essential for screen readers, search engine optimization, and aligns with web accessibility standards + --- + ## Avatar Variants + -The Avatar component comes with 2 different variants that you can change it using the variant prop. +The Avatar component comes with 3 different variants that you can change using the variant prop. - - - -
-}> +}> ```jsx import { Avatar } from "@material-tailwind/react"; -export default function Variants() { +export function AvatarVariants() { return (
- - + + +
); } ```
+
+As showcased in the example above, here are the avatar component variants: + +ִ• default (circular) variant - perfect for social media platforms, forums, and chat applications.
+• rounded variant - can be used in business applications, professional networks, or team collaboration tools.
+• square variant - ideal for corporate environments, document management systems, or platforms where a more serious tone is preferred.
+ --- + ## Avatar Sizes + + +The Avatar component comes with 6 different sizes that you can change it using the size prop: extra-small (xs), small (sm), medium (md), large (lg), extra-large (xl), and double extra-large (XXL). -The Avatar component comes with 6 different sizes that you can change it using the size prop. - - - - - - - - -
-}> +}> ```jsx import { Avatar } from "@material-tailwind/react"; -export default function Sizes() { +export function AvatarSizes() { return (
- - - - - - + + + + + +
); } ```
+
+This range provides great flexibility, allowing the avatars to fit perfectly in diverse contexts. + --- + +## Avatar with border + + +Add an extra layer of visual appeal to your avatar with this example. You can add a border around the avatar using the withBorder prop. To change the color of the avatar border use the color prop, by default it's gray. + +}> +```jsx +import { Avatar } from "@material-tailwind/react"; + +export function AvatarWithBorder() { + return ( +
+ + + +
+ ); +} +``` +
+ +--- + + +## Avatar with Text + + +You can use avatar with other components as well, see the example below. This component showcases a combination of avatars and typography elements to create a complete user profile presentation. + +}> +```jsx +import { Avatar, Typography } from "@material-tailwind/react"; + +export function AvatarWithText() { + return ( +
+
+ +
+ Tania Andrew + + Web Developer + +
+
+
+ +
+ Tania Andrew + + Web Developer + +
+
+
+ +
+ Tania Andrew + + Web Developer + +
+
+
+ ); +} +``` +
+ +--- + + ## Avatar Stack + -}> +Use this example of overlapped avatars to represent a group of users in a friendly and compact way. For example, showing multiple people involved in a team. + +}> ```jsx import { Avatar } from "@material-tailwind/react"; -export default function Example() { +export function AvatarStack() { return (
- - +--- + + +## Avatar with Dot Indicator + + +}> +```jsx +import { Avatar, Badge } from "@material-tailwind/react"; + +export function AvatarWithDotIndicator() { + return ( +
+ + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Avatar with User dropdown + + +}> +```jsx +import React from "react"; +import { + Avatar, + Button, + Menu, + MenuHandler, + MenuItem, + MenuList, + Typography, +} from "@material-tailwind/react"; +import { + Cog6ToothIcon, + InboxArrowDownIcon, + LifebuoyIcon, + PowerIcon, + UserCircleIcon, +} from "@heroicons/react/24/solid"; + +// profile menu component +const profileMenuItems = [ + { + label: "My Profile", + icon: UserCircleIcon, + }, + { + label: "Edit Profile", + icon: Cog6ToothIcon, + }, + { + label: "Inbox", + icon: InboxArrowDownIcon, + }, + { + label: "Help", + icon: LifebuoyIcon, + }, + { + label: "Sign Out", + icon: PowerIcon, + }, +]; + +export function AvatarWithUserDropdown() { + const [isMenuOpen, setIsMenuOpen] = React.useState(false); + + const closeMenu = () => setIsMenuOpen(false); + + return ( + + + + + + {profileMenuItems.map(({ label, icon }, key) => { + const isLastItem = key === profileMenuItems.length - 1; + return ( + + {React.createElement(icon, { + className: `h-4 w-4 ${isLastItem ? "text-red-500" : ""}`, + strokeWidth: 2, + })} + + {label} + + + ); + })} + + + ); +} +``` + + +--- + + +## Avatar with Custom Styles + + +You can use the className prop to add custom styles to the Avatar component. Like in the example below - apply a border with border-green-500 for a pop of color and layered shadows shadow-xl shadow-green-900/20 for depth, creating a striking visual effect. + +}> +```jsx +import { Avatar } from "@material-tailwind/react"; + +export function AvatarCustomStyles() { + return ( + + ); +} +``` + + +--- + + +## Avatar Props + + +The following props are available for the avatar component. These are the custom props that we've added for +the avatar component and you can use all the other native image props as well. + +| Attribute | Type | Description | Default | +| ------------ | ------------------------- | -------------------------------- | --------------------- | +| `variant` | [Variant](#types-variant) | Change avatar variant | circular | +| `size` | [Size](#types-size) | Change avatar size | md | +| `color` | [Color](#types-color) | Change avatar border color | gray | +| `className` | string | Add custom className for avatar | `''` | +| `withBorder` | boolean | Add 2px border around the avatar | false | + +
+
+ +### For TypeScript Only + +Our avatar component is Typescript friendly. Use this to make sure that the correct prop types are passed to the component. + +```tsx +import type { AvatarProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Variant + + +Set of predefined styling variants available for our React and Tailwind CSS Avatar component. + +```ts +type variant = "rounded" | "circular"; +``` + +--- + + +## Types - Size + + +Check out Material Tailwind’s set of predefined sizes available for the Avatar component. + +```ts +type size = "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; +``` + +--- + + +## Types - Color + + +Set of predefined colors available for our Avatar component. Choose from our extensive 20+ list of colors like: orange, brown, amber, yellow, blue, etc. Customize the component to fit your web project's needs. + +```ts +type color = + | "white" + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Avatar Theme + + +Learn how to customize the theme and styles for avatar component, the theme object for avatar component has three main objects: + +**1.** The defaultProps object for setting up the default value for props of avatar component.
+**2.** The valid object for customizing the valid values for avatar component props.
+**3.** The styles object for customizing the theme and styles of avatar component.
+ +You can customize the theme and styles of avatar component by adding Tailwind CSS classes as key paired values for objects. + +
+
+ + +## Avatar Theme Object Type + + +```ts +interface AvatarStyleTypes { + defaultProps: { + variant: string; + size: string; + className: string; + withBorder: boolean; + color: string; + }; + valid: { + variants: string[]; + sizes: string[]; + colors: string[]; + }; + styles: { + base: { + initial: object; + withBorder: object; + }; + sizes: { + xs: object; + sm: object; + md: object; + lg: object; + xl: object; + xxl: object; + }; + variants: { + square: object; + rounded: object; + circular: object; + }; + borderColor: object; + }; +} +``` + +
+
+ +### For TypeScript Only + +```tsx +import type { AvatarStyleTypes } from "@material-tailwind/react"; +``` + +--- + + +## Avatar Theme Customization + + +```ts +const theme = { + avatar: { + defaultProps: { + variant: "circular", + size: "md", + className: "", + withBorder: false, + color: "blue", + }, + valid: { + variants: ["circular", "rounded", "square"], + sizes: ["xs", "sm", "md", "lg", "xl", "xxl"], + colors: [ + "white", + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + initial: { + display: "inline-block", + position: "relative", + objectFit: "object-cover", + objectPosition: "object-center", + }, + withBorder: { + border: "border-2", + }, + }, + sizes: { + xs: { + width: "w-6", + height: "h-6", + borderRadius: "rounded-md", + }, + sm: { + width: "w-9", + height: "h-9", + borderRadius: "rounded-md", + }, + md: { + width: "w-12", + height: "h-12", + borderRadius: "rounded-lg", + }, + lg: { + width: "w-[58px]", + height: "h-[58px]", + borderRadius: "rounded-lg", + }, + xl: { + width: "w-[74px]", + height: "h-[74px]", + borderRadius: "rounded-xl", + }, + xxl: { + width: "w-[110px]", + height: "h-[110px]", + borderRadius: "rounded-2xl", + }, + }, + variants: { + rounded: {}, + square: { + borderRadius: "!rounded-none", + }, + circular: { + borderRadius: "!rounded-full", + }, + }, + borderColor: { + white: { + borderColor: "border-white", + }, + "blue-gray": { + borderColor: "border-blue-gray-500", + }, + gray: { + borderColor: "border-gray-500", + }, + brown: { + borderColor: "border-brown-500", + }, + "deep-orange": { + borderColor: "border-deep-orange-500", + }, + orange: { + borderColor: "border-orange-500", + }, + amber: { + borderColor: "border-amber-500", + }, + yellow: { + borderColor: "border-yellow-500", + }, + lime: { + borderColor: "border-lime-500", + }, + "light-green": { + borderColor: "border-light-green-500", + }, + green: { + borderColor: "border-green-500", + }, + teal: { + borderColor: "border-teal-500", + }, + cyan: { + borderColor: "border-cyan-500", + }, + "light-blue": { + borderColor: "border-light-blue-500", + }, + blue: { + borderColor: "border-blue-500", + }, + indigo: { + borderColor: "border-indigo-500", + }, + "deep-purple": { + borderColor: "border-deep-purple-500", + }, + purple: { + borderColor: "border-purple-500", + }, + pink: { + borderColor: "border-pink-500", + }, + red: { + borderColor: "border-red-500", + }, + }, + }, + }, +}; +``` diff --git a/documentation/react/badge.mdx b/documentation/react/badge.mdx new file mode 100644 index 000000000..f8f92adb2 --- /dev/null +++ b/documentation/react/badge.mdx @@ -0,0 +1,610 @@ +--- +title: Tailwind CSS Badge for React - Material Tailwind +description: Customise your web projects with our easy-to-use badge component for Tailwind CSS and React using Material Design guidelines. +navigation: + [ + "badge", + "badge-colors", + "badge-placement", + "badge-overlap", + "badge-with-border", + "badge-dot", + "badge-custom-styles", + "badge-props", + "types-color", + "types-overlap", + "types-placement", + "badge-theme", + "badge-theme-object-type", + "badge-theme-customization" + ] +github: badge +prev: avatar +next: breadcrumbs +--- + + +# Tailwind CSS Badge - React + + +Use our Tailwind CSS Badge component to show status in your web projects. The Badge can be used as a visual identifier for notifications on your website. + +See below our beautiful Badge example that you can use in your Tailwind CSS and React project. The example also comes in different styles and colors so you can adapt it easily to your needs. + +
+ +}> +```jsx +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeDefault() { + return ( + + + + ); +} +``` + + +--- + + +## Badge Colors + + +The Badge component comes with 20 different colors that you can change it using the color prop. + +}> +```jsx +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeColors() { + return ( +
+ + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Badge Placement + + +You can change the position of the Badge component using the placement prop. + +}> +```jsx +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgePlacement() { + return ( +
+ + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Badge Overlap + + +You can change the overlap of the Badge component using the overlap prop. This can help to place the Badge component on it's right place when using it with circular elements. + +}> +```jsx +import { Badge, IconButton, Avatar } from "@material-tailwind/react"; +import { HomeIcon } from "@heroicons/react/24/solid"; + +export function BadgeOverlap() { + return ( +
+ + + + + + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Badge with Border + + +You can add a border to the Badge component using the withBorder prop. + +}> +```jsx +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeWithBorder() { + return ( + + + + ); +} +``` + + +--- + + +## Badge Dot + + +You can use the Badge component as a dot when you don't provide and content prop. + +}> +```jsx +import { Badge, Button } from "@material-tailwind/react"; + +export function BadgeDot() { + return ( + + + + ); +} +``` + + +--- + + +## Badge Custom Styles + + +You can use the className prop to add custom styles to the Badge component. + +}> +```jsx +import { Badge, Button } from "@material-tailwind/react"; +import {CheckIcon} from "@heroicons/react/24/outline"; + +export function BadgeCustomStyles() { + return ( + } + className="bg-gradient-to-tr from-green-400 to-green-600 border-2 border-white shadow-lg shadow-black/20" + > + + + ); +} +``` + + +--- + + +## Badge Props + + +The following props are available for badge component. These are the custom props +that we've added for the badge component and you can use all the other native props +as well. + +| Attribute | Type | Description | Default | +| ----------------- | ------------------------------- | ----------------------------------------- | ----------------------- | +| `color` | [Color](#types-color) | Change badge color | red | +| `invisible` | boolean | Change the badge visibility | false | +| `withBorder` | boolean | Add white border around badge | false | +| `overlap` | [overlap](#types-overlap) | Shape the badge should overlap. | square | +| `content` | node | Add content for the badge | undefined | +| `children` | node | The element that badge should be add to | undefined | +| `placement` | [Placement](#types-placement) | Change the badge placement | top-end | +| `className` | string | Add custom className for badge | `''` | +| `containerProps` | object | Add custom props for badge container | undefined | +| `containerRef` | ref | Reference to badge container. | undefined | + +
+
+ +### For TypeScript Only + +```tsx +import type { BadgeProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Color + + +```ts +type color = + | "white" + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Types - Overlap + + +```ts +type size = "circular" | "square"; +``` + +--- + + +## Types - Placement + + +```ts +type placement = "top-start" | "top-end" | "bottom-start" | "bottom-end"; +``` + +--- + + +## Badge Theme + + +Learn how to customize the theme and styles for badge component, the theme object for badge component has three main objects: + +**A.** The defaultProps object for setting up the default value for props of badge component.
+**B.** The valid object for customizing the valid values for badge component props.
+**C.** The styles object for customizing the theme and styles of badge component.
+ +You can customize the theme and styles of badge component by adding Tailwind CSS classes as key paired values for objects. + +
+
+ + +## Badge Theme Object Type + + +```ts +interface BadgeStyleTypes { + defaultProps?: { + color?: string; + invisible?: boolean; + placement?: string; + withBorder?: boolean; + overlap?: string; + content?: node; + className?: string; + containerProps?: object; + }; + valid?: { + colors?: string[]; + overlaps?: string[]; + placements?: string[]; + }; + styles?: { + base?: { + container?: object; + badge?: { + initial?: object; + withBorder?: object; + withContent?: object; + }; + }; + placements?: { + "top-start"?: { + square?: object; + circular?: object; + }; + "top-end"?: { + square?: object; + circular?: object; + }; + "bottom-start"?: { + square?: object; + circular?: object; + }; + "bottom-end"?: { + square?: object; + circular?: object; + }; + }; + colors?: object; + }; +} +``` + +
+
+ +### For TypeScript Only + +```tsx +import type { BadgeStyleTypes } from "@material-tailwind/react"; +``` + +--- + + +## Badge Theme Customization + + +```ts +const theme = { + badge: { + defaultProps: { + color: "red", + invisible: false, + withBorder: false, + overlap: "square", + content: undefined, + placement: "top-end", + className: undefined, + containerProps: undefined, + }, + valid: { + colors: [ + "white", + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + overlaps: ["circular", "square"], + placements: ["top-start", "top-end", "bottom-start", "bottom-end"], + }, + styles: { + base: { + container: { + position: "relative", + display: "inline-flex", + }, + badge: { + initial: { + position: "absolute", + minWidth: "min-w-[12px]", + minHeight: "min-h-[12px]", + borderRadius: "rounded-full", + paddingY: "py-1", + paddingX: "px-1", + fontSize: "text-xs", + fontWeight: "font-medium", + content: "content-['']", + lineHeight: "leading-none", + display: "grid", + placeItems: "place-items-center", + }, + withBorder: { + borderWidth: "border-2", + borderColor: "border-white", + }, + withContent: { + minWidth: "min-w-[24px]", + minHeight: "min-h-[24px]", + }, + }, + }, + placements: { + "top-start": { + square: { + top: "top-[4%]", + left: "left-[2%]", + translateX: "-translate-x-2/4", + translateY: "-translate-y-2/4", + }, + circular: { + top: "top-[14%]", + left: "left-[14%]", + translateX: "-translate-x-2/4", + translateY: "-translate-y-2/4", + }, + }, + "top-end": { + square: { + top: "top-[4%]", + right: "right-[2%]", + translateX: "translate-x-2/4", + translateY: "-translate-y-2/4", + }, + circular: { + top: "top-[14%]", + right: "right-[14%]", + translateX: "translate-x-2/4", + translateY: "-translate-y-2/4", + }, + }, + "bottom-start": { + square: { + bottom: "bottom-[4%]", + left: "left-[2%]", + translateX: "-translate-x-2/4", + translateY: "translate-y-2/4", + }, + circular: { + bottom: "bottom-[14%]", + left: "left-[14%]", + translateX: "-translate-x-2/4", + translateY: "translate-y-2/4", + }, + }, + "bottom-end": { + square: { + bottom: "bottom-[4%]", + right: "right-[2%]", + translateX: "translate-x-2/4", + translateY: "translate-y-2/4", + }, + circular: { + bottom: "bottom-[14%]", + right: "right-[14%]", + translateX: "translate-x-2/4", + translateY: "translate-y-2/4", + }, + }, + }, + colors: { + white: { + backgroud: "bg-white", + color: "text-blue-gray-900", + }, + "blue-gray": { + backgroud: "bg-blue-gray-500", + color: "text-white", + }, + gray: { + backgroud: "bg-gray-500", + color: "text-white", + }, + brown: { + backgroud: "bg-brown-500", + color: "text-white", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500", + color: "text-white", + }, + orange: { + backgroud: "bg-orange-500", + color: "text-white", + }, + amber: { + backgroud: "bg-amber-500", + color: "text-black", + }, + yellow: { + backgroud: "bg-yellow-500", + color: "text-black", + }, + lime: { + backgroud: "bg-lime-500", + color: "text-black", + }, + "light-green": { + backgroud: "bg-light-green-500", + color: "text-white", + }, + green: { + backgroud: "bg-green-500", + color: "text-white", + }, + teal: { + backgroud: "bg-teal-500", + color: "text-white", + }, + cyan: { + backgroud: "bg-cyan-500", + color: "text-white", + }, + "light-blue": { + backgroud: "bg-light-blue-500", + color: "text-white", + }, + blue: { + backgroud: "bg-blue-500", + color: "text-white", + }, + indigo: { + backgroud: "bg-indigo-500", + color: "text-white", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500", + color: "text-white", + }, + purple: { + backgroud: "bg-purple-500", + color: "text-white", + }, + pink: { + backgroud: "bg-pink-500", + color: "text-white", + }, + red: { + backgroud: "bg-red-500", + color: "text-white", + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/breadcrumbs.mdx b/documentation/react/breadcrumbs.mdx index 37f99f28f..4d13ceec7 100644 --- a/documentation/react/breadcrumbs.mdx +++ b/documentation/react/breadcrumbs.mdx @@ -6,29 +6,21 @@ navigation: "breadcrumbs", "breadcrumbs-with-icon", "block-level-breadcrumbs", - "custom-breadcrumbs-separator", - "props", - "theme", - ] -related: - [ - { - title: "Props", - route: "props/breadcrumbs", - description: "Learn more about props definition and types of breadcrumbs component.", - }, - { - title: "Theme", - route: "theme/breadcrumbs", - description: "Learn how to customize the theme and styles for breadcrumbs component.", - }, + "breadcrumbs-custom-separator", + "breadcrumbs-custom-styles", + "breadcrumbs-props", + "breadcrumbs-theme", + "breadcrumbs-theme-object-type", + "breadcrumbs-theme-customization", ] github: breadcrumbs -prev: avatar +prev: badge next: button --- + # Tailwind CSS Breadcrumbs - React + Use our Tailwind CSS Breadcrumbs component to simply create beautiful Breadcrumbs for your pages with Material Tailwind. @@ -40,21 +32,11 @@ See below our versatile Breadcrumbs component example that you can
- - - Docs - - - Components - - Breadcrumbs - -}> +}> ```jsx import { Breadcrumbs } from "@material-tailwind/react"; -export default function Example() { +export function BreadcrumbsDefault() { return ( @@ -72,32 +54,17 @@ export default function Example() { --- -## Breadcrumbs with icon + +## Breadcrumbs With Icon + You can add any type of icon for the Breadcrumbs component as easy as using icon in html. - - - - - - - - Components - - Breadcrumbs - -}> +}> ```jsx import { Breadcrumbs } from "@material-tailwind/react"; -export default function Example() { +export function BreadcrumbsWithIcon() { return ( @@ -122,25 +89,17 @@ export default function Example() { --- + ## Block Level Breadcrumbs + A Breadcrumbs could be a block level component as well that get's all the available space in a row. You can render a Breadcrumbs as a block level element using the fullWidth prop. - - - Docs - - - Components - - Breadcrumbs - -}> +}> ```jsx import { Breadcrumbs } from "@material-tailwind/react"; -export default function Example() { +export function BlockLevelBreadcrumbs() { return ( @@ -158,25 +117,17 @@ export default function Example() { --- -## Custom Breadcrumbs Separator + +## Breadcrumbs Custom Separator + You can modify the Breadcrumbs separators by using the Separator prop. - - - Docs - - - Components - - Breadcrumbs - -}> +}> ```jsx import { Breadcrumbs } from "@material-tailwind/react"; -export default function Example() { +export function BreadcrumbsCustomSeparator() { return ( @@ -192,5 +143,195 @@ export default function Example() { ``` - - +--- + + +## Breadcrumbs Custom Styles + + +You can use the className prop to add custom styles to the Breadcrumbs component. + +}> +```jsx +import { Breadcrumbs } from "@material-tailwind/react"; +import { ArrowLongRightIcon } from "@heroicons/react/24/outline"; + +export function BreadcrumbsCustomStyles() { + return ( + + } + className="rounded-full border border-white bg-gradient-to-tr from-gray-900 to-gray-800 p-1" + > + + Docs + + + Components + + + Breadcrumbs + + + ); +} + +``` + + +--- + + +## Breadcrumbs Props + + +The following props are available for breadcrumbs component. These are the custom +props that we've added for the breadcrumbs component and you can use all +the other native props as well. + +| Attribute | Type | Description | Default | +| ----------- | -------------------- | -------------------------------------------------- | -------------------------------------- | +| `separator` | node | Change breadcrumbs separator between it's elements | / | +| `fullWidth` | boolean | Change breadcrumbs to a block level element | false | +| `className` | string | Add custom className for breadcrumbs | `''` | +| `children` | node | Add content for breadcrumbs | No default value it's a required prop. | + +
+
+ +### For TypeScript Only + +```tsx +import type { BreadcrumbsProps } from "@material-tailwind/react"; +``` + +--- + + +## Breadcrumbs Theme + + +Learn how to customize the theme and styles for breadcrumbs component, the theme object for breadcrumbs component has two main objects: + +**A.** The defaultProps object for setting up the default value for props of breadcrumbs component.
+**B.** The styles object for customizing the theme and styles of breadcrumbs component.
+ +You can customize the theme and styles of breadcrumbs component by adding Tailwind CSS classes as key paired values for objects. + +
+
+ + +## Breadcrumbs Theme Object Type + + +```ts +interface BreadcrumbsStyleTypes { + defaultProps: { + separator: node; + fullWidth: boolean; + className: string; + }; + styles: { + base: { + root: { + initial: object; + fullWidth: object; + }; + list: object; + item: { + initial: object; + disabled: object; + }; + separator: object; + }; + }; +} +``` + +
+
+ +### For TypeScript Only + +```tsx +import type { BreadcrumbsStyleTypes } from "@material-tailwind/react"; +``` + +--- + + +## Breadcrumbs Theme Customization + + +```ts +const theme = { + breadcrumbs: { + defaultProps: { + className: "", + fullWidth: false, + separator: "/", + }, + styles: { + base: { + root: { + initial: { + width: "w-max", + }, + fullWidth: { display: "block", width: "w-full" }, + }, + list: { + display: "flex", + flexWrap: "flex-wrap", + alignItems: "items-center", + width: "w-full", + bg: "bg-blue-gray-50", + bgOpacity: "bg-opacity-60", + py: "py-2", + px: "px-4", + borderRadius: "rounded-md", + }, + item: { + initial: { + display: "flex", + alignItems: "items-center", + color: "text-blue-gray-900", + fontSmoothing: "antialiased", + fontFamily: "font-sans", + fontSize: "text-sm", + fontWeight: "font-normal", + lineHeight: "leading-normal", + cursor: "cursor-pointer", + transition: "transition-colors duration-300", + hover: "hover:text-light-blue-500", + }, + disabled: { + pointerEvents: "pointer-events-none", + }, + }, + separator: { + color: "text-blue-gray-500", + fontSize: "text-sm", + fontSmoothing: "antialiased", + fontFamily: "font-sans", + fontWeight: "font-normal", + lineHeight: "leading-normal", + px: "mx-2", + pointerEvents: "pointer-events-none", + userSelcet: "select-none", + }, + }, + }, + }, +}; +``` diff --git a/documentation/react/button-group.mdx b/documentation/react/button-group.mdx new file mode 100644 index 000000000..71bf12f43 --- /dev/null +++ b/documentation/react/button-group.mdx @@ -0,0 +1,522 @@ +--- +title: Tailwind CSS Button Group for React - Material Tailwind +description: Customise your web projects with our easy-to-use button group component for Tailwind CSS and React using Material Design guidelines. +navigation: + [ + "button-group", + "button-group-variants", + "button-group-sizes", + "button-group-colors", + "block-level-button-group", + "button-group-ripple-effect", + "button-group-custom-styles", + "button-group-props", + "types-variant", + "types-size", + "types-color", + "button-group-theme", + "button-group-theme-object-type", + "button-group-theme-customization", + ] +github: button +prev: button +next: card +--- + + +# Tailwind CSS Button Group - React + + +Use our React Button Group styled with Tailwind CSS to group together a series of buttons in a single layout. + +The Button Group component is an essential element of web design. Basically, it is stack of buttons. They help users navigate our websites +or apps and drive them to a particular action. + +See below our Button Group examples that you can use in your Tailwind CSS and React project. These example comes in different styles and colors, so you can adapt them easily to your needs. + +
+ +## Button Group Examples + +## Default Button Group + +This React component example demonstrates a straightforward usage of the Button Group to create a cohesive set of actions. + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupDefault() { + return ( + + + + + + ); +} +``` + + +--- + + +## Button Group Variants + + +This Button Group component comes with 4 different variants that you can change using the variant prop. + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupVariants() { + return ( +
+ + + + + + + + + + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Button Group Sizes + + +This Tailwind CSS Button Group component comes with 3 different sizes, small (sm), medium (md), and large (lg), that you can change using the size prop. + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupSizes() { + return ( +
+ + + + + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Button Group Colors + + +This Button Group component comes with 19 different colors (for example: blue, red, green, amber) that you can change using the color prop. + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupColors() { + return ( +
+ + + + + + + + + + + + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Block Level Button Group + + +Our React Button Group could be implemented as a block level component, as well, that gets all the available space in a row. You can render a ButtonGroup as a block level element using the fullWidth prop. + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function BlockLevelButtonGroup() { + return ( + + + + + + ); +} +``` + + +--- + + +## Button Group Ripple Effect + + +You can turn on/off the ripple effect for the ButtonGroup component using the ripple prop. The ripple effect is used to provide an intuitive and visually pleasing indication of interaction for the user (like a subtle visual cue). + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupRippleEffect() { + return ( +
+ + + + + + + + + + +
+ ); +} +``` +
+ +--- + + +## Button Group Custom Styles + + +You can use the className prop to add custom styles to the ButtonGroup component. Material Tailwind comes with the ability to blend pre-defined design principles with extensive styling flexibility. + +}> +```jsx +import { ButtonGroup, Button } from "@material-tailwind/react"; + +export function ButtonGroupCustomStyles() { + return ( + + + + + + ); +} +``` + + +--- + + +## Button Group Props + + +The following props are available for button group component. These are the custom +props that we've added for the button group component and you can use all the other +native props as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | ---------------------------------------- | -------------------------------------- | +| `variant` | [Variant](#types-variant) | Change buttons variant | filled | +| `size` | [Size](#types-size) | Change buttons size | md | +| `color` | [Color](#types-color) | Change buttons color | gray | +| `fullWidth` | boolean | Change buttons to a block level elements | false | +| `ripple` | boolean | Add ripple effect for buttons | true | +| `className` | string | Add custom className for button group | `''` | +| `children` | node | Add content for button group | No default value it's a required prop. | + +
+
+ +### For TypeScript Only + +```tsx +import type { ButtonGroupProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Variant + + +```ts +type variant = "filled" | "outlined" | "gradient" | "text"; +``` + +--- + + +## Types - Size + + +Check out Material Tailwind’s set of predefined sizes available for the Button Group component. + + + +```ts +type size = "sm" | "md" | "lg"; +``` + +--- + + +## Types - Color + + +Set of predefined colors available for our Button Group component. Choose from our extensive 20+ list of colors like: orange, brown, amber, yellow, blue, etc. Customize the component to fit your web project’s needs. + +```ts +type color = + | "white" + | "black" + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Button Group Theme + + +Learn how to customize the theme and styles for button group component, the theme object for button group component has three main objects: + +**A.** The defaultProps object for setting up the default value for props of button group component.
+**B.** The valid object for customizing the valid values for button group component props.
+**C.** The styles object for customizing the theme and styles of button group component.
+ +You can customize the theme and styles of button group component by adding Tailwind CSS classes as key paired values for objects. + +
+
+ + +## Button Group Theme Object Type + + +```ts +interface ButtonStyleTypes { + defaultProps: { + variant: string; + size: string; + color: string; + fullWidth: boolean; + ripple: boolean; + className: string; + }; + valid: { + variants: string[]; + sizes: string[]; + colors: string[]; + }; + styles: { + base: { + initial: object; + fullWidth: object; + }; + dividerColor: object; + }; +} +``` + +
+
+ +### For TypeScript Only + +```tsx +import type { ButtonGroupStyleTypes } from "@material-tailwind/react"; +``` + +--- + + +## Button Group Theme Customization + + +Whether you're looking to modify the color palette, adjust the border styles, or apply custom animations, the theme customization options are both robust and intuitive. + +The button group design can be further enhanced using Material Tailwind's utility classes for a more refined look. + + +```ts +const theme = { + buttonGroup: { + defaultProps: { + variant: "filled", + size: "md", + color: "blue", + fullWidth: false, + ripple: true, + className: "", + }, + valid: { + variants: ["filled", "outlined", "gradient", "text"], + sizes: ["sm", "md", "lg"], + colors: [ + "white", + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + initial: { + display: "flex", + flexDirection: "row", + }, + fullWidth: { + width: "w-full", + }, + }, + dividerColor: { + white: { + divideColor: "divide-blue-gray-50", + }, + "blue-gray": { + divideColor: "divide-blue-gray-600", + }, + gray: { + divideColor: "divide-gray-600", + }, + brown: { + divideColor: "divide-brown-600", + }, + "deep-orange": { + divideColor: "divide-deep-orange-600", + }, + orange: { + divideColor: "divide-orange-600", + }, + amber: { + divideColor: "divide-amber-600", + }, + yellow: { + divideColor: "divide-yellow-600", + }, + lime: { + divideColor: "divide-lime-600", + }, + "light-green": { + divideColor: "divide-light-green-600", + }, + green: { + divideColor: "divide-green-600", + }, + teal: { + divideColor: "divide-teal-600", + }, + cyan: { + divideColor: "divide-cyan-600", + }, + "light-blue": { + divideColor: "divide-light-blue-600", + }, + blue: { + divideColor: "divide-blue-600", + }, + indigo: { + divideColor: "divide-indigo-600", + }, + "deep-purple": { + divideColor: "divide-deep-purple-600", + }, + purple: { + divideColor: "divide-purple-600", + }, + pink: { + divideColor: "divide-pink-600", + }, + red: { + divideColor: "divide-red-600", + }, + }, + }, + }, +}; +``` diff --git a/documentation/react/button.mdx b/documentation/react/button.mdx index 43a4bb88a..7c4739a45 100644 --- a/documentation/react/button.mdx +++ b/documentation/react/button.mdx @@ -7,32 +7,29 @@ navigation: "button-variants", "button-sizes", "button-colors", + "loading-button", "button-with-icon", "block-level-button", + "button-rounded", + "button-with-link", "button-ripple-effect", - "custom-auth-buttons", - "props", - "theme", - ] -related: - [ - { - title: "Props", - route: "props/button", - description: "Learn more about props definition and types of button component.", - }, - { - title: "Theme", - route: "theme/button", - description: "Learn how to customize the theme and styles for button component.", - }, + "auth-buttons", + "button-props", + "types-variant", + "types-size", + "types-color", + "button-theme", + "button-theme-object-type", + "button-theme-customization" ] github: button prev: breadcrumbs next: card --- + # Tailwind CSS Button - React + Use our Button based on Tailwind CSS for actions in forms, dialogues, and more. @@ -45,11 +42,11 @@ See below our Button example that you can use in your Tailwind CSS
-Button}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Example() { +export function ButtonDefault() { return ; } ``` @@ -57,22 +54,17 @@ export default function Example() { --- + ## Button Variants + The Button component comes with 4 different variants that you can change it using the variant prop. - - - - - -
-}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Variants() { +export function ButtonVariants() { return (
@@ -87,21 +79,17 @@ export default function Variants() { --- + ## Button Sizes + The Button component comes with 3 different sizes that you can change it using the size prop. - - - - -
-}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Sizes() { +export function ButtonSizes() { return (
@@ -115,22 +103,17 @@ export default function Sizes() { --- + ## Button Colors + The Button component comes with 19 different colors that you can change it using the color prop. - - - - - -
-}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Colors() { +export function ButtonColors() { return (
@@ -145,51 +128,118 @@ export default function Colors() { --- -## Button with Icon + +## Loading Button + + +You can add loading state and disable Button component using the loading prop. + +}> +```jsx +import { Button } from "@material-tailwind/react"; + +export function ButtonLoading() { + return ( +
+ + + + +
+ ); +} + +``` +
+ +--- + + +## Button With Icon + You can use any type of icons inside the button, in the below example we've used the @heroicons. - - - - - -
-}> +}> ```jsx import { Button } from "@material-tailwind/react"; -import { - CloudArrowUpIcon, - ArrowLongRightIcon, - ArrowPathIcon, - BookmarkIcon, -} from "@heroicons/react/24/outline"; - -export default function Day01() { + +export function ButtonWithIcon() { return (
); @@ -199,15 +249,17 @@ export default function Day01() { --- + ## Block Level Button + -A Button could be a block level component as well that get's all the available space in a row. You can render a Button as a block level element using the fullWidth prop. +A Button could be a block-level component as well that gets all the available space in a row. You can render a Button as a block-level element using the fullWidth prop. -block level button}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Example() { +export function BlockLevelButton() { return ; } ``` @@ -215,20 +267,81 @@ export default function Example() { --- + +## Rounded Buttons + + +You can use tailwind css rounded-full class with Button to create rounded buttons. + +}> +```jsx +import { Button } from "@material-tailwind/react"; + +export function ButtonRounded() { + return ( +
+ + + + +
+ ); +} +``` +
+ +--- + + +## Buttons With Link + + +You can wrap Button component with {``} tag to make it a link. + +}> +```jsx +import { Button } from "@material-tailwind/react"; + +export function ButtonWithLink() { + return ( + + ); +} +``` +
+ +--- + + ## Button Ripple Effect + You can turn on/off the ripple effect for the Button component using the ripple prop. - - - -
-}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Example() { +export function ButtonRippleEffect() { return (
@@ -241,46 +354,21 @@ export default function Example() { --- -## Custom Auth Buttons + +## Auth Buttons + You can use tailwind css classes with Button to create beautiful buttons for different purposes, below you can use some button examples used for authentication with social media and web 3.0. - - - - -
-}> +}> ```jsx import { Button } from "@material-tailwind/react"; -export default function Example() { +export function AuthButtons() { return (
@@ -309,5 +397,784 @@ export default function Example() { ```
- - +--- + + +## Button Props + + +The following props are available for button component. These are the custom props +that we've added for the button component and you can use all the other native button +props as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | -------------------------------------- | -------------------------------------- | +| `variant` | [Variant](#types-variant) | Change button variant | filled | +| `size` | [Size](#types-size) | Change button size | md | +| `color` | [Color](#types-color) | Change button color | gray | +| `fullWidth` | boolean | Change button to a block level element | false | +| `ripple` | boolean | Add ripple effect for button | true | +| `className` | string | Add custom className for button | `''` | +| `children` | node | Add content for button | No default value it's a required prop. | +| `loading` | loading | Add loading state and disable button | undefined | + +
+
+ +### For TypeScript Only + +```tsx +import type { ButtonProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Variant + + +```ts +type variant = "filled" | "outlined" | "gradient" | "text"; +``` + +--- + + +## Types - Size + + +```ts +type size = "sm" | "md" | "lg"; +``` + +--- + + +## Types - Color + + +```ts +type color = + | "white" + | "black" + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Button Theme + + +Learn how to customize the theme and styles for button component, the theme object for button component has three main objects: + +**A.** The defaultProps object for setting up the default value for props of button component.
+**B.** The valid object for customizing the valid values for button component props.
+**C.** The styles object for customizing the theme and styles of button component.
+ +You can customize the theme and styles of button component by adding Tailwind CSS classes as key paired values for objects. + +
+
+ + +## Button Theme Object Type + + +```ts +interface ButtonStyleTypes { + defaultProps: { + variant: string; + size: string; + color: string; + fullWidth: boolean; + ripple: boolean; + className: string; + }; + valid: { + variants: string[]; + sizes: string[]; + colors: string[]; + }; + styles: { + base: { + initial: object; + fullWidth: object; + }; + sizes: { + sm: object; + md: object; + lg: object; + }; + variants: { + filled: object; + gradient: object; + outlined: object; + text: object; + }; + }; +} +``` + +
+
+ +### For TypeScript Only + +```tsx +import type { ButtonStyleTypes } from "@material-tailwind/react"; +``` + +--- + + +## Button Theme Customization + + +```ts +const theme = { + button: { + defaultProps: { + variant: "filled", + size: "md", + color: "blue", + fullWidth: false, + ripple: true, + className: "", + }, + valid: { + variants: ["filled", "outlined", "gradient", "text"], + sizes: ["sm", "md", "lg"], + colors: [ + "white", + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + initial: { + verticalAlign: "align-middle", + userSelect: "select-none", + fontFamily: "font-sans", + fontWeight: "font-bold", + textAlign: "text-center", + textTransform: "uppercase", + transition: "transition-all", + disabled: "disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none", + }, + fullWidth: { + display: "block", + width: "w-full", + }, + }, + sizes: { + sm: { + fontSize: "text-xs", + py: "py-2", + px: "px-4", + borderRadius: "rounded-lg", + }, + md: { + fontSize: "text-xs", + py: "py-3", + px: "px-6", + borderRadius: "rounded-lg", + }, + lg: { + fontSize: "text-sm", + py: "py-3.5", + px: "px-7", + borderRadius: "rounded-lg", + }, + }, + variants: { + filled: { + white: { + backgroud: "bg-white", + color: "text-blue-gray-900", + shadow: "shadow-md shadow-blue-gray-500/10", + hover: "hover:shadow-lg hover:shadow-blue-gray-500/20", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + "blue-gray": { + backgroud: "bg-blue-gray-500", + color: "text-white", + shadow: "shadow-md shadow-blue-gray-500/20", + hover: "hover:shadow-lg hover:shadow-blue-gray-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + gray: { + backgroud: "bg-gray-500", + color: "text-white", + shadow: "shadow-md shadow-gray-500/20", + hover: "hover:shadow-lg hover:shadow-gray-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + brown: { + backgroud: "bg-brown-500", + color: "text-white", + shadow: "shadow-md shadow-brown-500/20", + hover: "hover:shadow-lg hover:shadow-brown-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500", + color: "text-white", + shadow: "shadow-md shadow-deep-orange-500/20", + hover: "hover:shadow-lg hover:shadow-deep-orange-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + orange: { + backgroud: "bg-orange-500", + color: "text-white", + shadow: "shadow-md shadow-orange-500/20", + hover: "hover:shadow-lg hover:shadow-orange-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + amber: { + backgroud: "bg-amber-500", + color: "text-black", + shadow: "shadow-md shadow-amber-500/20", + hover: "hover:shadow-lg hover:shadow-amber-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + yellow: { + backgroud: "bg-yellow-500", + color: "text-black", + shadow: "shadow-md shadow-yellow-500/20", + hover: "hover:shadow-lg hover:shadow-yellow-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + lime: { + backgroud: "bg-lime-500", + color: "text-black", + shadow: "shadow-md shadow-lime-500/20", + hover: "hover:shadow-lg hover:shadow-lime-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + "light-green": { + backgroud: "bg-light-green-500", + color: "text-white", + shadow: "shadow-md shadow-light-green-500/20", + hover: "hover:shadow-lg hover:shadow-light-green-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + green: { + backgroud: "bg-green-500", + color: "text-white", + shadow: "shadow-md shadow-green-500/20", + hover: "hover:shadow-lg hover:shadow-green-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + teal: { + backgroud: "bg-teal-500", + color: "text-white", + shadow: "shadow-md shadow-teal-500/20", + hover: "hover:shadow-lg hover:shadow-teal-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + cyan: { + backgroud: "bg-cyan-500", + color: "text-white", + shadow: "shadow-md shadow-cyan-500/20", + hover: "hover:shadow-lg hover:shadow-cyan-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + "light-blue": { + backgroud: "bg-light-blue-500", + color: "text-white", + shadow: "shadow-md shadow-light-blue-500/20", + hover: "hover:shadow-lg hover:shadow-light-blue-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + blue: { + backgroud: "bg-blue-500", + color: "text-white", + shadow: "shadow-md shadow-blue-500/20", + hover: "hover:shadow-lg hover:shadow-blue-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + indigo: { + backgroud: "bg-indigo-500", + color: "text-white", + shadow: "shadow-md shadow-indigo-500/20", + hover: "hover:shadow-lg hover:shadow-indigo-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500", + color: "text-white", + shadow: "shadow-md shadow-deep-purple-500/20", + hover: "hover:shadow-lg hover:shadow-deep-purple-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + purple: { + backgroud: "bg-purple-500", + color: "text-white", + shadow: "shadow-md shadow-purple-500/20", + hover: "hover:shadow-lg hover:shadow-purple-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + pink: { + backgroud: "bg-pink-500", + color: "text-white", + shadow: "shadow-md shadow-pink-500/20", + hover: "hover:shadow-lg hover:shadow-pink-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + red: { + backgroud: "bg-red-500", + color: "text-white", + shadow: "shadow-md shadow-red-500/20", + hover: "hover:shadow-lg hover:shadow-red-500/40", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + }, + gradient: { + white: { + backgroud: "bg-white", + color: "text-blue-gray-900", + shadow: "shadow-md shadow-blue-gray-500/10", + hover: "hover:shadow-lg hover:shadow-blue-gray-500/20", + focus: "focus:opacity-[0.85] focus:shadow-none", + active: "active:opacity-[0.85] active:shadow-none", + }, + "blue-gray": { + backgroud: "bg-gradient-to-tr from-blue-gray-600 to-blue-gray-400", + color: "text-white", + shadow: "shadow-md shadow-blue-gray-500/20", + hover: "hover:shadow-lg hover:shadow-blue-gray-500/40", + active: "active:opacity-[0.85]", + }, + gray: { + backgroud: "bg-gradient-to-tr from-gray-600 to-gray-400", + color: "text-white", + shadow: "shadow-md shadow-gray-500/20", + hover: "hover:shadow-lg hover:shadow-gray-500/40", + active: "active:opacity-[0.85]", + }, + brown: { + backgroud: "bg-gradient-to-tr from-brown-600 to-brown-400", + color: "text-white", + shadow: "shadow-md shadow-brown-500/20", + hover: "hover:shadow-lg hover:shadow-brown-500/40", + active: "active:opacity-[0.85]", + }, + "deep-orange": { + backgroud: "bg-gradient-to-tr from-deep-orange-600 to-deep-orange-400", + color: "text-white", + shadow: "shadow-md shadow-deep-orange-500/20", + hover: "hover:shadow-lg hover:shadow-deep-orange-500/40", + active: "active:opacity-[0.85]", + }, + orange: { + backgroud: "bg-gradient-to-tr from-orange-600 to-orange-400", + color: "text-white", + shadow: "shadow-md shadow-orange-500/20", + hover: "hover:shadow-lg hover:shadow-orange-500/40", + active: "active:opacity-[0.85]", + }, + amber: { + backgroud: "bg-gradient-to-tr from-amber-600 to-amber-400", + color: "text-black", + shadow: "shadow-md shadow-amber-500/20", + hover: "hover:shadow-lg hover:shadow-amber-500/40", + active: "active:opacity-[0.85]", + }, + yellow: { + backgroud: "bg-gradient-to-tr from-yellow-600 to-yellow-400", + color: "text-black", + shadow: "shadow-md shadow-yellow-500/20", + hover: "hover:shadow-lg hover:shadow-yellow-500/40", + active: "active:opacity-[0.85]", + }, + lime: { + backgroud: "bg-gradient-to-tr from-lime-600 to-lime-400", + color: "text-black", + shadow: "shadow-md shadow-lime-500/20", + hover: "hover:shadow-lg hover:shadow-lime-500/40", + active: "active:opacity-[0.85]", + }, + "light-green": { + backgroud: "bg-gradient-to-tr from-light-green-600 to-light-green-400", + color: "text-white", + shadow: "shadow-md shadow-light-green-500/20", + hover: "hover:shadow-lg hover:shadow-light-green-500/40", + active: "active:opacity-[0.85]", + }, + green: { + backgroud: "bg-gradient-to-tr from-green-600 to-green-400", + color: "text-white", + shadow: "shadow-md shadow-green-500/20", + hover: "hover:shadow-lg hover:shadow-green-500/40", + active: "active:opacity-[0.85]", + }, + teal: { + backgroud: "bg-gradient-to-tr from-teal-600 to-teal-400", + color: "text-white", + shadow: "shadow-md shadow-teal-500/20", + hover: "hover:shadow-lg hover:shadow-teal-500/40", + active: "active:opacity-[0.85]", + }, + cyan: { + backgroud: "bg-gradient-to-tr from-cyan-600 to-cyan-400", + color: "text-white", + shadow: "shadow-md shadow-cyan-500/20", + hover: "hover:shadow-lg hover:shadow-cyan-500/40", + active: "active:opacity-[0.85]", + }, + "light-blue": { + backgroud: "bg-gradient-to-tr from-light-blue-600 to-light-blue-400", + color: "text-white", + shadow: "shadow-md shadow-light-blue-500/20", + hover: "hover:shadow-lg hover:shadow-light-blue-500/40", + active: "active:opacity-[0.85]", + }, + blue: { + backgroud: "bg-gradient-to-tr from-blue-600 to-blue-400", + color: "text-white", + shadow: "shadow-md shadow-blue-500/20", + hover: "hover:shadow-lg hover:shadow-blue-500/40", + active: "active:opacity-[0.85]", + }, + indigo: { + backgroud: "bg-gradient-to-tr from-indigo-600 to-indigo-400", + color: "text-white", + shadow: "shadow-md shadow-indigo-500/20", + hover: "hover:shadow-lg hover:shadow-indigo-500/40", + active: "active:opacity-[0.85]", + }, + "deep-purple": { + backgroud: "bg-gradient-to-tr from-deep-purple-600 to-deep-purple-400", + color: "text-white", + shadow: "shadow-md shadow-deep-purple-500/20", + hover: "hover:shadow-lg hover:shadow-deep-purple-500/40", + active: "active:opacity-[0.85]", + }, + purple: { + backgroud: "bg-gradient-to-tr from-purple-600 to-purple-400", + color: "text-white", + shadow: "shadow-md shadow-purple-500/20", + hover: "hover:shadow-lg hover:shadow-purple-500/40", + active: "active:opacity-[0.85]", + }, + pink: { + backgroud: "bg-gradient-to-tr from-pink-600 to-pink-400", + color: "text-white", + shadow: "shadow-md shadow-pink-500/20", + hover: "hover:shadow-lg hover:shadow-pink-500/40", + active: "active:opacity-[0.85]", + }, + red: { + backgroud: "bg-gradient-to-tr from-red-600 to-red-400", + color: "text-white", + shadow: "shadow-md shadow-red-500/20", + hover: "hover:shadow-lg hover:shadow-red-500/40", + active: "active:opacity-[0.85]", + }, + }, + outlined: { + white: { + border: "border border-white", + color: "text-white", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-white/50", + active: "active:opacity-[0.85]", + }, + "blue-gray": { + border: "border border-blue-gray-500", + color: "text-blue-gray-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-blue-gray-200", + active: "active:opacity-[0.85]", + }, + gray: { + border: "border border-gray-500", + color: "text-gray-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-gray-200", + active: "active:opacity-[0.85]", + }, + brown: { + border: "border border-brown-500", + color: "text-brown-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-brown-200", + active: "active:opacity-[0.85]", + }, + "deep-orange": { + border: "border border-deep-orange-500", + color: "text-deep-orange-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-deep-orange-200", + active: "active:opacity-[0.85]", + }, + orange: { + border: "border border-orange-500", + color: "text-orange-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-orange-200", + active: "active:opacity-[0.85]", + }, + amber: { + border: "border border-amber-500", + color: "text-amber-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-amber-200", + active: "active:opacity-[0.85]", + }, + yellow: { + border: "border border-yellow-500", + color: "text-yellow-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-yellow-200", + active: "active:opacity-[0.85]", + }, + lime: { + border: "border border-lime-500", + color: "text-lime-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-lime-200", + active: "active:opacity-[0.85]", + }, + "light-green": { + border: "border border-light-green-500", + color: "text-light-green-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-light-green-200", + active: "active:opacity-[0.85]", + }, + green: { + border: "border border-green-500", + color: "text-green-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-green-200", + active: "active:opacity-[0.85]", + }, + teal: { + border: "border border-teal-500", + color: "text-teal-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-teal-200", + active: "active:opacity-[0.85]", + }, + cyan: { + border: "border border-cyan-500", + color: "text-cyan-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-cyan-200", + active: "active:opacity-[0.85]", + }, + "light-blue": { + border: "border border-light-blue-500", + color: "text-light-blue-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-light-blue-200", + active: "active:opacity-[0.85]", + }, + blue: { + border: "border border-blue-500", + color: "text-blue-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-blue-200", + active: "active:opacity-[0.85]", + }, + indigo: { + border: "border border-indigo-500", + color: "text-indigo-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-indigo-200", + active: "active:opacity-[0.85]", + }, + "deep-purple": { + border: "border border-deep-purple-500", + color: "text-deep-purple-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-deep-purple-200", + active: "active:opacity-[0.85]", + }, + purple: { + border: "border border-purple-500", + color: "text-purple-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-purple-200", + active: "active:opacity-[0.85]", + }, + pink: { + border: "border border-pink-500", + color: "text-pink-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-pink-200", + active: "active:opacity-[0.85]", + }, + red: { + border: "border border-red-500", + color: "text-red-500", + hover: "hover:opacity-75", + focus: "focus:ring focus:ring-red-200", + active: "active:opacity-[0.85]", + }, + }, + text: { + white: { + color: "text-white", + hover: "hover:bg-white/10", + active: "active:bg-white/30", + }, + "blue-gray": { + color: "text-blue-gray-500", + hover: "hover:bg-blue-gray-500/10", + active: "active:bg-blue-gray-500/30", + }, + gray: { + color: "text-gray-500", + hover: "hover:bg-gray-500/10", + active: "active:bg-gray-500/30", + }, + brown: { + color: "text-brown-500", + hover: "hover:bg-brown-500/10", + active: "active:bg-brown-500/30", + }, + "deep-orange": { + color: "text-deep-orange-500", + hover: "hover:bg-deep-orange-500/10", + active: "active:bg-deep-orange-500/30", + }, + orange: { + color: "text-orange-500", + hover: "hover:bg-orange-500/10", + active: "active:bg-orange-500/30", + }, + amber: { + color: "text-amber-500", + hover: "hover:bg-amber-500/10", + active: "active:bg-amber-500/30", + }, + yellow: { + color: "text-yellow-500", + hover: "hover:bg-yellow-500/10", + active: "active:bg-yellow-500/30", + }, + lime: { + color: "text-lime-500", + hover: "hover:bg-lime-500/10", + active: "active:bg-lime-500/30", + }, + "light-green": { + color: "text-light-green-500", + hover: "hover:bg-light-green-500/10", + active: "active:bg-light-green-500/30", + }, + green: { + color: "text-green-500", + hover: "hover:bg-green-500/10", + active: "active:bg-green-500/30", + }, + teal: { + color: "text-teal-500", + hover: "hover:bg-teal-500/10", + active: "active:bg-teal-500/30", + }, + cyan: { + color: "text-cyan-500", + hover: "hover:bg-cyan-500/10", + active: "active:bg-cyan-500/30", + }, + "light-blue": { + color: "text-light-blue-500", + hover: "hover:bg-light-blue-500/10", + active: "active:bg-light-blue-500/30", + }, + blue: { + color: "text-blue-500", + hover: "hover:bg-blue-500/10", + active: "active:bg-blue-500/30", + }, + indigo: { + color: "text-indigo-500", + hover: "hover:bg-indigo-500/10", + active: "active:bg-indigo-500/30", + }, + "deep-purple": { + color: "text-deep-purple-500", + hover: "hover:bg-deep-purple-500/10", + active: "active:bg-deep-purple-500/30", + }, + purple: { + color: "text-purple-500", + hover: "hover:bg-purple-500/10", + active: "active:bg-purple-500/30", + }, + pink: { + color: "text-pink-500", + hover: "hover:bg-pink-500/10", + active: "active:bg-pink-500/30", + }, + red: { + color: "text-red-500", + hover: "hover:bg-red-500/10", + active: "active:bg-red-500/30", + }, + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/card.mdx b/documentation/react/card.mdx index 59e09c61a..2466d5053 100644 --- a/documentation/react/card.mdx +++ b/documentation/react/card.mdx @@ -4,6 +4,8 @@ description: Customise your web projects with our beautiful cards component for navigation: [ "card", + "simple-card", + "card-with-link", "profile-card", "login-card", "pricing-card", @@ -11,64 +13,43 @@ navigation: "background-blog-card", "booking-card", "testimonial-card", - "props", - "theme", - ] -related: - [ - { - title: "Props", - route: "props/card", - description: "Learn more about props definition and types of card components.", - }, - { - title: "Theme", - route: "theme/card", - description: "Learn how to customize the theme and styles for card components.", - }, + "horizontal-card", + "ecommerce-card", + "card-with-list", + "card-props", + "card-header-props", + "card-body-props", + "card-footer-props", + "types-variant", + "types-color", + "card-theme", + "card-theme-object-type", + "card-theme-customization", + "card-header-theme-object-type", + "card-header-theme-customization", + "card-body-theme-object-type", + "card-body-theme-customization", + "card-footer-theme-object-type", + "card-footer-theme-customization", ] github: card prev: button next: checkbox --- + # Tailwind CSS Card - React + Use our Card to provide a flexible and extensible content container based on Tailwind CSS with multiple variants and options. -By its definition, a Card is a sheet of material that serves as an entry point to more detailed information. Card usually include a photo, text, and a link about a single subject. They should be easy to scan for relevant and actionable information. Elements, like text and images, should be placed on them in a way that clearly indicates hierarchy. +By its definition, a Card is a sheet of material that serves as an entry point to more detailed information. Card usually include a photo, text, and a link about a single subject. They should be easy to scan for relevant and actionable information. Elements, like text and images, should be placed on them in a way that clearly indicates hierarchy. -See below our beautiful Card example that you can use in your React and Tailwind CSS projects. We've also included some Card props that are available. +See below our beautiful Card example that you can use in your React and Tailwind CSS projects. We've also included some Card props that are available.
- - - img-blur-shadow - - - - Cozy 5 Stars Apartment - - - The place is close to Barceloneta Beach and bus stop just 2 min by walk - and near to "Naviglio" where you can enjoy the main night life - in Barcelona. - - - - $899/night - - - Barcelona, Spain - - - -}> +}> ```jsx import { Card, @@ -76,34 +57,30 @@ import { CardBody, CardFooter, Typography, + Button, } from "@material-tailwind/react"; -export default function Example() { +export function CardDefault() { return ( - - + + img-blur-shadow - - - Cozy 5 Stars Apartment + + + UI/UX Review Check The place is close to Barceloneta Beach and bus stop just 2 min by - walk and near to "Naviglio" where you can enjoy the main night life in - Barcelona. + walk and near to "Naviglio" where you can enjoy the main + night life in Barcelona. - - $899/night - - - Barcelona, Spain - + + ); @@ -113,64 +90,123 @@ export default function Example() { --- -## Tailwind CSS Profile Card - React + +## Tailwind CSS Simple Card - React + - - - profile-picture - - - - {`Natalie Paisley`} - - - {`CEO / Co-Founder`} - - - - - - +Use this example if you want to showcase your information in a simple and straightforward way. A basic card comes with a headline, a description, and a CTA button. + +}> +```jsx +import { + Card, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function SimpleCard() { + return ( + + + + UI/UX Review Check - - - - + + The place is close to Barceloneta Beach and bus stop just 2 min by + walk and near to "Naviglio" where you can enjoy the main + night life in Barcelona. - - - + + + + + ); +} +``` + + +--- + + +## Tailwind CSS Card with Link - React + + +Use this card example if you are looking to use a link instead a button. + +}> +```jsx +import { + Card, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function CardWithLink() { + return ( + + + - + + + + + UI/UX Review Check - - - -}> + + Because it's about motivating the doers. Because I'm here to + follow my dreams and inspire others. + + + + + + + + + ); +} +``` + + +--- + + +## Tailwind CSS Profile Card - React + + +Showcase user information in a concise way by using this card example. Use high-quality images for a better effect. This type of card is usually used for team member pages, author bio, and user profiles. + +}> ```jsx import { Card, @@ -181,17 +217,17 @@ import { Tooltip, } from "@material-tailwind/react"; -export default function Example() { +export function ProfileCard() { return ( - profile-picture + profile-picture Natalie Paisley - + CEO / Co-Founder @@ -238,45 +274,13 @@ export default function Example() { --- + ## Tailwind CSS Login Card - React + - - - - {`Sign In`} - - - - - -
- -
-
- - - - {`Don't have an account?`} - - {`Sign up`} - - - -
-}> +This login card is perfect for sections that require user authentication. It contains the usual information for a smooth authentication process. + +}> ```jsx import { Card, @@ -289,12 +293,12 @@ import { Button, } from "@material-tailwind/react"; -export default function Example() { +export function LoginCard() { return ( @@ -313,12 +317,12 @@ export default function Example() { Sign In - Don't have an account? + Don't have an account? Sign up @@ -333,79 +337,13 @@ export default function Example() { --- + ## Tailwind CSS Pricing Card - React + - - - - standard - - - $29{" "} - /mo - - - -
    -
  • - - - - 5 team members -
  • -
  • - - - - 200+ components -
  • -
  • - - - - 40+ built-in pages -
  • -
  • - - - - 1 year free updates -
  • -
  • - - - - Life time technical support -
  • -
-
- - - -
-}> +This beautiful pricing card will present the pricing plans for the products. It is perfect if you want the highlight the product's features. + +}> ```jsx import { Card, @@ -415,11 +353,29 @@ import { Typography, Button, } from "@material-tailwind/react"; -import { CheckIcon } from "@heroicons/react/24/outline"; -export default function Example() { +function CheckIcon() { return ( - + + + + ); +} + +export function PricingCard() { + return ( +
  • - + 5 team members
  • - + 200+ components
  • - + 40+ built-in pages
  • - + 1 year free updates
  • - + - Life time technical support + + Life time technical support +
  • @@ -480,7 +438,7 @@ export default function Example() { - -
    -}> +If you have a service booking section on your website, this card if what you will need! The tooltips are used to show the most important features in a user friendly way. + +}> ```jsx import { Card, @@ -782,17 +600,8 @@ import { Tooltip, IconButton, } from "@material-tailwind/react"; -import { - BanknotesIcon, - StarIcon, - HeartIcon, - WifiIcon, - HomeIcon, - TvIcon, - FireIcon, -} from "@heroicons/react/24/solid"; - -export default function Example() { + +export function BookingCard() { return ( @@ -807,7 +616,14 @@ export default function Example() { variant="text" className="!absolute top-4 right-4 rounded-full" > - + + + @@ -819,7 +635,18 @@ export default function Example() { color="blue-gray" className="flex items-center gap-1.5 font-normal" > - + + + 5.0
    @@ -829,32 +656,87 @@ export default function Example() {
    - - + + + + + + - - + + + + - - + + + + + - - + + + + + - - + + + + - + +20 @@ -873,47 +755,13 @@ export default function Example() { --- + ## Tailwind CSS Testimonial Card - React + - - - -
    -
    - - Candice Wu - -
    - - - - - -
    -
    - Frontend Lead @ Google -
    -
    - - - "I found solution to all my design needs from Creative Tim. I use - them as a freelancer in my hobby projects for fun! And its really - affordable, very humble guys !!!" - - - -}> +The testimonial section is a necessary component of any website. Use our card example to create a beautiful testimonial section. + +}> ```jsx import { Card, @@ -922,9 +770,25 @@ import { Typography, Avatar, } from "@material-tailwind/react"; -import { StarIcon } from "@heroicons/react/24/solid"; -export default function Example() { +function StarIcon() { + return ( + + + + ); +} + +export function TestimonialCard() { return (
    - Candice Wu + Tania Andrew
    - - - - - + + + + +
    Frontend Lead @ Google @@ -968,5 +832,1134 @@ export default function Example() { ``` - - +--- + + +## Tailwind CSS Horizontal Card - React + + +Here is an example of a simple horizontal card that you can use to showcase the information. + +}> +```jsx +import { + Card, + CardHeader, + CardBody, + Typography, + Button, +} from "@material-tailwind/react"; + +export function HorizontalCard() { + return ( + + + card-image + + + + startups + + + Lyft launching cross-platform service this week + + + Like so many organizations these days, Autodesk is a company in + transition. It was until recently a traditional boxed software company + selling licenses. Yet its own business model disruption is only part + of the story + + + + + + + ); +} +``` + + +--- + + +## Tailwind CSS Ecommerce Card - React + + +This ecommerce card is a must for any E-commerce website! Right? + +}> +```jsx +import { + Card, + CardHeader, + CardBody, + CardFooter, + Typography, + Button, +} from "@material-tailwind/react"; + +export function EcommerceCard() { + return ( + + + card-image + + +
    + + Apple AirPods + + + $95.00 + +
    + + With plenty of talk and listen time, voice-activated Siri access, and + an available wireless charging case. + +
    + + + +
    + ); +} +``` +
    + +--- + + +## Tailwind CSS Card with list - React + + + +}> +```jsx +import { Card, CardBody, Typography, Avatar } from "@material-tailwind/react"; + +const customers = [ + { + name: "Tania Andrew", + email: "tania@gmail.com", + price: 400, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-1.jpg", + }, + { + name: "John Micheal", + email: "john@gmail.com", + price: 420, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-6.jpg", + }, + { + name: "Alexa Liras", + email: "alexa@gmail.com", + price: 340, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-2.jpg", + }, + { + name: "Richard Gran", + email: "richard@gmail.com", + price: 520, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-3.jpg", + }, + { + name: "Micheal Levi", + email: "levi@gmail.com", + price: 780, + image: + "https://demos.creative-tim.com/test/corporate-ui-dashboard/assets/img/team-4.jpg", + }, +]; + +export function CardWithList() { + return ( + + +
    + + Latest Customers + + + View all + +
    +
    + {customers.map(({ name, email, price, image }, index) => ( +
    +
    + +
    + + {name} + + + {email} + +
    +
    + + ${price} + +
    + ))} +
    +
    +
    + ); +} +``` +
    + +--- + + +## Card Props + + +The following props are available for card component. These are the custom props +that we've added for the card component and you can use all the other native +props as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | ----------------------------- | -------------------------------------- | +| `variant` | [Variant](#types-variant) | Change card variant | filled | +| `color` | [Color](#types-color) | Change card color | white | +| `shadow` | boolean | Add box-shadow for card | true | +| `className` | string | Add custom className for card | `''` | +| `children` | node | Add content for card | No default value it's a required prop. | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardProps } from "@material-tailwind/react"; +``` + +--- + + +## Card Header Props + + +The following props are available for card header component. These are the custom +props that we've added for the card header component and you can use all +the other native props as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | ------------------------------------ | -------------------------------------- | +| `variant` | [Variant](#types-variant) | Change card header variant | filled | +| `color` | [Color](#types-color) | Change card header color | white | +| `shadow` | boolean | Add box-shadow for card header | true | +| `floated` | boolean | Makes card header floated | true | +| `className` | string | Add custom className for card header | `''` | +| `children` | node | Add content for card header | No default value it's a required prop. | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardHeaderProps } from "@material-tailwind/react"; +``` + +--- + + +## Card Body Props + + +The following props are available for card body component. These are the custom props +that we've added for the card body component and you can use all the other +native props as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------- | ---------------------------------- | -------------------------------------- | +| `className` | string | Add custom className for card body | `''` | +| `children` | node | Add content for card body | No default value it's a required prop. | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardBodyProps } from "@material-tailwind/react"; +``` + +--- + + +## Card Footer Props + + + +The following props are available for card footer component. These are the custom +props that we've added for the card footer component and you can use all +the other native props as well. + +| Attribute | Type | Description | Default | +| ----------- | -------------------- | ------------------------------------ | -------------------------------------- | +| `divider` | boolean | Add border-top for card footer | false | +| `className` | string | Add custom className for card footer | `''` | +| `children` | node | Add content for card footer | No default value it's a required prop. | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardFooterProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Variant + + +```ts +type variant = "filled" | "gradient"; +``` + +--- + + +## Types - Color + + +```ts +type color = + | "transparent" + | "white" + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Card Theme + + +Learn how to customize the theme and styles for card components, the theme object for card components has three main objects: + +**A.** The defaultProps object for setting up the default value for props of card component.
    +**B.** The valid object for customizing the valid values for card component props.
    +**C.** The styles object for customizing the theme and styles of card component.
    + +You can customize the theme and styles of card components by adding Tailwind CSS classes as key paired values for objects. + +
    +
    + + +## Card Theme Object Type + + +```ts +interface CardStylesType { + defaultProps: { + variant: string; + color: string; + shadow: boolean; + className: string; + }; + valid: { + variants: string[]; + colors: string[]; + }; + styles: { + base: { + initial: object; + shadow: object; + }; + variants: { + filled: object; + gradient: object; + }; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Card Theme Customization + + +```tsx +const theme = { + card: { + defaultProps: { + variant: "filled", + color: "white", + shadow: true, + className: "", + }, + valid: { + variants: ["filled", "gradient"], + colors: [ + "transparent", + "white", + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + initial: { + position: "relative", + display: "flex", + flexDirection: "flex-col", + backgroundClip: "bg-clip-border", + borderRadius: "rounded-xl", + }, + shadow: { + boxShadow: "shadow-md", + }, + }, + variants: { + filled: { + transparent: { + backgroud: "bg-transparent", + color: "text-gray-700", + shadow: "shadow-none", + }, + white: { + backgroud: "bg-white", + color: "text-gray-700", + }, + "blue-gray": { + backgroud: "bg-blue-gray-500", + color: "text-white", + shadow: "shadow-blue-gray-500/40", + }, + gray: { + backgroud: "bg-gray-500", + color: "text-white", + shadow: "shadow-gray-500/40", + }, + brown: { + backgroud: "bg-brown-500", + color: "text-white", + shadow: "shadow-brown-500/40", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500", + color: "text-white", + shadow: "shadow-deep-orange-500/40", + }, + orange: { + backgroud: "bg-orange-500", + color: "text-white", + shadow: "shadow-orange-500/40", + }, + amber: { + backgroud: "bg-amber-500", + color: "text-gray-700", + shadow: "shadow-amber-500/40", + }, + yellow: { + backgroud: "bg-yellow-500", + color: "text-gray-700", + shadow: "shadow-yellow-500/40", + }, + lime: { + backgroud: "bg-lime-500", + color: "text-gray-700", + shadow: "shadow-lime-500/40", + }, + "light-green": { + backgroud: "bg-light-green-500", + color: "text-white", + shadow: "shadow-light-green-500/40", + }, + green: { + backgroud: "bg-green-500", + color: "text-white", + shadow: "shadow-green-500/40", + }, + teal: { + backgroud: "bg-teal-500", + color: "text-white", + shadow: "shadow-teal-500/40", + }, + cyan: { + backgroud: "bg-cyan-500", + color: "text-white", + shadow: "shadow-cyan-500/40", + }, + "light-blue": { + backgroud: "bg-light-blue-500", + color: "text-white", + shadow: "shadow-light-blue-500/40", + }, + blue: { + backgroud: "bg-blue-500", + color: "text-white", + shadow: "shadow-blue-500/40", + }, + indigo: { + backgroud: "bg-indigo-500", + color: "text-white", + shadow: "shadow-indigo-500/40", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500", + color: "text-white", + shadow: "shadow-deep-purple-500/40", + }, + purple: { + backgroud: "bg-purple-500", + color: "text-white", + shadow: "shadow-purple-500/40", + }, + pink: { + backgroud: "bg-pink-500", + color: "text-white", + shadow: "shadow-pink-500/40", + }, + red: { + backgroud: "bg-red-500", + color: "text-white", + shadow: "shadow-red-500/40", + }, + }, + gradient: { + transparent: { + backgroud: "bg-transparent", + color: "text-gray-700", + shadow: "shadow-none", + }, + white: { + backgroud: "bg-white", + color: "text-gray-700", + }, + "blue-gray": { + backgroud: "bg-gradient-to-tr from-blue-gray-600 to-blue-gray-400", + color: "text-white", + shadow: "shadow-blue-gray-500/40", + }, + gray: { + backgroud: "bg-gradient-to-tr from-gray-600 to-gray-400", + color: "text-white", + shadow: "shadow-gray-500/40", + }, + brown: { + backgroud: "bg-gradient-to-tr from-brown-600 to-brown-400", + color: "text-white", + shadow: "shadow-brown-500/40", + }, + "deep-orange": { + backgroud: "bg-gradient-to-tr from-deep-orange-600 to-deep-orange-400", + color: "text-white", + shadow: "shadow-deep-orange-500/40", + }, + orange: { + backgroud: "bg-gradient-to-tr from-orange-600 to-orange-400", + color: "text-white", + shadow: "shadow-orange-500/40", + }, + amber: { + backgroud: "bg-gradient-to-tr from-amber-600 to-amber-400", + color: "text-gray-700", + shadow: "shadow-amber-500/40", + }, + yellow: { + backgroud: "bg-gradient-to-tr from-yellow-600 to-yellow-400", + color: "text-gray-700", + shadow: "shadow-yellow-500/40", + }, + lime: { + backgroud: "bg-gradient-to-tr from-lime-600 to-lime-400", + color: "text-gray-700", + shadow: "shadow-lime-500/40", + }, + "light-green": { + backgroud: "bg-gradient-to-tr from-light-green-600 to-light-green-400", + color: "text-white", + shadow: "shadow-light-green-500/40", + }, + green: { + backgroud: "bg-gradient-to-tr from-green-600 to-green-400", + color: "text-white", + shadow: "shadow-green-500/40", + }, + teal: { + backgroud: "bg-gradient-to-tr from-teal-600 to-teal-400", + color: "text-white", + shadow: "shadow-teal-500/40", + }, + cyan: { + backgroud: "bg-gradient-to-tr from-cyan-600 to-cyan-400", + color: "text-white", + shadow: "shadow-cyan-500/40", + }, + "light-blue": { + backgroud: "bg-gradient-to-tr from-light-blue-600 to-light-blue-400", + color: "text-white", + shadow: "shadow-light-blue-500/40", + }, + blue: { + backgroud: "bg-gradient-to-tr from-blue-600 to-blue-400", + color: "text-white", + shadow: "shadow-blue-500/40", + }, + indigo: { + backgroud: "bg-gradient-to-tr from-indigo-600 to-indigo-400", + color: "text-white", + shadow: "shadow-indigo-500/40", + }, + "deep-purple": { + backgroud: "bg-gradient-to-tr from-deep-purple-600 to-deep-purple-400", + color: "text-white", + shadow: "shadow-deep-purple-500/40", + }, + purple: { + backgroud: "bg-gradient-to-tr from-purple-600 to-purple-400", + color: "text-white", + shadow: "shadow-purple-500/40", + }, + pink: { + backgroud: "bg-gradient-to-tr from-pink-600 to-pink-400", + color: "text-white", + shadow: "shadow-pink-500/40", + }, + red: { + backgroud: "bg-gradient-to-tr from-red-600 to-red-400", + color: "text-white", + shadow: "shadow-red-500/40", + }, + }, + }, + }, + }, +}; +``` + +--- + + +## Card Header Theme Object Type + + +```ts +interface CardHeaderStylesType { + defaultProps: { + variant: string; + color: string; + shadow: boolean; + floated: boolean; + className: string; + }; + valid: { + variants: string[]; + colors: string[]; + }; + styles: { + base: { + initial: object; + shadow: object; + floated: object; + }; + variants: { + filled: object; + gradient: object; + }; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardHeaderStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Card Header Theme Customization + + + + +```tsx +const theme = { + cardHeader: { + defaultProps: { + variant: "filled", + color: "white", + shadow: true, + floated: true, + className: "", + }, + valid: { + variants: ["filled", "gradient"], + colors: [ + "transparent", + "white", + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + initial: { + position: "relative", + backgroundClip: "bg-clip-border", + mt: "mt-4", + mx: "mx-4", + borderRadius: "rounded-xl", + overflow: "overflow-hidden", + }, + shadow: { + boxShadow: "shadow-lg", + }, + floated: { + mt: "-mt-6", + }, + }, + variants: { + filled: { + transparent: { + backgroud: "bg-transparent", + color: "text-gray-700", + shadow: "shadow-none", + }, + white: { + backgroud: "bg-white", + color: "text-gray-700", + }, + "blue-gray": { + backgroud: "bg-blue-gray-500", + color: "text-white", + shadow: "shadow-blue-gray-500/40", + }, + gray: { + backgroud: "bg-gray-500", + color: "text-white", + shadow: "shadow-gray-500/40", + }, + brown: { + backgroud: "bg-brown-500", + color: "text-white", + shadow: "shadow-brown-500/40", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500", + color: "text-white", + shadow: "shadow-deep-orange-500/40", + }, + orange: { + backgroud: "bg-orange-500", + color: "text-white", + shadow: "shadow-orange-500/40", + }, + amber: { + backgroud: "bg-amber-500", + color: "text-gray-700", + shadow: "shadow-amber-500/40", + }, + yellow: { + backgroud: "bg-yellow-500", + color: "text-gray-700", + shadow: "shadow-yellow-500/40", + }, + lime: { + backgroud: "bg-lime-500", + color: "text-gray-700", + shadow: "shadow-lime-500/40", + }, + "light-green": { + backgroud: "bg-light-green-500", + color: "text-white", + shadow: "shadow-light-green-500/40", + }, + green: { + backgroud: "bg-green-500", + color: "text-white", + shadow: "shadow-green-500/40", + }, + teal: { + backgroud: "bg-teal-500", + color: "text-white", + shadow: "shadow-teal-500/40", + }, + cyan: { + backgroud: "bg-cyan-500", + color: "text-white", + shadow: "shadow-cyan-500/40", + }, + "light-blue": { + backgroud: "bg-light-blue-500", + color: "text-white", + shadow: "shadow-light-blue-500/40", + }, + blue: { + backgroud: "bg-blue-500", + color: "text-white", + shadow: "shadow-blue-500/40", + }, + indigo: { + backgroud: "bg-indigo-500", + color: "text-white", + shadow: "shadow-indigo-500/40", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500", + color: "text-white", + shadow: "shadow-deep-purple-500/40", + }, + purple: { + backgroud: "bg-purple-500", + color: "text-white", + shadow: "shadow-purple-500/40", + }, + pink: { + backgroud: "bg-pink-500", + color: "text-white", + shadow: "shadow-pink-500/40", + }, + red: { + backgroud: "bg-red-500", + color: "text-white", + shadow: "shadow-red-500/40", + }, + }, + gradient: { + transparent: { + backgroud: "bg-transparent", + color: "text-gray-700", + shadow: "shadow-none", + }, + white: { + backgroud: "bg-white", + color: "text-gray-700", + }, + "blue-gray": { + backgroud: "bg-gradient-to-tr from-blue-gray-600 to-blue-gray-400", + color: "text-white", + shadow: "shadow-blue-gray-500/40", + }, + gray: { + backgroud: "bg-gradient-to-tr from-gray-600 to-gray-400", + color: "text-white", + shadow: "shadow-gray-500/40", + }, + brown: { + backgroud: "bg-gradient-to-tr from-brown-600 to-brown-400", + color: "text-white", + shadow: "shadow-brown-500/40", + }, + "deep-orange": { + backgroud: "bg-gradient-to-tr from-deep-orange-600 to-deep-orange-400", + color: "text-white", + shadow: "shadow-deep-orange-500/40", + }, + orange: { + backgroud: "bg-gradient-to-tr from-orange-600 to-orange-400", + color: "text-white", + shadow: "shadow-orange-500/40", + }, + amber: { + backgroud: "bg-gradient-to-tr from-amber-600 to-amber-400", + color: "text-gray-700", + shadow: "shadow-amber-500/40", + }, + yellow: { + backgroud: "bg-gradient-to-tr from-yellow-600 to-yellow-400", + color: "text-gray-700", + shadow: "shadow-yellow-500/40", + }, + lime: { + backgroud: "bg-gradient-to-tr from-lime-600 to-lime-400", + color: "text-gray-700", + shadow: "shadow-lime-500/40", + }, + "light-green": { + backgroud: "bg-gradient-to-tr from-light-green-600 to-light-green-400", + color: "text-white", + shadow: "shadow-light-green-500/40", + }, + green: { + backgroud: "bg-gradient-to-tr from-green-600 to-green-400", + color: "text-white", + shadow: "shadow-green-500/40", + }, + teal: { + backgroud: "bg-gradient-to-tr from-teal-600 to-teal-400", + color: "text-white", + shadow: "shadow-teal-500/40", + }, + cyan: { + backgroud: "bg-gradient-to-tr from-cyan-600 to-cyan-400", + color: "text-white", + shadow: "shadow-cyan-500/40", + }, + "light-blue": { + backgroud: "bg-gradient-to-tr from-light-blue-600 to-light-blue-400", + color: "text-white", + shadow: "shadow-light-blue-500/40", + }, + blue: { + backgroud: "bg-gradient-to-tr from-blue-600 to-blue-400", + color: "text-white", + shadow: "shadow-blue-500/40", + }, + indigo: { + backgroud: "bg-gradient-to-tr from-indigo-600 to-indigo-400", + color: "text-white", + shadow: "shadow-indigo-500/40", + }, + "deep-purple": { + backgroud: "bg-gradient-to-tr from-deep-purple-600 to-deep-purple-400", + color: "text-white", + shadow: "shadow-deep-purple-500/40", + }, + purple: { + backgroud: "bg-gradient-to-tr from-purple-600 to-purple-400", + color: "text-white", + shadow: "shadow-purple-500/40", + }, + pink: { + backgroud: "bg-gradient-to-tr from-pink-600 to-pink-400", + color: "text-white", + shadow: "shadow-pink-500/40", + }, + red: { + backgroud: "bg-gradient-to-tr from-red-600 to-red-400", + color: "text-white", + shadow: "shadow-red-500/40", + }, + }, + }, + }, + }, +}; +``` + +--- + + +## Card Body Theme Object Type + + +```ts +interface CardBodyStylesType { + defaultProps: { + className: string; + }; + styles: { + base: object; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardBodyStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Card Body Theme Customization + + +```tsx +const theme = { + cardBody: { + defaultProps: { + className: "", + }, + styles: { + base: { + p: "p-6", + }, + }, + }, +}; +``` + +--- + + +## Card Footer Theme Object Type + + +```ts +interface CardFooterStylesType { + defaultProps: { + className: string; + divider: boolean; + }; + styles: { + base: { + initial: object; + divider: object; + }; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import type { CardFooterStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Card Footer Theme Customization + + + + +```tsx +const theme = { + cardFooter: { + defaultProps: { + className: "", + }, + styles: { + base: { + initial: { + p: "p-6", + }, + divider: { + borderWidth: "border-t", + borderColor: "border-blue-gray-50", + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/carousel.mdx b/documentation/react/carousel.mdx new file mode 100644 index 000000000..5432a4a6d --- /dev/null +++ b/documentation/react/carousel.mdx @@ -0,0 +1,587 @@ +--- +title: Tailwind CSS Carousel for React - Material Tailwind +description: Customise your web projects with our easy-to-use carousel component for Tailwind CSS and React using Material Design guidelines. +navigation: + [ + "carousel", + "carousel-with-content", + "carousel-transition", + "carousel-custom-arrows", + "carousel-custom-navigation", + "carousel-props", + "types-prev-arrow", + "types-next-arrow", + "types-navigation", + "types-slide-ref", + "carousel-theme", + "carousel-theme-object-type", + "carousel-theme-customization" + ] +github: carousel +prev: collapse +next: dialog +--- + + +# Tailwind CSS Carousel - React + + +Use our Tailwind CSS carousel for your website for sliding through multiple elements or images. + +See below our simple Carousel example that you can use in your Tailwind CSS and React project. + +
    + +}> +```jsx +import { Carousel } from "@material-tailwind/react"; + +export function CarouselDefault() { + return ( + + image 1 + image 2 + image 3 + + ); +} +``` + + +--- + + +## Carousel With Content + + +Use the example below for a complex carousel example with more content. + +}> +```jsx +import { Carousel, Typography, Button } from "@material-tailwind/react"; + +export function CarouselWithContent() { + return ( + +
    + image 1 +
    +
    + + The Beauty of Nature + + + It is not so much for its beauty that the forest makes a claim + upon men's hearts, as for that subtle something, that quality + of air that emanation from old trees, that so wonderfully changes + and renews a weary spirit. + +
    + + +
    +
    +
    +
    +
    + image 2 +
    +
    + + The Beauty of Nature + + + It is not so much for its beauty that the forest makes a claim + upon men's hearts, as for that subtle something, that quality + of air that emanation from old trees, that so wonderfully changes + and renews a weary spirit. + +
    + + +
    +
    +
    +
    +
    + image 3 +
    +
    + + The Beauty of Nature + + + It is not so much for its beauty that the forest makes a claim + upon men's hearts, as for that subtle something, that quality + of air that emanation from old trees, that so wonderfully changes + and renews a weary spirit. + +
    + + +
    +
    +
    +
    +
    + ); +} +``` +
    + +--- + + +## Carousel Transition + + +You can change the carousel transition using the transition prop, you can pass the transition duration as seconds for transition prop. + +}> +```jsx +import { Carousel } from "@material-tailwind/react"; + +export function CarouselTransition() { + return ( + + image 1 + image 2 + image 3 + + ); +} +``` + + +--- + + +## Carousel Custom Arrows + + +You can change the carousel arrows using the prevArrow and nextArrow props. + +}> +```jsx +import { Carousel, IconButton } from "@material-tailwind/react"; + +export function CarouselCustomArrows() { + return ( + ( + + + + + + )} + nextArrow={({ handleNext }) => ( + + + + + + )} + > + image 1 + image 2 + image 3 + + ); +} +``` + + +--- + + +## Carousel Custom Navigation + + +You can change the carousel bottom navigation using the navigation prop. + +}> +```jsx +import { Carousel } from "@material-tailwind/react"; + +export function CarouselCustomNavigation() { + return ( + ( +
    + {new Array(length).fill("").map((_, i) => ( + setActiveIndex(i)} + /> + ))} +
    + )} + > + image 1 + image 2 + image 3 +
    + ); +} +``` +
    + +--- + + +## Carousel Props + + +The following props are available for carousel component. These are the custom props +that we've added for the carousel component and you can use all the other native +props as well. + +| Attribute | Type | Description | Default | +| --------------- | ------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `prevArrow` | [Prev Arrow](#types-prev-arrow) | Change the previous arrow component for carousel | Arrow | +| `nextArrow` | [Next Arrow](#types-next-arrow) | Change the next arrow component for carousel | Arrow | +| `navigation` | [Navigation](#types-navigation) | Change the navigation component for carousel | Dots | +| `slideRef` | [Slide Ref](#types-slide-ref) | Add reference for the carousel slide | undefined | +| `autoplay` | boolean | Sets the autoplay mode for carousel | false | +| `autoplayDelay` | number | Sets the interval duration for autoplay mode in miliseconds | 5000 | +| `transition` | Framer Motion | Sets the transition for carousel | `transition: { type: "tween", duration: 0.5 }` | +| `loop` | boolean | Sets the looping mode for the carousel | false | +| `className` | string | Add custom className for card | `''` | +| `children` | node | Add content for card | No default value it's a required prop. | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CarouselProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Prev Arrow + + +```ts +type prevArrow = (args: { + loop: boolean; + handlePrev: () => void; + activeIndex: number; + firstIndex: boolean; +}) => React.ReactNode | void; +``` + +--- + + +## Types - Next Arrow + + +```ts +type nextArrow = (args: { + loop: boolean; + handleNext: () => void; + activeIndex: number; + lastIndex: boolean; +}) => React.ReactNode | void; +``` + +--- + + +## Types - Navigation + + +```ts +type navigation = (args: { + setActiveIndex: React.Dispatch>; + activeIndex: number; + length: number; +}) => React.ReactNode | void; +``` + +--- + + +## Types - Slide Reference + + +```ts +export type slideRef = React.Ref; +``` + +--- + + +## Carousel Theme + + +Learn how to customize the theme and styles for carousel component, the theme object for carousel component has two main objects: + +**A.** The defaultProps object for setting up the default value for props of carousel component.
    +**B.** The styles object for customizing the theme and styles of carousel component.
    + +You can customize the theme and styles of carousel component by adding Tailwind CSS classes as key paired values for objects. + +
    +
    + + +## Carousel Theme Object Type + + +```ts +interface CarouselStylesType { + defaultProps: { + prevArrow: (args: { + loop: boolean; + handlePrev: () => void; + activeIndex: number; + firstIndex: boolean; + }) => React.ReactNode | void; + nextArrow: (args: { + loop: boolean; + handleNext: () => void; + activeIndex: number; + lastIndex: boolean; + }) => React.ReactNode | void; + navigation: (args: { + setActiveIndex: React.Dispatch>; + activeIndex: number; + length: number; + }) => React.ReactNode | void; + transition: object; + autoplay: boolean; + autoplayDelay: number; + loop: boolean; + className: string; + }; + styles: { + base: { + carousel: object; + slide: object; + }; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import { CarouselStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Carousel Theme Customization + + +```tsx +const theme = { + carousel: { + defaultProps: { + prevArrow: ({ loop, handlePrev, firstIndex }) => { + return ( + + ); + }, + nextArrow: ({ loop, handleNext, lastIndex }) => ( + + ), + navigation: ({ setActiveIndex, activeIndex, length }) => ( +
    + {new Array(length).fill("").map((_, i) => ( + setActiveIndex(i)} + /> + ))} +
    + ), + autoplay: false, + autoplayDelay: 5000, + transition: { + type: "tween", + duration: 0.5, + }, + loop: false, + className: "", + }, + styles: { + base: { + carousel: { + position: "relative", + width: "w-full", + height: "h-full", + overflowX: "overflow-x-hidden", + display: "flex", + }, + + slide: { + width: "w-full", + height: "h-full", + display: "inline-block", + flex: "flex-none", + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/checkbox.mdx b/documentation/react/checkbox.mdx index ce0122583..d66fd8d9c 100644 --- a/documentation/react/checkbox.mdx +++ b/documentation/react/checkbox.mdx @@ -5,31 +5,29 @@ navigation: [ "checkbox", "checkbox-colors", - "checkbox-with-label", + "checkbox-label", "checkbox-custom-icon", "checkbox-ripple-effect", - "props", - "theme", - ] -related: - [ - { - title: "Props", - route: "props/checkbox", - description: "Learn more about props definition and types of checkbox component.", - }, - { - title: "Theme", - route: "theme/checkbox", - description: "Learn how to customize the theme and styles for checkbox component.", - }, + "disabled-checkbox", + "checkbox-with-link", + "checkbox-with-description", + "checkbox-vertical-list-group", + "checkbox-horizontal-list-group", + "checkbox-custom-styles", + "checkbox-props", + "types-color", + "checkbox-theme", + "checkbox-theme-object-type", + "checkbox-theme-customization" ] github: checkbox prev: card next: chip --- + # Tailwind CSS Checkbox - React + Use our Tailwind CSS Checkbox to allow the user to select one or more items from a set. @@ -43,11 +41,11 @@ See below our simple Checkbox example that you can use in your Reac
    -}> +}> ```jsx import { Checkbox } from "@material-tailwind/react"; -export default function Example() { +export function CheckboxDefault() { return ; } ``` @@ -55,26 +53,17 @@ export default function Example() { --- + ## Checkbox Colors + The Checkbox component comes with 19 different colors that you can change it using the color prop. - - - - - - - - - -
    -}> +}> ```jsx import { Checkbox } from "@material-tailwind/react"; -export default function Colors() { +export function CheckboxColors() { return (
    @@ -93,15 +82,17 @@ export default function Colors() { --- -## Checkbox with Label + +## Checkbox Label + You can add a label for the Checkbox component by passing the label prop to the Checkbox component. -}> +}> ```jsx import { Checkbox } from "@material-tailwind/react"; -export default function Example() { +export function CheckboxLabel() { return ; } ``` @@ -109,33 +100,17 @@ export default function Example() { --- + ## Checkbox Custom Icon + You can add a custom icon for the Checkbox component when it's checked by passing the icon prop to the Checkbox component. - - - - } - defaultChecked - /> -}> +}> ```jsx import { Checkbox } from "@material-tailwind/react"; -export default function Example() { +export function CheckboxCustomIcon() { return ( ## Checkbox Ripple Effect + You can turn on/off the ripple effect for the Checkbox component using the ripple prop. - - - - -}> +}> ```jsx -import { Fragment } from "react"; import { Checkbox } from "@material-tailwind/react"; -export default function Example() { +export function CheckboxRippleEffect() { return ( - + <> - + + ); +} +``` + + +--- + + +## Disabled Checkbox + + +You can make a checkbox disable by passing the disabled prop to the Checkbox component. + +}> +```jsx +import { Checkbox } from "@material-tailwind/react"; + +export function DisabledCheckbox() { + return ; +} +``` + + +--- + + +## Checkbox with Link + + +The label prop for the the checkbox can accept dom elements and because of that you can put links or any other dom elements you like to have with your checkbox label. + +}> +```jsx +import { Checkbox, Typography } from "@material-tailwind/react"; + +export function CheckboxWithLink() { + return ( + + I agree with the + +  terms and conditions + + . + + } + /> + ); +} +``` + + +--- + + +## Checkbox With Description + + +Use the example below for a more complex usage of checkbox with label that contains some description. + +}> +```jsx +import { Checkbox, Typography } from "@material-tailwind/react"; + +export function CheckboxWithDescription() { + return ( + + + Remember Me + + + You'll be able to login without password for 24 hours. + +
    + } + containerProps={{ + className: "-mt-5", + }} + /> + ); +} +``` +
    + +--- + + +## Checkbox Vertical List Group + + +Use the example below for a vertical list of checkboxes. + +}> +```jsx +import { + Checkbox, + Card, + List, + ListItem, + ListItemPrefix, + Typography, +} from "@material-tailwind/react"; + +export function CheckboxVerticalListGroup() { + return ( + + + + + + + + + + + + + + ); +} +``` + + +--- + + +## Checkbox Horizontal List Group + + +Use the example below for a horizontal list of checkboxes. + +}> +```jsx +import { + Checkbox, + Card, + List, + ListItem, + ListItemPrefix, + Typography, +} from "@material-tailwind/react"; + +export function CheckboxHorizontalListGroup() { + return ( + + + + + + + + + + + + + + ); +} +``` + + +--- + + +## Checkbox Custom Styles + + +You can use the className prop to add custom styles to the Checkbox component. + +}> +```jsx +import { Checkbox } from "@material-tailwind/react"; + +export function CheckboxCustomStyles() { + return ( + ); } ``` - - +--- + + +## Checkbox Props + + +The following props are available for checkbox component. These are the custom props +that we've added for the checkbox component and you can use all the other native +input props as well. + +| Attribute | Type | Description | Default | +| ---------------- | --------------------- | --------------------------------------------- | ---------------------- | +| `color` | [Color](#types-color) | Change checkbox color | gray | +| `label` | node | Add label for checkbox | undefined | +| `icon` | node | Change checked icon for checkbox | undefined | +| `ripple` | boolean | Add ripple effect for checkbox | true | +| `className` | string | Add custom className for checkbox | `''` | +| `disabled` | boolean | Makes the checkbox disabled | false | +| `containerProps` | object | Add custom props for checkbox container | undefined | +| `labelProps` | object | Add custom props for checkbox label | undefined | +| `iconProps` | object | Add custom props for checkbox icon | undefined | +| `inputRef` | ref | Add reference for input element. | undefined | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CheckboxProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Color + + +```ts +type color = + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Checkbox Theme + + +Learn how to customize the theme and styles for checkbox component, the theme object for checkbox component has three main objects: + +**A.** The defaultProps object for setting up the default value for props of checkbox component.
    +**B.** The valid object for customizing the valid values for checkbox component props.
    +**C.** The styles object for customizing the theme and styles of checkbox component.
    + +You can customize the theme and styles of checkbox component by adding Tailwind CSS classes as key paired values for objects. + +
    +
    + + +## Checkbox Theme Object Type + + +```ts +interface CheckboxStylesType { + defaultProps: { + color: string; + label: string; + icon: node; + ripple: boolean; + className: string; + disabled: boolean; + containerProps: object; + labelProps: object; + iconProps: object; + }; + valid: { + colors: string[]; + }; + styles: { + base: { + root: object; + container: object; + input: object; + label: object; + icon: object; + disabled: object; + }; + colors: object; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import type { CheckboxStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Checkbox Theme Customization + + +```ts +const theme = { + checkbox: { + defaultProps: { + color: "blue", + label: undefined, + icon: undefined, + ripple: true, + className: "", + disabled: false, + containerProps: undefined, + labelProps: undefined, + iconProps: undefined, + }, + valid: { + colors: [ + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + root: { + display: "inline-flex", + alignItems: "items-center", + }, + container: { + position: "relative", + display: "flex", + alignItems: "items-center", + cursor: "cursor-pointer", + p: "p-3", + borderRadius: "rounded-full", + }, + input: { + peer: "peer", + position: "relative", + appearance: "appearance-none", + width: "w-5", + height: "h-5", + borderWidth: "border", + borderRadius: "rounded-md", + borderColor: "border-blue-gray-200", + cursor: "cursor-pointer", + transition: "transition-all", + before: { + content: "before:content['']", + display: "before:block", + bg: "before:bg-blue-gray-500", + width: "before:w-12", + height: "before:h-12", + borderRadius: "before:rounded-full", + position: "before:absolute", + top: "before:top-2/4", + left: "before:left-2/4", + transform: "before:-translate-y-2/4 before:-translate-x-2/4", + opacity: "before:opacity-0 hover:before:opacity-10", + transition: "before:transition-opacity", + }, + }, + label: { + color: "text-gray-700", + fontWeight: "font-light", + userSelect: "select-none", + cursor: "cursor-pointer", + mt: "mt-px", + }, + icon: { + color: "text-white", + position: "absolute", + top: "top-2/4", + left: "left-2/4", + translate: "-translate-y-2/4 -translate-x-2/4", + pointerEvents: "pointer-events-none", + opacity: "opacity-0 peer-checked:opacity-100", + transition: "transition-opacity", + }, + disabled: { + opacity: "opacity-50", + pointerEvents: "pointer-events-none", + }, + }, + colors: { + "blue-gray": { + background: "checked:bg-blue-gray-500", + border: "checked:border-blue-gray-500", + before: "checked:before:bg-blue-gray-500", + }, + gray: { + background: "checked:bg-gray-500", + border: "checked:border-gray-500", + before: "checked:before:bg-gray-500", + }, + brown: { + background: "checked:bg-brown-500", + border: "checked:border-brown-500", + before: "checked:before:bg-brown-500", + }, + "deep-orange": { + background: "checked:bg-deep-orange-500", + border: "checked:border-deep-orange-500", + before: "checked:before:bg-deep-orange-500", + }, + orange: { + background: "checked:bg-orange-500", + border: "checked:border-orange-500", + before: "checked:before:bg-orange-500", + }, + amber: { + background: "checked:bg-amber-500", + border: "checked:border-amber-500", + before: "checked:before:bg-amber-500", + }, + yellow: { + background: "checked:bg-yellow-500", + border: "checked:border-yellow-500", + before: "checked:before:bg-yellow-500", + }, + lime: { + background: "checked:bg-lime-500", + border: "checked:border-lime-500", + before: "checked:before:bg-lime-500", + }, + "light-green": { + background: "checked:bg-light-green-500", + border: "checked:border-light-green-500", + before: "checked:before:bg-light-green-500", + }, + green: { + background: "checked:bg-green-500", + border: "checked:border-green-500", + before: "checked:before:bg-green-500", + }, + teal: { + background: "checked:bg-teal-500", + border: "checked:border-teal-500", + before: "checked:before:bg-teal-500", + }, + cyan: { + background: "checked:bg-cyan-500", + border: "checked:border-cyan-500", + before: "checked:before:bg-cyan-500", + }, + "light-blue": { + background: "checked:bg-light-blue-500", + border: "checked:border-light-blue-500", + before: "checked:before:bg-light-blue-500", + }, + blue: { + background: "checked:bg-blue-500", + border: "checked:border-blue-500", + before: "checked:before:bg-blue-500", + }, + indigo: { + background: "checked:bg-indigo-500", + border: "checked:border-indigo-500", + before: "checked:before:bg-indigo-500", + }, + "deep-purple": { + background: "checked:bg-deep-purple-500", + border: "checked:border-deep-purple-500", + before: "checked:before:bg-deep-purple-500", + }, + purple: { + background: "checked:bg-purple-500", + border: "checked:border-purple-500", + before: "checked:before:bg-purple-500", + }, + pink: { + background: "checked:bg-pink-500", + border: "checked:border-pink-500", + before: "checked:before:bg-pink-500", + }, + red: { + background: "checked:bg-red-500", + border: "checked:border-red-500", + before: "checked:before:bg-red-500", + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/chip.mdx b/documentation/react/chip.mdx index f852bd2cb..40cdc5dc3 100644 --- a/documentation/react/chip.mdx +++ b/documentation/react/chip.mdx @@ -5,33 +5,31 @@ navigation: [ "chip", "chip-variants", + "chip-sizes", "chip-colors", - "chip-with-icon", + "chip-icon", + "chip-pills", + "chip-with-status", + "chip-with-checkbox", "chip-dismissible", - "custom-chip-animation", + "chip-custom-animation", "chip-with-avatar", - "props", - "theme", - ] -related: - [ - { - title: "Props", - route: "props/chip", - description: "Learn more about props definition and types of chip component.", - }, - { - title: "Theme", - route: "theme/chip", - description: "Learn how to customize the theme and styles for chip component.", - }, + "chip-props", + "types-variant", + "types-color", + "types-animate", + "chip-theme", + "chip-theme-object-type", + "chip-theme-customization", ] github: chip prev: checkbox -next: dialog +next: collapse --- + # Tailwind CSS Chip - React + Get started on your web projects with our Tailwind CSS Chip which is a compact elements that represent an input, attribute, or action. This element appears dynamically as a group of multiple interactive elements and allows users to enter information, make selections, filter content, or trigger actions. @@ -39,11 +37,11 @@ See below our simple Chip component example that you can use for yo
    -}> +}> ```jsx import { Chip } from "@material-tailwind/react"; -export default function Example() { +export function ChipDefault() { return ; } ``` @@ -51,24 +49,47 @@ export default function Example() { --- + ## Chip Variants + -The Chip component comes with 2 different variants that you can change it using the variant prop. +The Chip component comes with 4 different variants that you can change it using the variant prop. - - - -
    -}> +}> ```jsx import { Chip } from "@material-tailwind/react"; -export default function Variants() { +export function ChipVariants() { return (
    - + + + +
    + ); +} +``` +
    + +--- + + +## Chip Sizes + + +The Chip component comes with 3 different sizes that you can change it using the size prop. + +}> +```jsx +import { Chip } from "@material-tailwind/react"; + +export function ChipSizes() { + return ( +
    + + +
    ); } @@ -77,27 +98,17 @@ export default function Variants() { --- + ## Chip Colors + The Chip component comes with 19 different colors that you can change it using the color prop. - - - - - - - - - - -
    -}> +}> ```jsx import { Chip } from "@material-tailwind/react"; -export default function Colors() { +export function ChipColors() { return (
    @@ -117,41 +128,105 @@ export default function Colors() { --- -## Chip with Icon + +## Chip Icon + You can add an icon at the beginning of Chip component using the icon prop. - - - - } - /> -}> +}> ```jsx import { Chip } from "@material-tailwind/react"; -export default function Example() { +function Icon() { return ( - - - - } - /> + + + + ); +} + +export function ChipIcon() { + return ( +
    + } /> + } /> + } /> + } /> +
    + ); +} +``` +
    + +--- + + +## Chip Pills + + +You can pass tailwind css classes for the Chip component using the className prop this helps to do any sort of customization for the chip. + +}> +```jsx +import { Chip } from "@material-tailwind/react"; + +export function ChipPills() { + return ( +
    + + + + +
    + ); +} +``` +
    + +--- + + +## Chip with Status + + +This chip element example is perfect if you want to announce the status of a particular item, process, or person. + +}> +```jsx +import { Chip } from "@material-tailwind/react"; + +export function ChipWithStatus() { + return ( +
    + + } + /> + + } + /> +
    ); } ``` @@ -159,64 +234,76 @@ export default function Example() { --- + +## Chip with Checkbox + + +Use this example to represent selectable items or options in a compact manner. + +}> +```jsx +import { Chip, Checkbox } from "@material-tailwind/react"; + +export function ChipWithCheckbox() { + return ( +
    + + } + /> + + } + /> +
    + ); +} +``` +
    + +--- + + ## Chip Dismissible + The Chip component is a dismissible component that you can control it using the dismissible and show props. - - - {({ setState, show }) => ( - <> - {!show && ( - - )} - setState((s) => ({ show: false })), - }} - value="Dismissible" - /> - - )} - - -}> +}> ```jsx -import { useState, Fragment } from "react"; +import React from "react"; import { Chip, Button } from "@material-tailwind/react"; -export default function Dismissible() { - const [show, setShow] = useState(true); +export function ChipDismissible() { + const [open, setOpen] = React.useState(true); return ( - - {!show && ( - )} - setShow(false), - }} - value="Dismissible" - /> - + setOpen(false)} /> + ); } ``` @@ -224,124 +311,63 @@ export default function Dismissible() { --- -## Custom Chip Animation + +## Chip Custom Animation + You can modify the open/close state animation for Chip component using the animate prop. - - - {({ setState, show }) => ( - <> - {!show && ( - - )} - setState((s) => ({ show: false })), - }} - value="Custom Animation" - /> - - )} - - -}> +}> ```jsx -import { useState, Fragment } from "react"; +import React from "react"; import { Chip, Button } from "@material-tailwind/react"; -export default function Colors() { - const [show, setShow] = useState(true); +export function ChipCustomAnimation() { + const [open, setOpen] = React.useState(true); return ( - - {!show && ( - )} setShow(false), - }} value="Custom Animation" + onClose={() => setOpen(false)} /> - + ); } -```` - +``` --- + ## Chip with Avatar + Use the example below for a chip containing an avatar. - - } - value={ - - Candice Wu - - } - color="teal" - className="rounded-full py-1.5" - /> -}> +}> ```jsx import { Chip, Avatar, Typography } from "@material-tailwind/react"; -export default function Example() { +export function ChipWithAvatar() { return ( } @@ -351,10 +377,9 @@ export default function Example() { color="white" className="font-medium capitalize leading-none" > - Candice Wu + Tania Andrew } - color="teal" className="rounded-full py-1.5" /> ); @@ -362,5 +387,596 @@ export default function Example() { ``` - - +--- + + +## Chip Props + + +The following props are available for button component. These are the custom props +that we've added for the chip component and you can use all the other native props +as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | --------------------------------------------- | -------------------------------------- | +| `variant` | [Variant](#types-variant) | Change chip variant | filled | +| `color` | [Color](#types-color) | Change chip color | gray | +| `value` | node | Add content for chip | No default value it's a required prop. | +| `onClose` | func | Callback for closing the chip component | undefined | +| `action` | node | Change the onClose action button | undefined | +| `open` | boolean | Change chip visibility | true | +| `animate` | [Animate](#types-animate) | Change chip animation | undefined | +| `icon` | node | Add icon at the beginning of chip | undefined | +| `className` | string | Add custom className for chip | `''` | + +
    +
    + +### For TypeScript Only + +```tsx +import type { ChipProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Variant + + +```ts +type variant = "filled" | "gradient" | "outlined" | "ghost"; +``` + +--- + + +## Types - Color + + +```ts +type color = + | "blue-gray" + | "gray" + | "brown" + | "deep-orange" + | "orange" + | "amber" + | "yellow" + | "lime" + | "light-green" + | "green" + | "teal" + | "cyan" + | "light-blue" + | "blue" + | "indigo" + | "deep-purple" + | "purple" + | "pink" + | "red"; +``` + +--- + + +## Types - Animate + + +```ts +type animate = { + mount?: object; + unmount?: object; +}; +``` + +--- + + +## Chip Theme + + +Learn how to customize the theme and styles for chip component, the theme object for chip component has three main objects: + +**A.** The defaultProps object for setting up the default value for props of chip component.
    +**B.** The valid object for customizing the valid values for chip component props.
    +**C.** The styles object for customizing the theme and styles of chip component.
    + +You can customize the theme and styles of chip component by adding Tailwind CSS classes as key paired values for objects. + +
    +
    + + +## Chip Theme Object Type + + +```ts +interface ChipStylesType { + defaultProps: { + variant: string; + color: string; + icon: node; + open: boolean; + action: node; + onClose: func; + animate: { + mount: object; + unmount: object; + }; + className: string; + }; + valid: { + variants: string[]; + colors: string[]; + }; + styles: { + base: { + chip: object; + action: object; + }; + variants: { + filled: object; + gradient: object; + outlined: object; + ghost: object; + }; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import { ChipStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Chip Theme Customization + + +```ts +const theme = { + chip: { + defaultProps: { + variant: "filled", + size: "md", + color: "blue", + icon: undefined, + open: true, + onClose: undefined, + action: undefined, + animate: { + unmount: {}, + mount: {}, + }, + className: "", + }, + valid: { + variants: ["filled", "gradient", "outlined", "ghost"], + sizes: ["sm", "md", "lg"], + colors: [ + "blue-gray", + "gray", + "brown", + "deep-orange", + "orange", + "amber", + "yellow", + "lime", + "light-green", + "green", + "teal", + "cyan", + "light-blue", + "blue", + "indigo", + "deep-purple", + "purple", + "pink", + "red", + ], + }, + styles: { + base: { + chip: { + position: "relative", + display: "grid", + placeItems: "items-center", + fontFamily: "font-sans", + fontWeight: "font-bold", + textTransform: "uppercase", + lineHeight: "leading-none", + whiteSpace: "whitespace-nowrap", + userSelect: "select-none", + }, + action: { + position: "!absolute", + top: "top-2/4", + right: "right-1", + translate: "-translate-y-2/4", + mx: "mx-px", + rounded: "rounded-md", + }, + icon: { + position: "absolute", + top: "top-2/4", + translate: "-translate-y-2/4", + }, + }, + sizes: { + sm: { + chip: { + py: "py-1", + px: "px-2", + fontSize: "text-xs", + borderRadius: "rounded-md", + }, + action: { + width: "w-4", + height: "h-4", + }, + icon: { + width: "w-4", + height: "h-4", + left: "left-1", + }, + }, + md: { + chip: { + py: "py-1.5", + px: "px-3", + fontSize: "text-xs", + borderRadius: "rounded-lg", + }, + action: { + width: "w-5", + height: "h-5", + }, + icon: { + width: "w-5", + height: "h-5", + left: "left-1.5", + }, + }, + lg: { + chip: { + py: "py-2", + px: "px-4", + fontSize: "text-xs", + borderRadius: "rounded-lg", + }, + action: { + width: "w-6", + height: "h-6", + }, + icon: { + width: "w-6", + height: "h-6", + left: "left-1.5", + }, + }, + }, + variants: { + filled: { + "blue-gray": { + backgroud: "bg-blue-gray-500", + color: "text-white", + }, + gray: { + backgroud: "bg-gray-500", + color: "text-white", + }, + brown: { + backgroud: "bg-brown-500", + color: "text-white", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500", + color: "text-white", + }, + orange: { + backgroud: "bg-orange-500", + color: "text-white", + }, + amber: { + backgroud: "bg-amber-500", + color: "text-black", + }, + yellow: { + backgroud: "bg-yellow-500", + color: "text-black", + }, + lime: { + backgroud: "bg-lime-500", + color: "text-black", + }, + "light-green": { + backgroud: "bg-light-green-500", + color: "text-white", + }, + green: { + backgroud: "bg-green-500", + color: "text-white", + }, + teal: { + backgroud: "bg-teal-500", + color: "text-white", + }, + cyan: { + backgroud: "bg-cyan-500", + color: "text-white", + }, + "light-blue": { + backgroud: "bg-light-blue-500", + color: "text-white", + }, + blue: { + backgroud: "bg-blue-500", + color: "text-white", + }, + indigo: { + backgroud: "bg-indigo-500", + color: "text-white", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500", + color: "text-white", + }, + purple: { + backgroud: "bg-purple-500", + color: "text-white", + }, + pink: { + backgroud: "bg-pink-500", + color: "text-white", + }, + red: { + backgroud: "bg-red-500", + color: "text-white", + }, + }, + gradient: { + "blue-gray": { + backgroud: "bg-gradient-to-tr from-blue-gray-600 to-blue-gray-400", + color: "text-white", + }, + gray: { + backgroud: "bg-gradient-to-tr from-gray-600 to-gray-400", + color: "text-white", + }, + brown: { + backgroud: "bg-gradient-to-tr from-brown-600 to-brown-400", + color: "text-white", + }, + "deep-orange": { + backgroud: "bg-gradient-to-tr from-deep-orange-600 to-deep-orange-400", + color: "text-white", + }, + orange: { + backgroud: "bg-gradient-to-tr from-orange-600 to-orange-400", + color: "text-white", + }, + amber: { + backgroud: "bg-gradient-to-tr from-amber-600 to-amber-400", + color: "text-black", + }, + yellow: { + backgroud: "bg-gradient-to-tr from-yellow-600 to-yellow-400", + color: "text-black", + }, + lime: { + backgroud: "bg-gradient-to-tr from-lime-600 to-lime-400", + color: "text-black", + }, + "light-green": { + backgroud: "bg-gradient-to-tr from-light-green-600 to-light-green-400", + color: "text-white", + }, + green: { + backgroud: "bg-gradient-to-tr from-green-600 to-green-400", + color: "text-white", + }, + teal: { + backgroud: "bg-gradient-to-tr from-teal-600 to-teal-400", + color: "text-white", + }, + cyan: { + backgroud: "bg-gradient-to-tr from-cyan-600 to-cyan-400", + color: "text-white", + }, + "light-blue": { + backgroud: "bg-gradient-to-tr from-light-blue-600 to-light-blue-400", + color: "text-white", + }, + blue: { + backgroud: "bg-gradient-to-tr from-blue-600 to-blue-400", + color: "text-white", + }, + indigo: { + backgroud: "bg-gradient-to-tr from-indigo-600 to-indigo-400", + color: "text-white", + }, + "deep-purple": { + backgroud: "bg-gradient-to-tr from-deep-purple-600 to-deep-purple-400", + color: "text-white", + }, + purple: { + backgroud: "bg-gradient-to-tr from-purple-600 to-purple-400", + color: "text-white", + }, + pink: { + backgroud: "bg-gradient-to-tr from-pink-600 to-pink-400", + color: "text-white", + }, + red: { + backgroud: "bg-gradient-to-tr from-red-600 to-red-400", + color: "text-white", + }, + }, + outlined: { + "blue-gray": { + border: "border border-blue-gray-500", + color: "text-blue-gray-700", + }, + gray: { + border: "border border-gray-500", + color: "text-gray-700", + }, + brown: { + border: "border border-brown-500", + color: "text-brown-700", + }, + "deep-orange": { + border: "border border-deep-orange-500", + color: "text-deep-orange-700", + }, + orange: { + border: "border border-orange-500", + color: "text-orange-700", + }, + amber: { + border: "border border-amber-500", + color: "text-amber-700", + }, + yellow: { + border: "border border-yellow-500", + color: "text-yellow-700", + }, + lime: { + border: "border border-lime-500", + color: "text-lime-700", + }, + "light-green": { + border: "border border-light-green-500", + color: "text-light-green-700", + }, + green: { + border: "border border-green-500", + color: "text-green-700", + }, + teal: { + border: "border border-teal-500", + color: "text-teal-700", + }, + cyan: { + border: "border border-cyan-500", + color: "text-cyan-700", + }, + "light-blue": { + border: "border border-light-blue-500", + color: "text-light-blue-700", + }, + blue: { + border: "border border-blue-500", + color: "text-blue-700", + }, + indigo: { + border: "border border-indigo-500", + color: "text-indigo-700", + }, + "deep-purple": { + border: "border border-deep-purple-500", + color: "text-deep-purple-700", + }, + purple: { + border: "border border-purple-500", + color: "text-purple-700", + }, + pink: { + border: "border border-pink-500", + color: "text-pink-700", + }, + red: { + border: "border border-red-500", + color: "text-red-700", + }, + }, + ghost: { + "blue-gray": { + backgroud: "bg-blue-gray-500/20", + color: "text-blue-gray-900", + }, + gray: { + backgroud: "bg-gray-500/20", + color: "text-gray-900", + }, + brown: { + backgroud: "bg-brown-500/20", + color: "text-brown-900", + }, + "deep-orange": { + backgroud: "bg-deep-orange-500/20", + color: "text-deep-orange-900", + }, + orange: { + backgroud: "bg-orange-500/20", + color: "text-orange-900", + }, + amber: { + backgroud: "bg-amber-500/20", + color: "text-amber-900", + }, + yellow: { + backgroud: "bg-yellow-500/20", + color: "text-yellow-900", + }, + lime: { + backgroud: "bg-lime-500/20", + color: "text-lime-900", + }, + "light-green": { + backgroud: "bg-light-green-500/20", + color: "text-light-green-900", + }, + green: { + backgroud: "bg-green-500/20", + color: "text-green-900", + }, + teal: { + backgroud: "bg-teal-500/20", + color: "text-teal-900", + }, + cyan: { + backgroud: "bg-cyan-500/20", + color: "text-cyan-900", + }, + "light-blue": { + backgroud: "bg-light-blue-500/20", + color: "text-light-blue-900", + }, + blue: { + backgroud: "bg-blue-500/20", + color: "text-blue-900", + }, + indigo: { + backgroud: "bg-indigo-500/20", + color: "text-indigo-900", + }, + "deep-purple": { + backgroud: "bg-deep-purple-500/20", + color: "text-deep-purple-900", + }, + purple: { + backgroud: "bg-purple-500/20", + color: "text-purple-900", + }, + pink: { + backgroud: "bg-pink-500/20", + color: "text-pink-900", + }, + red: { + backgroud: "bg-red-500/20", + color: "text-red-900", + }, + }, + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/collapse.mdx b/documentation/react/collapse.mdx new file mode 100644 index 000000000..e25771d03 --- /dev/null +++ b/documentation/react/collapse.mdx @@ -0,0 +1,172 @@ +--- +title: Tailwind CSS Collapse for React - Material Tailwind +description: Customise your web projects with our easy-to-use collapse component for Tailwind CSS and React using Material Design guidelines. +navigation: + [ + "collapse", + "collapse-props", + "types-animate", + "collapse-theme", + "collapse-theme-object-type", + "collapse-theme-customization" + ] +github: collapse +prev: chip +next: carousel +--- + + +# Tailwind CSS Collapse - React + + +Use our Tailwind CSS collapse for your website. You can use it for accordion, collapsible items and much more. + +See below our simple Collapse example that you can use in your Tailwind CSS and React project. + +
    + +}> +```jsx +import React from "react"; +import { + Collapse, + Button, + Card, + Typography, + CardBody, +} from "@material-tailwind/react"; + +export default function CollapseDefault() { + const [open, setOpen] = React.useState(false); + + const toggleOpen = () => setOpen((cur) => !cur); + + return ( + <> + + + + + + Use our Tailwind CSS collapse for your website. You can use if for + accordion, collapsible items and much more. + + + + + + ); +} +``` + + +--- + + +## Collapse Props + + +The following props are available for collapse component. These are the custom props +that we've added for the collapse component and you can use all the other +native props as well. + +| Attribute | Type | Description | Default | +| ----------- | ------------------------- | ----------------------------------------------- | -------------------------------------- | +| `open` | boolean | If true the collapse will expand | No default value it's a required prop. | +| `animate` | [Animate](#types-animate) | Change collapse animation | undefined | +| `className` | string | Add custom className for collapse | `''` | +| `children` | node | Add content for collapse | No default value it's a required prop. | + +
    +
    + +### For TypeScript Only + +```tsx +import type { CollapseProps } from "@material-tailwind/react"; +``` + +--- + + +## Types - Animate + + +```ts +type animate = { + mount?: object; + unmount?: object; +}; +``` + +--- + + +## Collapse Theme + + +Learn how to customize the theme and styles for collapse component, the theme object for collapse component has two main objects: + +**A.** The defaultProps object for setting up the default value for props of collapse component.
    +**B.** The styles object for customizing the theme and styles of collapse component.
    + +You can customize the theme and styles of collapse component by adding Tailwind CSS classes as key paired values for objects. + +
    +
    + + +## Collapse Theme Object Type + + +```ts +interface CollapseStylesType { + defaultProps: { + animate: { + mount: object; + unmount: object; + }; + className: string; + }; + styles: { + base: object; + }; +} +``` + +
    +
    + +### For TypeScript Only + +```tsx +import type { CollapseStylesType } from "@material-tailwind/react"; +``` + +--- + + +## Collapse Theme Customization + + +```ts +const theme = { + collapse: { + defaultProps: { + animate: { + unmount: {}, + mount: {}, + }, + className: "", + }, + styles: { + base: { + display: "block", + width: "w-full", + basis: "basis-full", + overflow: "overflow-hidden", + }, + }, + }, +}; +``` \ No newline at end of file diff --git a/documentation/react/colors.mdx b/documentation/react/colors.mdx index 9c471cbd2..436052b87 100644 --- a/documentation/react/colors.mdx +++ b/documentation/react/colors.mdx @@ -15,7 +15,9 @@ Customize the default color palette for @material-tailwind/react and add your ow

    + ## Default Color Palette + @material-tailwind/react provides a default color palette that you can use. These colors are are the same as the ones used in Material Design. @@ -312,7 +314,9 @@ Customize the default color palette for @material-tailwind/react and add your ow --- + ## Customizing The Default Color Palette + @@ -332,7 +336,9 @@ module.exports = withMT({ --- + ## Adding New Color + diff --git a/documentation/react/dialog.mdx b/documentation/react/dialog.mdx index 1090af08d..f155091a3 100644 --- a/documentation/react/dialog.mdx +++ b/documentation/react/dialog.mdx @@ -5,32 +5,38 @@ navigation: [ "dialog", "dialog-sizes", - "custom-dialog-animation", + "dialog-custom-animation", "dialog-with-form", "dialog-with-image", "web-3-dialog", - "props", - "theme" - ] -related: - [ - { - title: "Props", - route: "props/dialog", - description: "Learn more about props definition and types of dialog components.", - }, - { - title: "Theme", - route: "theme/dialog", - description: "Learn how to customize the theme and styles for dialog components.", - }, + "long-dialog", + "message-dialog", + "notification-dialog", + "dialog-props", + "dialog-header-props", + "dialog-body-props", + "dialog-footer-props", + "types-size", + "types-dismiss", + "types-animate", + "dialog-theme", + "dialog-theme-object-type", + "dialog-theme-customization", + "dialog-header-theme-object-type", + "dialog-header-theme-customization", + "dialog-body-theme-object-type", + "dialog-body-theme-customization", + "dialog-footer-theme-object-type", + "dialog-footer-theme-customization", ] github: dialog prev: chip next: icon-button --- + # Tailwind CSS Dialog - React + Use our Tailwind CSS Dialog component to inform users about a task or important information that require decisions, or involves multiple tasks. @@ -40,50 +46,9 @@ See below our Dialog example that you can use for your Tailwind CSS
    - - - {({ setState, open }) => ( - <> - - - Its a simple dialog. - - Lorem, ipsum dolor sit amet consectetur adipisicing elit. - Accusamus ad reprehenderit omnis perspiciatis aut odit! Unde - architecto perspiciatis, dolorum dolorem iure quia saepe autem - accusamus eum praesentium magni corrupti explicabo! - - - - - - - - )} - - -}> +}> ```jsx -import { Fragment, useState } from "react"; +import React from "react"; import { Button, Dialog, @@ -92,23 +57,23 @@ import { DialogFooter, } from "@material-tailwind/react"; -export default function Example() { - const [open, setOpen] = useState(false); +export function DialogDefault() { + const [open, setOpen] = React.useState(false); const handleOpen = () => setOpen(!open); return ( - + <> Its a simple dialog. - - Lorem, ipsum dolor sit amet consectetur adipisicing elit. Accusamus ad - reprehenderit omnis perspiciatis aut odit! Unde architecto - perspiciatis, dolorum dolorem iure quia saepe autem accusamus eum - praesentium magni corrupti explicabo! + + The key to more success is to have a lot of pillows. Put it this way, + it took me twenty five years to get these plants, twenty five years of + blood sweat and tears, and I'm never giving up, I'm just + getting started. I'm up to something. Fan luv. - + ); } ``` @@ -132,98 +97,15 @@ export default function Example() { --- + ## Dialog Sizes + The Dialog component comes with 6 different sizes that you can change it using the size prop. - - - {({ setState, size }) => ( - <> -
    - - - -
    -
    - - - -
    - - Its a simple dialog. - - Lorem, ipsum dolor sit amet consectetur adipisicing elit. - Accusamus ad reprehenderit omnis perspiciatis aut odit! Unde - architecto perspiciatis, dolorum dolorem iure quia saepe autem - accusamus eum praesentium magni corrupti explicabo! - - - - - - - - )} -
    - -}> +}> ```jsx -import { Fragment, useState } from "react"; +import React from "react"; import { Button, Dialog, @@ -232,13 +114,13 @@ import { DialogFooter, } from "@material-tailwind/react"; -export default function Example() { - const [size, setSize] = useState(null); +export function DialogSizes() { + const [size, setSize] = React.useState(null); const handleOpen = (value) => setSize(value); return ( - + <>
    - + ); } ``` @@ -306,60 +188,15 @@ export default function Example() { --- -## Custom Dialog Animation + +## Dialog Custom Animation + You can modify the open/close state animation for Dialog component using the animate prop. - - - {({ setState, open }) => ( - <> - - - Its a simple dialog. - - Lorem, ipsum dolor sit amet consectetur adipisicing elit. - Accusamus ad reprehenderit omnis perspiciatis aut odit! Unde - architecto perspiciatis, dolorum dolorem iure quia saepe autem - accusamus eum praesentium magni corrupti explicabo! - - - - - - - - )} - - -}> +}> ```jsx -import { Fragment, useState } from "react"; +import React from "react"; import { Button, Dialog, @@ -368,17 +205,17 @@ import { DialogFooter, } from "@material-tailwind/react"; -export default function Example() { - const [open, setOpen] = useState(false); +export function DialogCustomAnimation() { + const [open, setOpen] = React.useState(false); const handleOpen = () => setOpen(!open); return ( - + <> - Its a simple dialog. - - Lorem, ipsum dolor sit amet consectetur adipisicing elit. Accusamus ad - reprehenderit omnis perspiciatis aut odit! Unde architecto - perspiciatis, dolorum dolorem iure quia saepe autem accusamus eum - praesentium magni corrupti explicabo! + + The key to more success is to have a lot of pillows. Put it this way, + it took me twenty five years to get these plants, twenty five years of + blood sweat and tears, and I'm never giving up, I'm just + getting started. I'm up to something. Fan luv. - - + + Sign In - - + + Enter your email and password to Sign In. + + + Your Email + + + Your Password + -
    +
    @@ -468,13 +314,13 @@ export default function Example() { - + Don't have an account? @@ -484,7 +330,7 @@ export default function Example() {
    - + ); } ``` @@ -492,11 +338,13 @@ export default function Example() { --- + ## Dialog with Image + Use the example below to create a dialog with an image inside, similar to unsplash. -}> +}> ```jsx import React from "react"; import { @@ -510,16 +358,16 @@ import { Typography, Card, } from "@material-tailwind/react"; -import { HeartIcon, ShareIcon } from "@heroicons/react/24/solid"; -export default function Example() { +export function DialogWithImage() { const [open, setOpen] = React.useState(false); const [isFavorite, setIsFavorite] = React.useState(false); + const handleOpen = () => setOpen((cur) => !cur); const handleIsFavorite = () => setIsFavorite((cur) => !cur); return ( - + <> - +
    @@ -545,14 +393,14 @@ export default function Example() { color="blue-gray" className="font-medium" > - Candice Wu + Tania Andrew - @canwu + @emmaroberts
    @@ -563,17 +411,24 @@ export default function Example() { color={isFavorite ? "red" : "blue-gray"} onClick={handleIsFavorite} > - + + + -
    - + nature @@ -600,13 +455,13 @@ export default function Example() { size="sm" variant="outlined" color="blue-gray" - className="flex items-center gap-3" + className="mr-5 flex items-center" > - Share + Share
    - + ); } ``` @@ -614,11 +469,13 @@ export default function Example() { --- + ## Web 3.0 Dialog + Use the example below to create a Web 3.0 wallet connect dialog. -}> +}> ```jsx import React from "react"; import { @@ -631,117 +488,838 @@ import { Typography, MenuItem, } from "@material-tailwind/react"; -import { XMarkIcon } from "@heroicons/react/24/outline"; -export default function Example() { +export function Web3Dialog() { const [open, setOpen] = React.useState(false); + const handleOpen = () => setOpen((cur) => !cur); return ( - + <> - + - - Connect a Wallet - +
    + + Connect a Wallet + + + Choose which card you want to connect + +
    - + + +
    - +
    Popular -
      - +
        + metamast - - MetaMask - - - - metamast - - Coinbase Wallet + + Connect with MetaMask - + metamast - - Connect Wallet + + Connect with Coinbase
    - More + Other -
      - - metamast - - Trust Wallet - - - +
        + metamast - - Coinbase Wallet + + Connect with Trust Wallet
    - + New to Ethereum wallets? -
    -
    + + ); +} +``` +
    + +--- + + +## Long Dialog + + +}> +```jsx +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, + Typography, +} from "@material-tailwind/react"; + +export function LongDialog() { + const [open, setOpen] = React.useState(false); + + const handleOpen = () => setOpen(!open); + + return ( + <> + + + Long Dialog + + + I've always had unwavering confidence in my abilities, and I + believe our thoughts and self-perception are the primary forces that + shape us. Many people limit themselves by their own self-doubt, + slowing their progress. Fortunately, I was raised with the belief + that I could achieve anything. +
    +
    + As we journey through life, we often encounter challenges that + harden our hearts. Pain, insults, broken trust, and betrayal can + make us hesitant to help others. Love can lead to heartbreak, and + time can distance us from family. These experiences can gradually + erode our optimism. +

    + Life doesn't always place us where we want to be. We grow, make + mistakes, and strive to express ourselves and fulfill our dreams. If + we're fortunate enough to participate in life's journey, + we should cherish every moment. Regrettably, some only recognize the + value of a moment after it's passed. +

    + One thing I've learned is that I can excel at anything I set my + mind to. My skill is my ability to learn. I'm here to learn, to + grow, and to inspire others to do the same. Don't fear making + mistakes; they teach us far more than compliments ever will. + Ultimately, what truly matters is how our actions inspire and + motivate others. Some will be ignited by our endeavors, while others + may be offended—it's all part of the process. I'm here to + pursue my dreams and encourage others to do the same. +

    + Now is the time to embrace greatness without fear of judgment. Some + may resent those who shine brightly or stand out, but it's time + to be the best version of ourselves. Do you have faith in your + beliefs, even if you're the only one who does? +
    +
    + + + + +
    + + ); +} +``` +
    + +--- + + +## Message Dialog + + +}> +```jsx +import React from "react"; +import { + Button, + Dialog, + DialogHeader, + DialogBody, + DialogFooter, + Input, + Textarea, +} from "@material-tailwind/react"; + +export function MessageDialog() { + const [open, setOpen] = React.useState(false); + + const handleOpen = () => setOpen(!open); + + return ( + <> + + +
    + + {" "} + + New message to @{" "} + + + + + +
    + + + Write the message and then click button. + +
    + + Username + + +