diff --git a/docs-content/html/accordion/accordion-custom-icon.tsx b/docs-content/html/accordion/accordion-custom-icon.tsx index b3b31ce45..b58d5d656 100644 --- a/docs-content/html/accordion/accordion-custom-icon.tsx +++ b/docs-content/html/accordion/accordion-custom-icon.tsx @@ -1,72 +1,112 @@ +import { useEffect, useRef, useState } from "react"; + export function AccordionCustomIcon() { + const [openIndex, setOpenIndex] = useState(null); + const contentRefs = useRef([]); + + // Toggle the accordion item + const toggleAccordion = (index) => { + setOpenIndex((prevIndex) => (prevIndex === index ? null : index)); + }; + + // Effect to adjust maxHeight for smooth transitions + useEffect(() => { + contentRefs.current.forEach((content, index) => { + if (content) { + if (openIndex === index) { + content.style.maxHeight = content.scrollHeight + 'px'; + } else { + content.style.maxHeight = '0px'; + } + } + }); + }, [openIndex]); + + const up = + + + + + const down = + + + + + + return ( - <> -
- 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. -
+ + 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. +
- Ensure that these requirements are met: -
+ + Ensure that these requirements are met: +
- React.js -
- Vue.js -
- Svelte.js -
+
Remember Me
You'll be able to login without password for 24 hours.
- I agree with the + + + I agree with the - terms and conditions + terms and conditions . diff --git a/docs-content/html/checkbox/checkbox.tsx b/docs-content/html/checkbox/checkbox.tsx index 92f2b5ad6..4c0cb0ea7 100644 --- a/docs-content/html/checkbox/checkbox.tsx +++ b/docs-content/html/checkbox/checkbox.tsx @@ -1,31 +1,12 @@ export function CheckboxDefault() { return ( - - - - - - + + + + + + diff --git a/docs-content/html/checkbox/disabled-checkbox.tsx b/docs-content/html/checkbox/disabled-checkbox.tsx index d5f1f06d0..1ae18b5dc 100644 --- a/docs-content/html/checkbox/disabled-checkbox.tsx +++ b/docs-content/html/checkbox/disabled-checkbox.tsx @@ -1,37 +1,21 @@ export function DisabledCheckbox() { return ( - - - + + - - - + className="peer h-5 w-5 cursor-pointer transition-all disabled:opacity-50 appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-disabled" /> + + + - + Remember Me diff --git a/docs-content/html/icon-button/icon-button-colors.tsx b/docs-content/html/icon-button/icon-button-colors.tsx index 2d772e246..6761190f1 100644 --- a/docs-content/html/icon-button/icon-button-colors.tsx +++ b/docs-content/html/icon-button/icon-button-colors.tsx @@ -1,37 +1,28 @@ 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 index 185910793..4d2de5865 100644 --- a/docs-content/html/icon-button/icon-button-custom-styles.tsx +++ b/docs-content/html/icon-button/icon-button-custom-styles.tsx @@ -1,37 +1,20 @@ 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 index 382b0f1fd..226b4ea26 100644 --- a/docs-content/html/icon-button/icon-button-ripple-effect.tsx +++ b/docs-content/html/icon-button/icon-button-ripple-effect.tsx @@ -1,23 +1,10 @@ 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 index 974c1c59c..e41efe432 100644 --- a/docs-content/html/icon-button/icon-button-rounded.tsx +++ b/docs-content/html/icon-button/icon-button-rounded.tsx @@ -1,37 +1,28 @@ 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 index b86fcb02b..7b9736390 100644 --- a/docs-content/html/icon-button/icon-button-sizes.tsx +++ b/docs-content/html/icon-button/icon-button-sizes.tsx @@ -1,29 +1,34 @@ 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 index 7cb45ae90..79a2f8474 100644 --- a/docs-content/html/icon-button/icon-button-variants.tsx +++ b/docs-content/html/icon-button/icon-button-variants.tsx @@ -1,37 +1,28 @@ 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 index 5218b20e7..5fc47ce7d 100644 --- a/docs-content/html/icon-button/icon-button-with-link.tsx +++ b/docs-content/html/icon-button/icon-button-with-link.tsx @@ -2,43 +2,31 @@ export function IconButtonWithLink() { return ( - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + diff --git a/docs-content/html/icon-button/icon-button.tsx b/docs-content/html/icon-button/icon-button.tsx index c5661ba5f..557b7e7a1 100644 --- a/docs-content/html/icon-button/icon-button.tsx +++ b/docs-content/html/icon-button/icon-button.tsx @@ -1,12 +1,9 @@ export function IconButtonDefault() { return ( - - - - + + + + ); } diff --git a/documentation/html/accordion.mdx b/documentation/html/accordion.mdx index d1492bd3e..d00e2af92 100644 --- a/documentation/html/accordion.mdx +++ b/documentation/html/accordion.mdx @@ -6,9 +6,6 @@ navigation: "accordion", "custom-accordion-icon", "disabled-accordion", - "accordion-trigger-data-attributes", - "accordion-data-attributes", - "required-script", "more-examples", ] github: accordion @@ -41,72 +38,87 @@ This visual cue is simple, providing users with a clear indication of how to int component={} > ```html - - - - 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. - + + + + + What is Material Tailwind? + + + + + + + + + Material Tailwind is a framework that enhances Tailwind CSS with additional styles and components. - - - - 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. - + + + + + + How to use Material Tailwind? + + + + + + + + + You can use Material Tailwind by importing its components into your Tailwind CSS project. - - - - 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. - + + + + + + What can I do with Material Tailwind? + + + + + + + + + Material Tailwind allows you to quickly build modern, responsive websites with a focus on design. + + + ``` @@ -122,69 +134,86 @@ You can use custom icons for the accordion trigger element and using the g component={} > ```html - - - - 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. - + + + + What is Material Tailwind? + + + + + + + + + Material Tailwind is a framework that enhances Tailwind CSS with additional styles and components. - - - - 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. - + + + + + + How to use Material Tailwind? + + + + + + + + + You can use Material Tailwind by importing its components into your Tailwind CSS project. - - - - 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. - + + + + + + What can I do with Material Tailwind? + + + + + + + + + Material Tailwind allows you to quickly build modern, responsive websites with a focus on design. + + + ``` @@ -197,76 +226,91 @@ The example is a type of accordion which indicates that certain sections of cont } > ```html - - - - 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. - + + + + + What is Material Tailwind? + + + + + + + + + Material Tailwind is a framework that enhances Tailwind CSS with additional styles and components. - - - - 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. - + + + + + + How to use Material Tailwind? + + + + + + + + + You can use Material Tailwind by importing its components into your Tailwind CSS project. - - - - 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. - + + + + + + What can I do with Material Tailwind? + + + + + + + + + Material Tailwind allows you to quickly build modern, responsive websites with a focus on design. + + + ``` @@ -274,58 +318,14 @@ The example is a type of accordion which indicates that certain sections of cont Use this Tailwind CSS accordion to maintain a clean layout while signaling to users that some information or options are not available for interaction at the moment (eg. content is released in stages, or user actions are required to unlock certain functionalities). ---- - -## Material Tailwind Accordion Specifications - -The following attributes are used to handle the show/hide functionality of accordion components without needing to write lots of custom code. By using these data attributes, developers can easily link the accordion buttons (triggers) with the content sections they control. - - -## Accordion Trigger Data Attributes - - -The following data attributes are available for accordion trigger element. - -| Attribute | Description | -| ---------------------- | ----------------------------------------------------------------------------------------------------- | -| `data-collapse-target` | Set the accordion target element, it should be the same as the `data-collapse` data attribute. | - ---- - -## Accordion Data Attributes - - -The following data attributes are available for the accordion element. - -| Attribute | Description | -| --------------- | ----------------------------------------------------------------------------------------------------- | -| `data-collapse` | Set the accordion element, it should be the same as the `data-collapse-target` data attribute. | - ---- - -## Required Scripts - - - -The accordion component needs a required script file to work, you just need to add the below script file to the bottom of your html file. - -```html - - - - - -``` ---- + ## Explore More Tailwind CSS Examples Looking for more accordion examples? Check out our FAQs examples from Material Tailwind Blocks. - - ---- + ### Accordion Best Practices for Developers diff --git a/documentation/html/alert.mdx b/documentation/html/alert.mdx index 687dfb67c..f7226b101 100644 --- a/documentation/html/alert.mdx +++ b/documentation/html/alert.mdx @@ -11,9 +11,6 @@ navigation: "alert-dismissible", "custom-alert-close-icon", "alert-with-content", - "alert-data-attributes", - "alert-trigger-data-attributes", - "required-script", "more-examples", ] github: alert @@ -42,9 +39,11 @@ This example of alert with white text and dark gray background creates a high co component={} > ```html - - A simple alert for showing message. + + A simple filled alert for showing message. + + + ``` @@ -61,27 +60,42 @@ The alert component comes with 3 different variants that you can change using th component={} > ```html - - 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. - - + + A simple filled alert for showing message. + + + + + + + + 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. + + + + ``` @@ -97,21 +111,29 @@ The alert component comes with 19 different colors that you can change using the component={} > ```html - + An info alert for showing message. + + + - - An error alert for showing message. + + An red alert for showing message. + + + - - A success alert for showing message. + + An success alert for showing message. + + + - - A warning alert for showing message. + + An warning alert for showing message. + + + ``` @@ -120,7 +142,7 @@ The alert component comes with 19 different colors that you can change using the ## Alert with Icon -You can add an icon at the beginning of the alert component using the i tag. +You can add an icon at the beginning of the alert component using the svg tag. i} > ```html - - - - - - - - A simple alert with icon for showing message + + + A simple filled alert for showing message. + + + ``` @@ -155,81 +173,69 @@ You can add any element you want for the Alert component, below you can see an e component={} > ```html - - - - - - - - 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., ! @ # ? + + + + + - - - - - - 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., ! @ # ? + + + + + ``` @@ -240,7 +246,7 @@ You can add any element you want for the Alert component, below you can see an e ## Alert Dismissible -You can make an alert dismissible by adding the data-dismissible="alertName" data attribute to the alert element and the data-dismissible-target="{`alertName`}" data attribute to the element that you want to close the alert with. +The dismissible alert is a user interface component that displays a message with the option to close or hide it. It includes a close button, allowing users to easily dismiss the alert by clicking the button, enhancing the user experience by keeping the interface clean and free of unnecessary messages. Ideal for notifications, warnings, or informational messages that the user can manually dismiss. data-dismissible="alertNam component={} > ```html - - A dismissible alert for showing message. - - - - - - + + A dismissible alert with closing button. + + + + -; + + + ``` @@ -292,27 +284,27 @@ You can use any DOM element as the alert closing icon. component={} > ```html - - - - - - - - Sorry, something went wrong please try again. - - + class="mt-3 relative flex w-full p-3 text-sm text-white bg-slate-800 rounded-md" + id="alert" +> + + + + + Sorry, something went wrong please try again. + Close - + + + ``` @@ -328,80 +320,22 @@ Use the example below to use an alert component with content elements like title component={} > ```html - - - - - - - - - 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. - - - - - - - - + + + + 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. + + + + ``` ---- - -## Alert Data Attributes - - -The following data attributes are available for alert element. - -| Attribute | Description | -| ------------------ | ------------------------------------------------------------------------------------------------------------- | -| `data-dismissible` | Set the alert dismissible name, it should be the same as the `data-dismissible-target` data attribute. | - ---- - -## Alert Trigger Data Attributes - - -The following data attributes are available for alert trigger element (The element -that you want to close the alert with). - -| Attribute | Description | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `data-dismissible-target` | Hide the alert element that has the same value of `data-dismissible-target` data attribute for it's `data-dismissible` data attribute. | - ---- - -## Required Script - - - -The alert component needs a required script file to work, you just need to add the below script file to the bottom of your html file. - -```html - - - - - -``` --- diff --git a/documentation/html/badge.mdx b/documentation/html/badge.mdx index e106cd4a9..62f77e27b 100644 --- a/documentation/html/badge.mdx +++ b/documentation/html/badge.mdx @@ -9,7 +9,7 @@ navigation: "badge-overlap", "badge-with-border", "badge-dot", - "badge-custome-style", + "badge-custom-style", "more-examples", "best-practices" ] @@ -42,13 +42,10 @@ Get started with this simple badge example that comes with notification button a > ```html - + Notifications - + 5 @@ -61,7 +58,7 @@ Get started with this simple badge example that comes with notification button a Material Tailwind’s badge component comes with 20 different colors that you can change using the color classes. -Below you can check 4 of the examples: bg-red-500, bg-green-500, bg-amber-500, and bg-purple-500. The badge indicators add a visual element to the buttons, making the components more visually appealing and informative. +Below you can check 4 of the examples: bg-red-600, bg-green-600, bg-amber-600, and bg-purple-600. The badge indicators add a visual element to the buttons, making the components more visually appealing and informative. bg-red-500, bg-green- component={} > ```html + - + Red - - + - + Green - - + - + Amber - - + - + Purple - + + ``` @@ -123,46 +107,32 @@ Check out this practical coded example of how to position elements in different component={} > ```html + - + Top Start - - + - + Top End - - + - + Bottom Start - - + - + Bottom End - - + + ``` @@ -175,58 +145,36 @@ This code snippet provides examples of how badge indicators can be effectively u } > ```html + - - - - - - - - - + + + + - + 5 - - - - - - - - - + + + + - - + - + class="relative inline-block h-12 w-12 !rounded-full object-cover object-center" + /> + 5 @@ -234,11 +182,11 @@ This code snippet provides examples of how badge indicators can be effectively u - - + class="relative inline-block h-12 w-12 !rounded-full object-cover object-center" + /> + + ``` @@ -251,18 +199,15 @@ Notify users of unread messages, alerts, or other important information using th } > ```html - + Notifications - + 5 @@ -271,7 +216,7 @@ Notify users of unread messages, alerts, or other important information using th -This badge example comes with a rounded appearance (rounded-full) and is styled with a red background (bg-red-500), white text (text-white), and a white border (border-2 border-white). +This badge example comes with a rounded appearance (rounded-full) and is styled with a red background (bg-red-600), white text (text-white), and a white border (border-2 border-white). --- @@ -285,49 +230,39 @@ This component can be used in user interfaces where a visual indicator is needed } > ```html - + Settings - - + ``` --- -## Badge Custome Style +## Badge Custom Style Use this example in your project if you want to represent a completed or acknowledged state. } > ```html - + Notifications - - - - + + + @@ -336,7 +271,7 @@ Use this example in your project if you want to represent a completed or acknowl -The badge indicator is styled as a small, circular badge (rounded-full) with a gradient background (bg-gradient-to-tr from-green-400 to-green-600), a white border (border-2 border-white), and a shadow (shadow-lg shadow-black/20). It also contains an SVG icon, which is a checkmark (\ element), indicating a positive or completed status. +The badge indicator is styled as a small, circular badge (rounded-full) with a background (bg-green-600), a white border (border border-white). It also contains an SVG icon, which is a checkmark (\ element), indicating a positive or completed status. --- diff --git a/documentation/html/button-group.mdx b/documentation/html/button-group.mdx index 247f21341..6771a9419 100644 --- a/documentation/html/button-group.mdx +++ b/documentation/html/button-group.mdx @@ -43,31 +43,32 @@ This component example showcases a responsive button group with detailed control component={} > ```html - - - - One - - - Two - - - Three - - + + + One + + + Two + + + Three + ``` -The first and last buttons in the group have rounded-r-none border-r-0 and rounded-l-none, respectively. This removes the rounded corners and right border of the first button and the left rounded corner of the last button, creating a great group appearance. +The first and last buttons in the group have rounded-r-none and rounded-l-none, respectively. This removes the rounded corners and right border of the first button and the left rounded corner of the last button, creating a great group appearance. --- @@ -82,87 +83,90 @@ Get inspired by this series of button groups, each with different styling, arran component={} > ```html - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + ``` -The first component variant features a classic and straightforward design with solid gray backgrounds (bg-gray-900) and white text. -The second variant stands out with a gradient background (bg-gradient-to-tr from-gray-900 to-gray-800), transitioning from dark gray to slightly lighter gray. -The third variant adopts a more minimalistic approach, featuring a border (border border-gray-900) around each button and gray text. -The fourth button group is the most simplistic, with no explicit background color but a subtle hover background effect (hover:bg-gray-900/10). +The first component variant features a classic and straightforward design with solid gray backgrounds (bg-slate-800) and white text. +The second variant stands out with a gradient background (bg-gradient-to-tr from-slate-800 to-slate-700), transitioning from dark gray to slightly lighter gray. +The third variant adopts a more minimalistic approach, featuring a border (border border-slate-300) around each button and slate text. +The fourth button group is the most simplistic, with no explicit background color but a subtle hover background effect (hover:bg-slate-800). Using Tailwind CSS's utility classes and Material Tailwind's design as a starting point, you can create diverse designs while maintaining a cohesive user interface. @@ -180,60 +184,64 @@ This button group component example shows you how to create responsive and scala component={} > ```html - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + ``` @@ -260,77 +268,88 @@ This example showcases four distinct button groups, each differentiated by color component={} > ```html - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + ``` @@ -349,24 +368,25 @@ This example illustrates a single row of three buttons optimized for a full-widt component={} > ```html - - - - One - - - Two - - - Three - - + + + One + + + Two + + + Three + ``` @@ -374,7 +394,7 @@ This example illustrates a single row of three buttons optimized for a full-widt --- -## Button Group Custom Styels +## Button Group Custom Style The button group is encapsulated within a grid container that ensures the buttons are centrally placed. The shadow (shadow-md shadow-gray-900/10) adds depth to the buttons, making them stand out against the light blue background. @@ -385,24 +405,25 @@ The button group is encapsulated within a grid container that ensures the button component={} > ```html - - - - One - - - Two - - - Three - - + + + One + + + Two + + + Three + ``` diff --git a/documentation/html/button.mdx b/documentation/html/button.mdx index f958f0d8e..3cb8e4071 100644 --- a/documentation/html/button.mdx +++ b/documentation/html/button.mdx @@ -44,10 +44,7 @@ Use this versatile button that comes with a dark theme with gray background and component={} > ```html - + Button ``` @@ -65,30 +62,20 @@ See our button examples below. They come in different styles and colors. component={} > ```html - - filled - - - gradient - - - outlined - - - text - + + + Filled + + + Gradient + + + Outlined + + + Text + + ``` @@ -104,24 +91,36 @@ Use this example to create buttons in different sizes. component={} > ```html - - small - - - medium - - - large - + + Xsmall + + + Small + + + Medium + + + Large + + + XLarge + ``` @@ -137,30 +136,18 @@ Use this example to create a simple button element for your Tailwind CSS project component={} > ```html - - color blue - - - color red - - - color green - - - color amber - + + Button Blue + + + Button Red + + + Button Green + + + Button Amber + ``` @@ -176,47 +163,34 @@ You can use any type of icons inside the button, in the below example we've used component={} > ```html - - - - - - Add to Bookmark - - - - - - - Upload Files - - - Refresh - - - - - - Read More - - - - + + + + + + Go Shopping + + + + + + + Upload Files + + + Homepage + + + + + + + Read More + + + + + ``` @@ -232,10 +206,8 @@ A button could be a block-level component as well that gets all the available sp component={} > ```html - - block level button + + Block Level Button ``` @@ -252,26 +224,18 @@ You can use tailwind css rounded-full class with Button to create r component={} > ```html - - Filled - - - Gradient - - - Outlined - - - Text - + + Filled + + + Gradient + + + Outlined + + + Text + ``` @@ -288,34 +252,26 @@ You can wrap Button component with {``} tag to make component={} > ```html - - - Filled - - - - - Gradient - - - - - Outlined - - - - - Text - - + + + Filled + + + + + Gradient + + + + + Outlined + + + + + Text + + ``` @@ -331,19 +287,12 @@ You can turn on/off the ripple effect for the button component by changing } > ```html - - Ripple Effect On - - Ripple Effect Off - + + Ripple Effect On + + + Ripple Effect Off + ``` @@ -359,26 +308,33 @@ You can use tailwind css classes with Button to create beautiful bu component={} > ```html - - - Connect Wallet - - - - Continue with - Google - - Sign in with Twitter - - - - + + + Connect Wallet + + + + + Continue with Google + + + + Sign in with Twitter + + + ``` diff --git a/documentation/html/checkbox.mdx b/documentation/html/checkbox.mdx index cd075d080..58531f61c 100644 --- a/documentation/html/checkbox.mdx +++ b/documentation/html/checkbox.mdx @@ -50,17 +50,11 @@ Use this simple and versatile checkbox example for your forms or other component > ```html - - - - - + + + + + @@ -82,136 +76,86 @@ You can customize your Material Tailwind checkbox to fit your design with differ > ```html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -229,24 +173,24 @@ Use this example if you want to offer users the option to "Remember Me" when log > ```html - + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-2" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + Remember Me - + ``` @@ -263,43 +207,59 @@ Use this example in your web project when you want to provide users with the opt component={} > ```html - - - - - - - - - - - Ripple Effect On - - - - - - - - - - - - - Ripple Effect Off - - + + + + + + + + + + + Ripple Effect On + + + + + + + + + + + + + + Ripple Effect Off + + ``` @@ -318,28 +278,14 @@ Check out this component example to see how you can implement a custom icon for > ```html - - - + + + + + + + + ``` @@ -357,22 +303,22 @@ Use this component example styled with Tailwind CSS if you want to display a che component={} > ```html - - - - + + + + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + Remember Me @@ -393,26 +339,28 @@ This example works perfectly if you want to make sure that users agree to your w > ```html - + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-with-link" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - - + + I agree with the - - terms and conditions + + terms and conditions . @@ -434,27 +382,27 @@ Use the example below for a more complex usage of a checkbox with a label that c component={} > ```html - - + + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-with-description" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + - + Remember Me - + You'll be able to login without password for 24 hours. @@ -477,82 +425,90 @@ Use the example below for a vertical list of checkboxes. component={} > ```html - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + React + - - React.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Vue.js + - - Vue.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Svelte.js + - - Svelte.js - @@ -573,83 +529,90 @@ Use the example below for a horizontal list of checkboxes. component={} > ```html - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + React + - - React.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Vue.js + - - Vue.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Svelte.js + - - Svelte.js - @@ -673,18 +636,12 @@ You can use the classes to add custom styles to the Checkbox component. > ```html - - - - - - + + + + + + diff --git a/documentation/html/icon-button.mdx b/documentation/html/icon-button.mdx index ce439472e..93b42f4dc 100644 --- a/documentation/html/icon-button.mdx +++ b/documentation/html/icon-button.mdx @@ -41,12 +41,11 @@ Here's how to implement a simple and responsive icon button component. It can be component={} > ```html - - - + + + + + ``` @@ -62,26 +61,29 @@ Check out how to implement different visual styles and interaction states for yo component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -89,10 +91,10 @@ Check out how to implement different visual styles and interaction states for yo In the coded snipped you can see: -• The first button: has a solid gray background (bg-gray-900), white text, and standard shadow effects. It showcases interactive states like hover, focus, and active, with visual feedback including shadow and opacity changes. -• The second button: introduces a gradient background (bg-gradient-to-tr from-gray-900 to-gray-800) while maintaining similar size, shape, and interaction states as the first button. -• The third button: features a border (border border-gray-900) and changes the text color to gray (text-gray-900), distinguishing it from the previous buttons with a more subtle appearance. -• The fourth button: has a transparent background initially with text colored in gray (text-gray-900). The hover and active states introduce a background color change (hover:bg-gray-900/10 active:bg-gray-900/20), making the button's response to user interactions more understated compared to the others. +• The first button: has a solid slate background (bg-slate-800), white text, and standard shadow effects. It showcases interactive states like hover, focus, and active, with visual feedback including shadow and opacity changes. +• The second button: introduces a gradient background (bg-gradient-to-tr from-slate-800 to-slate-700) while maintaining similar size, shape, and interaction states as the first button. +• The third button: features a border (border border-slate-300) and changes the text color to gray (text-slate-600), distinguishing it from the previous buttons with a more subtle appearance. +• The fourth button: has a transparent background initially with text colored in slate (text-slate-600). The hover and active states introduce a background color change (hover:bg-slate-100 active:bg-slate-100), making the button's response to user interactions more understated compared to the others. --- @@ -106,22 +108,35 @@ Use this example to create icon buttons in different sizes. component={} > ```html - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -137,41 +152,29 @@ Use this example to create icon buttons with different colors (blue, red, green, component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -188,23 +191,28 @@ Use this example to create a rounded icon button element for your Tailwind CSS p > ```html - - - - - + + + + + + + + + + + + + + + + + + + + + + ``` @@ -223,48 +231,34 @@ Use this example to create icon buttons with link element. These buttons are des component={} > ```html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -283,22 +277,11 @@ You can turn on/off the ripple effect for the icon button component by changing component={} > ```html - - - - - - - - - - - - + + + + + ``` @@ -318,32 +301,21 @@ In the example below, each button represents a different social media platform t component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + ```
+ I agree with the - terms and conditions + terms and conditions .
g component={} > ```html - - - - 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. - + + + + What is Material Tailwind? + + + + + + + + + Material Tailwind is a framework that enhances Tailwind CSS with additional styles and components. - - - - 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. - + + + + + + How to use Material Tailwind? + + + + + + + + + You can use Material Tailwind by importing its components into your Tailwind CSS project. - - - - 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. - + + + + + + What can I do with Material Tailwind? + + + + + + + + + Material Tailwind allows you to quickly build modern, responsive websites with a focus on design. + + + ``` @@ -197,76 +226,91 @@ The example is a type of accordion which indicates that certain sections of cont } > ```html - - - - 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. - + + + + + What is Material Tailwind? + + + + + + + + + Material Tailwind is a framework that enhances Tailwind CSS with additional styles and components. - - - - 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. - + + + + + + How to use Material Tailwind? + + + + + + + + + You can use Material Tailwind by importing its components into your Tailwind CSS project. - - - - 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. - + + + + + + What can I do with Material Tailwind? + + + + + + + + + Material Tailwind allows you to quickly build modern, responsive websites with a focus on design. + + + ``` @@ -274,58 +318,14 @@ The example is a type of accordion which indicates that certain sections of cont Use this Tailwind CSS accordion to maintain a clean layout while signaling to users that some information or options are not available for interaction at the moment (eg. content is released in stages, or user actions are required to unlock certain functionalities). ---- - -## Material Tailwind Accordion Specifications - -The following attributes are used to handle the show/hide functionality of accordion components without needing to write lots of custom code. By using these data attributes, developers can easily link the accordion buttons (triggers) with the content sections they control. - - -## Accordion Trigger Data Attributes - - -The following data attributes are available for accordion trigger element. - -| Attribute | Description | -| ---------------------- | ----------------------------------------------------------------------------------------------------- | -| `data-collapse-target` | Set the accordion target element, it should be the same as the `data-collapse` data attribute. | - ---- - -## Accordion Data Attributes - - -The following data attributes are available for the accordion element. - -| Attribute | Description | -| --------------- | ----------------------------------------------------------------------------------------------------- | -| `data-collapse` | Set the accordion element, it should be the same as the `data-collapse-target` data attribute. | - ---- - -## Required Scripts - - - -The accordion component needs a required script file to work, you just need to add the below script file to the bottom of your html file. - -```html - - - - - -``` ---- + ## Explore More Tailwind CSS Examples Looking for more accordion examples? Check out our FAQs examples from Material Tailwind Blocks. - - ---- + ### Accordion Best Practices for Developers diff --git a/documentation/html/alert.mdx b/documentation/html/alert.mdx index 687dfb67c..f7226b101 100644 --- a/documentation/html/alert.mdx +++ b/documentation/html/alert.mdx @@ -11,9 +11,6 @@ navigation: "alert-dismissible", "custom-alert-close-icon", "alert-with-content", - "alert-data-attributes", - "alert-trigger-data-attributes", - "required-script", "more-examples", ] github: alert @@ -42,9 +39,11 @@ This example of alert with white text and dark gray background creates a high co component={} > ```html - - A simple alert for showing message. + + A simple filled alert for showing message. + + + ``` @@ -61,27 +60,42 @@ The alert component comes with 3 different variants that you can change using th component={} > ```html - - 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. - - + + A simple filled alert for showing message. + + + + + + + + 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. + + + + ``` @@ -97,21 +111,29 @@ The alert component comes with 19 different colors that you can change using the component={} > ```html - + An info alert for showing message. + + + - - An error alert for showing message. + + An red alert for showing message. + + + - - A success alert for showing message. + + An success alert for showing message. + + + - - A warning alert for showing message. + + An warning alert for showing message. + + + ``` @@ -120,7 +142,7 @@ The alert component comes with 19 different colors that you can change using the ## Alert with Icon -You can add an icon at the beginning of the alert component using the i tag. +You can add an icon at the beginning of the alert component using the svg tag. i} > ```html - - - - - - - - A simple alert with icon for showing message + + + A simple filled alert for showing message. + + + ``` @@ -155,81 +173,69 @@ You can add any element you want for the Alert component, below you can see an e component={} > ```html - - - - - - - - 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., ! @ # ? + + + + + - - - - - - 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., ! @ # ? + + + + + ``` @@ -240,7 +246,7 @@ You can add any element you want for the Alert component, below you can see an e ## Alert Dismissible -You can make an alert dismissible by adding the data-dismissible="alertName" data attribute to the alert element and the data-dismissible-target="{`alertName`}" data attribute to the element that you want to close the alert with. +The dismissible alert is a user interface component that displays a message with the option to close or hide it. It includes a close button, allowing users to easily dismiss the alert by clicking the button, enhancing the user experience by keeping the interface clean and free of unnecessary messages. Ideal for notifications, warnings, or informational messages that the user can manually dismiss. data-dismissible="alertNam component={} > ```html - - A dismissible alert for showing message. - - - - - - + + A dismissible alert with closing button. + + + + -; + + + ``` @@ -292,27 +284,27 @@ You can use any DOM element as the alert closing icon. component={} > ```html - - - - - - - - Sorry, something went wrong please try again. - - + class="mt-3 relative flex w-full p-3 text-sm text-white bg-slate-800 rounded-md" + id="alert" +> + + + + + Sorry, something went wrong please try again. + Close - + + + ``` @@ -328,80 +320,22 @@ Use the example below to use an alert component with content elements like title component={} > ```html - - - - - - - - - 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. - - - - - - - - + + + + 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. + + + + ``` ---- - -## Alert Data Attributes - - -The following data attributes are available for alert element. - -| Attribute | Description | -| ------------------ | ------------------------------------------------------------------------------------------------------------- | -| `data-dismissible` | Set the alert dismissible name, it should be the same as the `data-dismissible-target` data attribute. | - ---- - -## Alert Trigger Data Attributes - - -The following data attributes are available for alert trigger element (The element -that you want to close the alert with). - -| Attribute | Description | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `data-dismissible-target` | Hide the alert element that has the same value of `data-dismissible-target` data attribute for it's `data-dismissible` data attribute. | - ---- - -## Required Script - - - -The alert component needs a required script file to work, you just need to add the below script file to the bottom of your html file. - -```html - - - - - -``` --- diff --git a/documentation/html/badge.mdx b/documentation/html/badge.mdx index e106cd4a9..62f77e27b 100644 --- a/documentation/html/badge.mdx +++ b/documentation/html/badge.mdx @@ -9,7 +9,7 @@ navigation: "badge-overlap", "badge-with-border", "badge-dot", - "badge-custome-style", + "badge-custom-style", "more-examples", "best-practices" ] @@ -42,13 +42,10 @@ Get started with this simple badge example that comes with notification button a > ```html - + Notifications - + 5 @@ -61,7 +58,7 @@ Get started with this simple badge example that comes with notification button a Material Tailwind’s badge component comes with 20 different colors that you can change using the color classes. -Below you can check 4 of the examples: bg-red-500, bg-green-500, bg-amber-500, and bg-purple-500. The badge indicators add a visual element to the buttons, making the components more visually appealing and informative. +Below you can check 4 of the examples: bg-red-600, bg-green-600, bg-amber-600, and bg-purple-600. The badge indicators add a visual element to the buttons, making the components more visually appealing and informative. bg-red-500, bg-green- component={} > ```html + - + Red - - + - + Green - - + - + Amber - - + - + Purple - + + ``` @@ -123,46 +107,32 @@ Check out this practical coded example of how to position elements in different component={} > ```html + - + Top Start - - + - + Top End - - + - + Bottom Start - - + - + Bottom End - - + + ``` @@ -175,58 +145,36 @@ This code snippet provides examples of how badge indicators can be effectively u } > ```html + - - - - - - - - - + + + + - + 5 - - - - - - - - - + + + + - - + - + class="relative inline-block h-12 w-12 !rounded-full object-cover object-center" + /> + 5 @@ -234,11 +182,11 @@ This code snippet provides examples of how badge indicators can be effectively u - - + class="relative inline-block h-12 w-12 !rounded-full object-cover object-center" + /> + + ``` @@ -251,18 +199,15 @@ Notify users of unread messages, alerts, or other important information using th } > ```html - + Notifications - + 5 @@ -271,7 +216,7 @@ Notify users of unread messages, alerts, or other important information using th -This badge example comes with a rounded appearance (rounded-full) and is styled with a red background (bg-red-500), white text (text-white), and a white border (border-2 border-white). +This badge example comes with a rounded appearance (rounded-full) and is styled with a red background (bg-red-600), white text (text-white), and a white border (border-2 border-white). --- @@ -285,49 +230,39 @@ This component can be used in user interfaces where a visual indicator is needed } > ```html - + Settings - - + ``` --- -## Badge Custome Style +## Badge Custom Style Use this example in your project if you want to represent a completed or acknowledged state. } > ```html - + Notifications - - - - + + + @@ -336,7 +271,7 @@ Use this example in your project if you want to represent a completed or acknowl -The badge indicator is styled as a small, circular badge (rounded-full) with a gradient background (bg-gradient-to-tr from-green-400 to-green-600), a white border (border-2 border-white), and a shadow (shadow-lg shadow-black/20). It also contains an SVG icon, which is a checkmark (\ element), indicating a positive or completed status. +The badge indicator is styled as a small, circular badge (rounded-full) with a background (bg-green-600), a white border (border border-white). It also contains an SVG icon, which is a checkmark (\ element), indicating a positive or completed status. --- diff --git a/documentation/html/button-group.mdx b/documentation/html/button-group.mdx index 247f21341..6771a9419 100644 --- a/documentation/html/button-group.mdx +++ b/documentation/html/button-group.mdx @@ -43,31 +43,32 @@ This component example showcases a responsive button group with detailed control component={} > ```html - - - - One - - - Two - - - Three - - + + + One + + + Two + + + Three + ``` -The first and last buttons in the group have rounded-r-none border-r-0 and rounded-l-none, respectively. This removes the rounded corners and right border of the first button and the left rounded corner of the last button, creating a great group appearance. +The first and last buttons in the group have rounded-r-none and rounded-l-none, respectively. This removes the rounded corners and right border of the first button and the left rounded corner of the last button, creating a great group appearance. --- @@ -82,87 +83,90 @@ Get inspired by this series of button groups, each with different styling, arran component={} > ```html - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + ``` -The first component variant features a classic and straightforward design with solid gray backgrounds (bg-gray-900) and white text. -The second variant stands out with a gradient background (bg-gradient-to-tr from-gray-900 to-gray-800), transitioning from dark gray to slightly lighter gray. -The third variant adopts a more minimalistic approach, featuring a border (border border-gray-900) around each button and gray text. -The fourth button group is the most simplistic, with no explicit background color but a subtle hover background effect (hover:bg-gray-900/10). +The first component variant features a classic and straightforward design with solid gray backgrounds (bg-slate-800) and white text. +The second variant stands out with a gradient background (bg-gradient-to-tr from-slate-800 to-slate-700), transitioning from dark gray to slightly lighter gray. +The third variant adopts a more minimalistic approach, featuring a border (border border-slate-300) around each button and slate text. +The fourth button group is the most simplistic, with no explicit background color but a subtle hover background effect (hover:bg-slate-800). Using Tailwind CSS's utility classes and Material Tailwind's design as a starting point, you can create diverse designs while maintaining a cohesive user interface. @@ -180,60 +184,64 @@ This button group component example shows you how to create responsive and scala component={} > ```html - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + ``` @@ -260,77 +268,88 @@ This example showcases four distinct button groups, each differentiated by color component={} > ```html - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - - - One - - - Two - - - Three - - - + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + + + + + + One + + + Two + + + Three + ``` @@ -349,24 +368,25 @@ This example illustrates a single row of three buttons optimized for a full-widt component={} > ```html - - - - One - - - Two - - - Three - - + + + One + + + Two + + + Three + ``` @@ -374,7 +394,7 @@ This example illustrates a single row of three buttons optimized for a full-widt --- -## Button Group Custom Styels +## Button Group Custom Style The button group is encapsulated within a grid container that ensures the buttons are centrally placed. The shadow (shadow-md shadow-gray-900/10) adds depth to the buttons, making them stand out against the light blue background. @@ -385,24 +405,25 @@ The button group is encapsulated within a grid container that ensures the button component={} > ```html - - - - One - - - Two - - - Three - - + + + One + + + Two + + + Three + ``` diff --git a/documentation/html/button.mdx b/documentation/html/button.mdx index f958f0d8e..3cb8e4071 100644 --- a/documentation/html/button.mdx +++ b/documentation/html/button.mdx @@ -44,10 +44,7 @@ Use this versatile button that comes with a dark theme with gray background and component={} > ```html - + Button ``` @@ -65,30 +62,20 @@ See our button examples below. They come in different styles and colors. component={} > ```html - - filled - - - gradient - - - outlined - - - text - + + + Filled + + + Gradient + + + Outlined + + + Text + + ``` @@ -104,24 +91,36 @@ Use this example to create buttons in different sizes. component={} > ```html - - small - - - medium - - - large - + + Xsmall + + + Small + + + Medium + + + Large + + + XLarge + ``` @@ -137,30 +136,18 @@ Use this example to create a simple button element for your Tailwind CSS project component={} > ```html - - color blue - - - color red - - - color green - - - color amber - + + Button Blue + + + Button Red + + + Button Green + + + Button Amber + ``` @@ -176,47 +163,34 @@ You can use any type of icons inside the button, in the below example we've used component={} > ```html - - - - - - Add to Bookmark - - - - - - - Upload Files - - - Refresh - - - - - - Read More - - - - + + + + + + Go Shopping + + + + + + + Upload Files + + + Homepage + + + + + + + Read More + + + + + ``` @@ -232,10 +206,8 @@ A button could be a block-level component as well that gets all the available sp component={} > ```html - - block level button + + Block Level Button ``` @@ -252,26 +224,18 @@ You can use tailwind css rounded-full class with Button to create r component={} > ```html - - Filled - - - Gradient - - - Outlined - - - Text - + + Filled + + + Gradient + + + Outlined + + + Text + ``` @@ -288,34 +252,26 @@ You can wrap Button component with {``} tag to make component={} > ```html - - - Filled - - - - - Gradient - - - - - Outlined - - - - - Text - - + + + Filled + + + + + Gradient + + + + + Outlined + + + + + Text + + ``` @@ -331,19 +287,12 @@ You can turn on/off the ripple effect for the button component by changing } > ```html - - Ripple Effect On - - Ripple Effect Off - + + Ripple Effect On + + + Ripple Effect Off + ``` @@ -359,26 +308,33 @@ You can use tailwind css classes with Button to create beautiful bu component={} > ```html - - - Connect Wallet - - - - Continue with - Google - - Sign in with Twitter - - - - + + + Connect Wallet + + + + + Continue with Google + + + + Sign in with Twitter + + + ``` diff --git a/documentation/html/checkbox.mdx b/documentation/html/checkbox.mdx index cd075d080..58531f61c 100644 --- a/documentation/html/checkbox.mdx +++ b/documentation/html/checkbox.mdx @@ -50,17 +50,11 @@ Use this simple and versatile checkbox example for your forms or other component > ```html - - - - - + + + + + @@ -82,136 +76,86 @@ You can customize your Material Tailwind checkbox to fit your design with differ > ```html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -229,24 +173,24 @@ Use this example if you want to offer users the option to "Remember Me" when log > ```html - + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-2" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + Remember Me - + ``` @@ -263,43 +207,59 @@ Use this example in your web project when you want to provide users with the opt component={} > ```html - - - - - - - - - - - Ripple Effect On - - - - - - - - - - - - - Ripple Effect Off - - + + + + + + + + + + + Ripple Effect On + + + + + + + + + + + + + + Ripple Effect Off + + ``` @@ -318,28 +278,14 @@ Check out this component example to see how you can implement a custom icon for > ```html - - - + + + + + + + + ``` @@ -357,22 +303,22 @@ Use this component example styled with Tailwind CSS if you want to display a che component={} > ```html - - - - + + + + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + Remember Me @@ -393,26 +339,28 @@ This example works perfectly if you want to make sure that users agree to your w > ```html - + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-with-link" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - - + + I agree with the - - terms and conditions + + terms and conditions . @@ -434,27 +382,27 @@ Use the example below for a more complex usage of a checkbox with a label that c component={} > ```html - - + + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-with-description" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + - + Remember Me - + You'll be able to login without password for 24 hours. @@ -477,82 +425,90 @@ Use the example below for a vertical list of checkboxes. component={} > ```html - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + React + - - React.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Vue.js + - - Vue.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Svelte.js + - - Svelte.js - @@ -573,83 +529,90 @@ Use the example below for a horizontal list of checkboxes. component={} > ```html - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + React + - - React.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Vue.js + - - Vue.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Svelte.js + - - Svelte.js - @@ -673,18 +636,12 @@ You can use the classes to add custom styles to the Checkbox component. > ```html - - - - - - + + + + + + diff --git a/documentation/html/icon-button.mdx b/documentation/html/icon-button.mdx index ce439472e..93b42f4dc 100644 --- a/documentation/html/icon-button.mdx +++ b/documentation/html/icon-button.mdx @@ -41,12 +41,11 @@ Here's how to implement a simple and responsive icon button component. It can be component={} > ```html - - - + + + + + ``` @@ -62,26 +61,29 @@ Check out how to implement different visual styles and interaction states for yo component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -89,10 +91,10 @@ Check out how to implement different visual styles and interaction states for yo In the coded snipped you can see: -• The first button: has a solid gray background (bg-gray-900), white text, and standard shadow effects. It showcases interactive states like hover, focus, and active, with visual feedback including shadow and opacity changes. -• The second button: introduces a gradient background (bg-gradient-to-tr from-gray-900 to-gray-800) while maintaining similar size, shape, and interaction states as the first button. -• The third button: features a border (border border-gray-900) and changes the text color to gray (text-gray-900), distinguishing it from the previous buttons with a more subtle appearance. -• The fourth button: has a transparent background initially with text colored in gray (text-gray-900). The hover and active states introduce a background color change (hover:bg-gray-900/10 active:bg-gray-900/20), making the button's response to user interactions more understated compared to the others. +• The first button: has a solid slate background (bg-slate-800), white text, and standard shadow effects. It showcases interactive states like hover, focus, and active, with visual feedback including shadow and opacity changes. +• The second button: introduces a gradient background (bg-gradient-to-tr from-slate-800 to-slate-700) while maintaining similar size, shape, and interaction states as the first button. +• The third button: features a border (border border-slate-300) and changes the text color to gray (text-slate-600), distinguishing it from the previous buttons with a more subtle appearance. +• The fourth button: has a transparent background initially with text colored in slate (text-slate-600). The hover and active states introduce a background color change (hover:bg-slate-100 active:bg-slate-100), making the button's response to user interactions more understated compared to the others. --- @@ -106,22 +108,35 @@ Use this example to create icon buttons in different sizes. component={} > ```html - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -137,41 +152,29 @@ Use this example to create icon buttons with different colors (blue, red, green, component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -188,23 +191,28 @@ Use this example to create a rounded icon button element for your Tailwind CSS p > ```html - - - - - + + + + + + + + + + + + + + + + + + + + + + ``` @@ -223,48 +231,34 @@ Use this example to create icon buttons with link element. These buttons are des component={} > ```html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -283,22 +277,11 @@ You can turn on/off the ripple effect for the icon button component by changing component={} > ```html - - - - - - - - - - - - + + + + + ``` @@ -318,32 +301,21 @@ In the example below, each button represents a different social media platform t component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + ```
i
svg
Ensure that these - requirements are met:
data-dismissible="alertName"
data-dismissible-target="{`alertName`}"
bg-red-500
bg-green-500
bg-amber-500
bg-purple-500
bg-red-600
bg-green-600
bg-amber-600
bg-purple-600
bg-green- component={} > ```html + - + Red - - + - + Green - - + - + Amber - - + - + Purple - + + ```
rounded-full
text-white
border-2 border-white
bg-gradient-to-tr from-green-400 to-green-600
shadow-lg shadow-black/20
\
border border-white
rounded-r-none border-r-0
rounded-l-none
rounded-r-none
bg-gray-900
bg-gradient-to-tr from-gray-900 to-gray-800
border border-gray-900
hover:bg-gray-900/10
bg-slate-800
bg-gradient-to-tr from-slate-800 to-slate-700
border border-slate-300
hover:bg-slate-800
shadow-md shadow-gray-900/10
Button
{``}
+ + I agree with the - - terms and conditions + + terms and conditions . @@ -434,27 +382,27 @@ Use the example below for a more complex usage of a checkbox with a label that c component={} > ```html - - + + - + checked + class="peer h-5 w-5 cursor-pointer transition-all appearance-none rounded shadow hover:shadow-md border border-slate-300 checked:bg-slate-800 checked:border-slate-800" + id="check-with-description" /> + + d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" + clip-rule="evenodd"> - + - + Remember Me - + You'll be able to login without password for 24 hours. @@ -477,82 +425,90 @@ Use the example below for a vertical list of checkboxes. component={} > ```html - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + React + - - React.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Vue.js + - - Vue.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Svelte.js + - - Svelte.js - @@ -573,83 +529,90 @@ Use the example below for a horizontal list of checkboxes. component={} > ```html - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + React + - - React.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Vue.js + - - Vue.js - - - - - - - - - - - - - - + + + + + + + + + + + + + Svelte.js + - - Svelte.js - @@ -673,18 +636,12 @@ You can use the classes to add custom styles to the Checkbox component. > ```html - - - - - - + + + + + + diff --git a/documentation/html/icon-button.mdx b/documentation/html/icon-button.mdx index ce439472e..93b42f4dc 100644 --- a/documentation/html/icon-button.mdx +++ b/documentation/html/icon-button.mdx @@ -41,12 +41,11 @@ Here's how to implement a simple and responsive icon button component. It can be component={} > ```html - - - + + + + + ``` @@ -62,26 +61,29 @@ Check out how to implement different visual styles and interaction states for yo component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -89,10 +91,10 @@ Check out how to implement different visual styles and interaction states for yo In the coded snipped you can see: -• The first button: has a solid gray background (bg-gray-900), white text, and standard shadow effects. It showcases interactive states like hover, focus, and active, with visual feedback including shadow and opacity changes. -• The second button: introduces a gradient background (bg-gradient-to-tr from-gray-900 to-gray-800) while maintaining similar size, shape, and interaction states as the first button. -• The third button: features a border (border border-gray-900) and changes the text color to gray (text-gray-900), distinguishing it from the previous buttons with a more subtle appearance. -• The fourth button: has a transparent background initially with text colored in gray (text-gray-900). The hover and active states introduce a background color change (hover:bg-gray-900/10 active:bg-gray-900/20), making the button's response to user interactions more understated compared to the others. +• The first button: has a solid slate background (bg-slate-800), white text, and standard shadow effects. It showcases interactive states like hover, focus, and active, with visual feedback including shadow and opacity changes. +• The second button: introduces a gradient background (bg-gradient-to-tr from-slate-800 to-slate-700) while maintaining similar size, shape, and interaction states as the first button. +• The third button: features a border (border border-slate-300) and changes the text color to gray (text-slate-600), distinguishing it from the previous buttons with a more subtle appearance. +• The fourth button: has a transparent background initially with text colored in slate (text-slate-600). The hover and active states introduce a background color change (hover:bg-slate-100 active:bg-slate-100), making the button's response to user interactions more understated compared to the others. --- @@ -106,22 +108,35 @@ Use this example to create icon buttons in different sizes. component={} > ```html - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -137,41 +152,29 @@ Use this example to create icon buttons with different colors (blue, red, green, component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -188,23 +191,28 @@ Use this example to create a rounded icon button element for your Tailwind CSS p > ```html - - - - - + + + + + + + + + + + + + + + + + + + + + + ``` @@ -223,48 +231,34 @@ Use this example to create icon buttons with link element. These buttons are des component={} > ```html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -283,22 +277,11 @@ You can turn on/off the ripple effect for the icon button component by changing component={} > ```html - - - - - - - - - - - - + + + + + ``` @@ -318,32 +301,21 @@ In the example below, each button represents a different social media platform t component={} > ```html - - - - - - - - + + + + + + + + + + + + + + + ```
I agree with the - - terms and conditions + + terms and conditions .
text-gray-900
hover:bg-gray-900/10 active:bg-gray-900/20
text-slate-600
hover:bg-slate-100 active:bg-slate-100