This is the full developer documentation for Yamada UI v2. # CLI ## Usage :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ### Add Components When you run the `add` command, the specified component and its dependencies will be added to your project. ```bash pnpm yamada-cli add box ``` ```bash npm yamada-cli add box ``` ```bash yarn yamada-cli add box ``` ```bash bun yamada-cli add box ``` :::note All components that the specified component depends on will also be added. ::: If you don't specify a component, all available components will be added. ```bash pnpm yamada-cli add ``` ```bash npm yamada-cli add ``` ```bash yarn yamada-cli add ``` ```bash bun yamada-cli add ``` ```bash Usage: pnpm yamada-cli add [options] [components...] add a component to your project Arguments: components components to add Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --overwrite overwrite existing files. (default: false) -i, --install install dependencies (default: false) -s, --sequential run tasks sequentially. (default: false) -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` ### Check Differences When you run the `diff` command, you can check the difference between the local and remote components. ```bash pnpm yamada-cli diff box ``` ```bash npm yamada-cli diff box ``` ```bash yarn yamada-cli diff box ``` ```bash bun yamada-cli diff box ``` If you don't specify a component, you can check the difference for all components in your project. ```bash pnpm yamada-cli diff ``` ```bash npm yamada-cli diff ``` ```bash yarn yamada-cli diff ``` ```bash bun yamada-cli diff ``` ```bash Usage: pnpm yamada-cli diff [options] [component] check for updates against the registry Arguments: component component to check Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -s, --sequential run tasks sequentially. (default: false) -d, --detail show detailed changes (default: false) -h, --help display help for command ``` ### Update Components When you run the `update` command, the specified component will be updated. ```bash pnpm yamada-cli update box ``` ```bash npm yamada-cli update box ``` ```bash yarn yamada-cli update box ``` ```bash bun yamada-cli update box ``` If you don't specify a component, all components in your project will be updated. ```bash pnpm yamada-cli update ``` ```bash npm yamada-cli update ``` ```bash yarn yamada-cli update ``` ```bash bun yamada-cli update ``` ```bash Usage: pnpm yamada-cli update [options] [components...] update components in your project Arguments: components components to update Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -i, --install install dependencies (default: false) -s, --sequential run tasks sequentially. (default: false) -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` # createComponent ## Overview `createComponent` creates a component that supports conditional styles such as variants. The created component can be inherited, has high extensibility, and generates `className` and `displayName`, so you can also create components with consistent naming conventions in your project. ## Usage To create a single component, use [createComponent](#createcomponent), and to create a slot component, use [createSlotComponent](#createslotcomponent). ### createComponent To create a single component, use `createComponent`. ```tsx import type { HTMLStyledProps, ThemeProps } from "@yamada-ui/react" import { createComponent, defineComponentStyle } from "@yamada-ui/react" ``` ```tsx import type { HTMLStyledProps, ThemeProps } from "@/components/ui" import { createComponent, defineComponentStyle } from "@/components/ui" ``` ```tsx import type { HTMLStyledProps, ThemeProps } from "@workspaces/ui" import { createComponent, defineComponentStyle } from "@workspaces/ui" ``` ```tsx const componentStyle = defineComponentStyle({ base: { /* base style */ }, variants: { /* variant style */ }, sizes: { /* size style */ }, props: { /* props style */ }, compounds: { /* compound style */ }, defaultProps: { /* default props */ }, }) type ComponentStyle = typeof componentStyle export interface ComponentProps extends HTMLStyledProps<"div">, ThemeProps {} const { component, ComponentContext, PropsContext: ComponentPropsContext, useComponentContext, usePropsContext: useComponentPropsContext, withContext, useComponentProps, } = createComponent("component", componentStyle) export { ComponentPropsContext, useComponentPropsContext } ``` :::note `defineComponentStyle` is a function that defines the component style. This function has an important role in type completion. ::: - The first argument is the component name used for `className` and `displayName`. - The second argument is the component style. #### Create a component To create a component, use `withContext`. Set the argument to the HTML element name or function. `withContext` uses the provided style and `PropsContext` props. ```tsx export const Component = withContext("div")() ``` ```tsx export const Component = withContext((props) => { return })() ``` If you don't want to use the provided style and `PropsContext` props, or want to handle the logic, use `component`. ```tsx export const Component = component((props) => { const computedProps = useComponentProps(props) return })() ``` #### Calculate props `withContext` and `component` can perform multi-stage calculations on the provided props. ```tsx export const Component = withContext("button")( { "aria-label": "Default Label" }, ({ "aria-label": ariaLabel, ...rest }) => ({ ariaLabel: ariaLabel === "Default Label" ? "Changed Label" : ariaLabel, ...rest, }), ) ``` :::warning For objects, they are deeply merged. For functions, you need to return the provided props. If you don't return the provided props, the provided props will be lost. ::: #### Transfer props Style props are filtered after calculating the styling. If you also want to use it in the component logic, use `transferProps`. ```tsx export const Component = withContext( ({ size, ...rest }) => { return }, { transferProps: ["size"], }, )() ``` #### Inherit a component `createComponent` created components can be inherited. ```tsx import { Component } from "./component" ``` ```tsx const additionalComponentStyle = defineComponentStyle({ base: { /* base style */ }, variants: { /* variant style */ }, sizes: { /* size style */ }, props: { /* props style */ }, compounds: { /* compound style */ }, defaultProps: { /* default props */ }, }) type AdditionalComponentStyle = typeof additionalComponentStyle export interface AdditionalComponentProps extends HTMLStyledProps<"div">, ThemeProps {} const { ComponentContext, PropsContext: AdditionalComponentPropsContext, useComponentContext, usePropsContext: useAdditionalComponentPropsContext, useComponentProps, withContext, component, } = createComponent( "additional-component", additionalComponentStyle, ) export { AdditionalComponentPropsContext, useAdditionalComponentPropsContext } ``` ```tsx export const AdditionalComponent = withContext(Component)() ``` This creates an `AdditionalComponent` that inherits `Component`. The difference from the traditional component inheritance is that it can merge [ref](https://ja.react.dev/learn/referencing-values-with-refs), class names, styles, and [event handlers](https://ja.react.dev/learn/responding-to-events). ```tsx export const AdditionalComponent: FC = ({ className, ...rest }) => { const ref = useRef(null) const onClick = useCallback(() => {}, []) return ( ) } ``` In this case, if `ref` and `onClick` exist in the provided props, they will be overwritten. Depending on the logic, it may not work well. To solve this, you need to merge each value and logic for each component. ```tsx export const AdditionalComponent: FC = ({ ref: forwardedRef, className, onClick: onClickProp, ...rest }) => { const ref = useRef(null) const onClick = useCallback(() => {}, []) return ( ) } ``` By using `createComponent` to inherit a component, you can automatically merge event handlers such as `ref` and `onClick`. :::note If there is a style conflict, that is, each component has `variants`, the `variants` of the inherited component will take precedence. ::: ### createSlotComponent To create a slot component, use `createSlotComponent`. The functionality is the same as [createComponent](#createcomponent). ```tsx import type { HTMLStyledProps, ThemeProps } from "@yamada-ui/react" import { createSlotComponent, defineComponentSlotStyle } from "@yamada-ui/react" ``` ```tsx import type { HTMLStyledProps, ThemeProps } from "@/components/ui" import { createSlotComponent, defineComponentSlotStyle } from "@/components/ui" ``` ```tsx import type { HTMLStyledProps, ThemeProps } from "@workspaces/ui" import { createSlotComponent, defineComponentSlotStyle } from "@workspaces/ui" ``` ```tsx const componentStyle = defineComponentSlotStyle({ base: { root: { /* base root style */ }, item: { /* base item style */ }, }, variants: { /* variant style */ }, sizes: { /* size style */ }, props: { /* props style */ }, compounds: { /* compound style */ }, defaultProps: { /* default props */ }, }) type ComponentStyle = typeof componentStyle export interface ComponentRootProps extends HTMLStyledProps<"div">, ThemeProps {} const { ComponentContext, PropsContext: ComponentPropsContext, StyleContext, useComponentContext, usePropsContext: useComponentPropsContext, useStyleContext, useClassNames, useRootComponentProps, useSlotComponentProps, withProvider, withContext, component, } = createSlotComponent( "component", componentStyle, ) export { ComponentPropsContext, useComponentPropsContext } ``` :::note `defineComponentSlotStyle` is a function that defines the component style. This function has an important role in type completion. ::: - The first argument is the component name prefix used for `className` and `displayName`. - The second argument is the component style. #### Create a component To create a component, use `withProvider` and `withContext`. Each sets the argument to the HTML element name or function for the first argument, and the slot name for the second argument. `withProvider` uses the provided style and `PropsContext` props to generate a context. `withContext` uses the context generated by `withProvider` to use the style based on the slot name. ```tsx export const RootComponent = withProvider("div", "root")() export const ItemComponent = withContext("div", "item")() ``` ```tsx export const RootComponent = withProvider((props) => { return }, "root")() export const ItemComponent = withContext((props) => { return }, "item")() ``` If you don't want to use the provided style and `PropsContext` props, or want to handle the logic, use `component`. ```tsx export const RootComponent = component((props) => { const [context, computedProps] = useRootComponentProps(props, "root") return ( ) }, "root")() export const ItemComponent = component((props) => { const computedProps = useSlotComponentProps(props, "item") return }, "item")() ``` #### Use modifiers To use modifiers, set the slot name to an array. ```tsx const componentStyle = defineComponentSlotStyle({ base: { root: { /* base root style */ }, item: { /* base item style */ }, start: { /* base start style */ }, end: { /* base end style */ }, }, }) ``` ```tsx export const StartItemComponent = withContext("div", ["item", "start"])() export const EndItemComponent = withContext("div", ["item", "end"])() ``` In this case, the style of `item` and `start` or `end` is set, and the class name is `"{prefix}-{name}__item--start"` or `"{prefix}-{name}__item--end"`. # Components ## Usage Yamada UI provides components in two ways. One is a new method of downloading components locally from [CLI](https://yamada-ui.com/docs/components/cli.md). The other is the traditional method of importing components from modules. ### Download The cases for downloading components locally from [CLI](https://yamada-ui.com/docs/components/cli.md) are as follows. - Customize the [variant](https://yamada-ui.com/docs/components/styled.md#variant-style) or [size](https://yamada-ui.com/docs/components/styled.md#size-style) styles of the component. - Customize the initial value or logic of the component. - Fix a bug in the component's style or logic by directly modifying it. ```bash pnpm yamada-cli add button ``` ```bash npm yamada-cli add button ``` ```bash yarn yamada-cli add button ``` ```bash bun yamada-cli add button ``` :::note Yamada UI updates the components, you can easily update the components by checking the [Check Differences](https://yamada-ui.com/docs/components/cli.md#check-differences) or [Update Components](https://yamada-ui.com/docs/components/cli.md#update-components) in [CLI](https://yamada-ui.com/docs/components/cli.md). If your changes conflict with the updates, they will be displayed in the same way as the [HOW CONFLICTS ARE PRESENTED](https://git-scm.com/docs/git-merge#_how_conflicts_are_presented) of [Git](https://git-scm.com), and you can easily resolve them. ::: ### Import If you want to use the component without making any changes, you can simply import the component from the module. ```tsx import { Button } from "@yamada-ui/react" ``` ```tsx import { Button } from "@/components/ui" ``` ```tsx import { Button } from "@workspaces/ui" ``` ## Components Here's a list of all the components available in the library. - [Accordion](https://yamada-ui.com/docs/components/accordion.md) - [ActionBar](https://yamada-ui.com/docs/components/action-bar.md) - [Airy](https://yamada-ui.com/docs/components/airy.md) - [Alert](https://yamada-ui.com/docs/components/alert.md) - [AlphaSlider](https://yamada-ui.com/docs/components/alpha-slider.md) - [AreaChart](https://yamada-ui.com/docs/components/area-chart.md) - [AspectRatio](https://yamada-ui.com/docs/components/aspect-ratio.md) - [Autocomplete](https://yamada-ui.com/docs/components/autocomplete.md) - [Avatar](https://yamada-ui.com/docs/components/avatar.md) - [Badge](https://yamada-ui.com/docs/components/badge.md) - [BarChart](https://yamada-ui.com/docs/components/bar-chart.md) - [Bleed](https://yamada-ui.com/docs/components/bleed.md) - [Blockquote](https://yamada-ui.com/docs/components/blockquote.md) - [Box](https://yamada-ui.com/docs/components/box.md) - [Breadcrumb](https://yamada-ui.com/docs/components/breadcrumb.md) - [Button](https://yamada-ui.com/docs/components/button.md) - [Calendar](https://yamada-ui.com/docs/components/calendar.md) - [Card](https://yamada-ui.com/docs/components/card.md) - [Carousel](https://yamada-ui.com/docs/components/carousel.md) - [Center](https://yamada-ui.com/docs/components/center.md) - [Chat](https://yamada-ui.com/docs/components/chat.md) - [Checkbox](https://yamada-ui.com/docs/components/checkbox.md) - [CheckboxCard](https://yamada-ui.com/docs/components/checkbox-card.md) - [CircleProgress](https://yamada-ui.com/docs/components/circle-progress.md) - [ClientOnly](https://yamada-ui.com/docs/components/client-only.md) - [CloseButton](https://yamada-ui.com/docs/components/close-button.md) - [Code](https://yamada-ui.com/docs/components/code.md) - [Collapse](https://yamada-ui.com/docs/components/collapse.md) - [ColorPicker](https://yamada-ui.com/docs/components/color-picker.md) - [ColorSelector](https://yamada-ui.com/docs/components/color-selector.md) - [ColorSwatch](https://yamada-ui.com/docs/components/color-swatch.md) - [Container](https://yamada-ui.com/docs/components/container.md) - [DataList](https://yamada-ui.com/docs/components/data-list.md) - [DatePicker](https://yamada-ui.com/docs/components/date-picker.md) - [Dockable](https://yamada-ui.com/docs/components/dockable.md) - [DonutChart](https://yamada-ui.com/docs/components/donut-chart.md) - [Drawer](https://yamada-ui.com/docs/components/drawer.md) - [Dropzone](https://yamada-ui.com/docs/components/dropzone.md) - [Editable](https://yamada-ui.com/docs/components/editable.md) - [Em](https://yamada-ui.com/docs/components/em.md) - [EmptyState](https://yamada-ui.com/docs/components/empty-state.md) - [Fade](https://yamada-ui.com/docs/components/fade.md) - [FadeScale](https://yamada-ui.com/docs/components/fade-scale.md) - [Field](https://yamada-ui.com/docs/components/field.md) - [Fieldset](https://yamada-ui.com/docs/components/fieldset.md) - [FileButton](https://yamada-ui.com/docs/components/file-button.md) - [FileInput](https://yamada-ui.com/docs/components/file-input.md) - [Flex](https://yamada-ui.com/docs/components/flex.md) - [Flip](https://yamada-ui.com/docs/components/flip.md) - [Float](https://yamada-ui.com/docs/components/float.md) - [FocusLock](https://yamada-ui.com/docs/components/focus-lock.md) - [For](https://yamada-ui.com/docs/components/for.md) - [Form](https://yamada-ui.com/docs/components/form.md) - [Format](https://yamada-ui.com/docs/components/format.md) - [Grid](https://yamada-ui.com/docs/components/grid.md) - [Group](https://yamada-ui.com/docs/components/group.md) - [Heading](https://yamada-ui.com/docs/components/heading.md) - [Highlight](https://yamada-ui.com/docs/components/highlight.md) - [HStack](https://yamada-ui.com/docs/components/h-stack.md) - [HueSlider](https://yamada-ui.com/docs/components/hue-slider.md) - [Icon](https://yamada-ui.com/docs/components/icon.md) - [IconButton](https://yamada-ui.com/docs/components/icon-button.md) - [Image](https://yamada-ui.com/docs/components/image.md) - [Indicator](https://yamada-ui.com/docs/components/indicator.md) - [InfiniteScrollArea](https://yamada-ui.com/docs/components/infinite-scroll-area.md) - [Input](https://yamada-ui.com/docs/components/input.md) - [Kbd](https://yamada-ui.com/docs/components/kbd.md) - [LineChart](https://yamada-ui.com/docs/components/line-chart.md) - [Link](https://yamada-ui.com/docs/components/link.md) - [LinkBox](https://yamada-ui.com/docs/components/link-box.md) - [List](https://yamada-ui.com/docs/components/list.md) - [Loading](https://yamada-ui.com/docs/components/loading.md) - [Mark](https://yamada-ui.com/docs/components/mark.md) - [Menu](https://yamada-ui.com/docs/components/menu.md) - [Modal](https://yamada-ui.com/docs/components/modal.md) - [Motion](https://yamada-ui.com/docs/components/motion.md) - [NativePopover](https://yamada-ui.com/docs/components/native-popover.md) - [NativeSelect](https://yamada-ui.com/docs/components/native-select.md) - [NativeTable](https://yamada-ui.com/docs/components/native-table.md) - [NumberInput](https://yamada-ui.com/docs/components/number-input.md) - [Pagination](https://yamada-ui.com/docs/components/pagination.md) - [PasswordInput](https://yamada-ui.com/docs/components/password-input.md) - [PhoneInput](https://yamada-ui.com/docs/components/phone-input.md) - [Picture](https://yamada-ui.com/docs/components/picture.md) - [PieChart](https://yamada-ui.com/docs/components/pie-chart.md) - [PinInput](https://yamada-ui.com/docs/components/pin-input.md) - [Popover](https://yamada-ui.com/docs/components/popover.md) - [Portal](https://yamada-ui.com/docs/components/portal.md) - [Progress](https://yamada-ui.com/docs/components/progress.md) - [QrCode](https://yamada-ui.com/docs/components/qr-code.md) - [RadarChart](https://yamada-ui.com/docs/components/radar-chart.md) - [RadialChart](https://yamada-ui.com/docs/components/radial-chart.md) - [Radio](https://yamada-ui.com/docs/components/radio.md) - [RadioCard](https://yamada-ui.com/docs/components/radio-card.md) - [Rating](https://yamada-ui.com/docs/components/rating.md) - [Reorder](https://yamada-ui.com/docs/components/reorder.md) - [Resizable](https://yamada-ui.com/docs/components/resizable.md) - [Ripple](https://yamada-ui.com/docs/components/ripple.md) - [Rotate](https://yamada-ui.com/docs/components/rotate.md) - [SaturationSlider](https://yamada-ui.com/docs/components/saturation-slider.md) - [ScrollArea](https://yamada-ui.com/docs/components/scroll-area.md) - [SegmentedControl](https://yamada-ui.com/docs/components/segmented-control.md) - [Select](https://yamada-ui.com/docs/components/select.md) - [Separator](https://yamada-ui.com/docs/components/separator.md) - [Show](https://yamada-ui.com/docs/components/show.md) - [SimpleGrid](https://yamada-ui.com/docs/components/simple-grid.md) - [Skeleton](https://yamada-ui.com/docs/components/skeleton.md) - [Slide](https://yamada-ui.com/docs/components/slide.md) - [SlideFade](https://yamada-ui.com/docs/components/slide-fade.md) - [Slider](https://yamada-ui.com/docs/components/slider.md) - [Slot](https://yamada-ui.com/docs/components/slot.md) - [Snacks](https://yamada-ui.com/docs/components/snacks.md) - [Spacer](https://yamada-ui.com/docs/components/spacer.md) - [Stack](https://yamada-ui.com/docs/components/stack.md) - [Stat](https://yamada-ui.com/docs/components/stat.md) - [Status](https://yamada-ui.com/docs/components/status.md) - [Steps](https://yamada-ui.com/docs/components/steps.md) - [Swipeable](https://yamada-ui.com/docs/components/swipeable.md) - [Switch](https://yamada-ui.com/docs/components/switch.md) - [Table](https://yamada-ui.com/docs/components/table.md) - [Tabs](https://yamada-ui.com/docs/components/tabs.md) - [Tag](https://yamada-ui.com/docs/components/tag.md) - [Text](https://yamada-ui.com/docs/components/text.md) - [Textarea](https://yamada-ui.com/docs/components/textarea.md) - [Timeline](https://yamada-ui.com/docs/components/timeline.md) - [TimePicker](https://yamada-ui.com/docs/components/time-picker.md) - [Tip](https://yamada-ui.com/docs/components/tip.md) - [Toggle](https://yamada-ui.com/docs/components/toggle.md) - [Tooltip](https://yamada-ui.com/docs/components/tooltip.md) - [Tour](https://yamada-ui.com/docs/components/tour.md) - [Tree](https://yamada-ui.com/docs/components/tree.md) - [VisuallyHidden](https://yamada-ui.com/docs/components/visually-hidden.md) - [VStack](https://yamada-ui.com/docs/components/v-stack.md) - [Wrap](https://yamada-ui.com/docs/components/wrap.md) - [ZStack](https://yamada-ui.com/docs/components/z-stack.md) # Internationalization ## Overview Internationalization is the process of structuring code and user interfaces to be localized. Yamada UI supports various localizations in many components, from built-in string translations to date and number formats. By using Yamada UI's components, these internationalizations are automatically handled. ## Localization Localization is the process of adapting an application to a specific language or region. It includes adjustments such as text translations, date and number formats, and text search. Yamada UI supports localization in over 30 locales. :::note Yamada UI uses [Intl MessageFormat](https://formatjs.github.io/docs/intl-messageformat) internally. ::: ## Change the Locale To change the locale, set a value for [locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales). ```tsx import { UIProvider } from "@yamada-ui/react" const App = () => { return ( ) } ``` :::note Yamada UI automatically detects the locale using [navigator.language](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language) and [Intl.DateTimeFormat.supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/supportedLocalesOf). After detection, it automatically updates using [languagechange](https://developer.mozilla.org/en-US/docs/Web/API/Window/languagechange_event). Therefore, when setting the locale to match the user's application, you do not need to set the `locale`. ::: ## Change the Label To change the label, you need to download the `i18n-provider` using the [CLI](https://yamada-ui.com/docs/get-started/cli.md). :::warning Before running the following commands, you need to install `@yamada-ui/cli` and run the `init` command. Please refer to [this](https://yamada-ui.com/docs/get-started/cli.md) for more details. ::: ### Add the Provider Use the `add` command to add the `i18n-provider`. ```bash pnpm yamada-cli add i18n-provider ``` ```bash npm yamada-cli add i18n-provider ``` ```bash yarn yamada-cli add i18n-provider ``` ```bash bun yamada-cli add i18n-provider ``` ### Change the Language Data The `i18n-provider`'s `intl` folder contains the data for each language. Change the data for the language you want to change. ```ts import type { IntlData } from "." const data: IntlData = { /* ... */ avatar: { "Avatar Icon": "ユーザーアイコン", }, /* ... */ } export default data ``` :::warning The language data is based on English, and the English key is associated with the data for each language. If you change `en-US.ts`, you need to correct all language data. If you do not change it, the association of language data will be lost. ::: ## Add a Language To add a language, you need to download the `i18n-provider` using the [CLI](https://yamada-ui.com/docs/get-started/cli.md). :::warning Before running the following commands, you need to install `@yamada-ui/cli` and run the `init` command. Please refer to [this](https://yamada-ui.com/docs/get-started/cli.md) for more details. ::: ### Add the Provider Use the `add` command to add the `i18n-provider`. ```bash pnpm yamada-cli add i18n-provider ``` ```bash npm yamada-cli add i18n-provider ``` ```bash yarn yamada-cli add i18n-provider ``` ```bash bun yamada-cli add i18n-provider ``` ### Add the Language Data The `i18n-provider`'s `intl` folder contains the data for each language. Add the data for the new language. The data is copied and pasted from `intl/en-US.ts` and changed for each value. ```ts import type { IntlData } from "." const data: IntlData = { autocomplete: { "Clear value": "Giá trị xóa", "No results found": "Không tìm thấy kết quả", }, /* ... */ } export default data ``` ### Update the Index Add the language data you added to `intl/index.ts`. ```ts import arAE from "./ar-AE" /* ... */ import viVN from "./vi-VN" /* ... */ export default { "ar-AE": arAE, /* ... */ "vi-VN": viVN, } ``` ## Supported Locales - Japanese (Japan) - English (Great Britain) - English (United States) - Arabic (United Arab Emirates) - Bulgarian (Bulgaria) - Croatian (Croatia) - Czech (Czech Republic) - Danish (Denmark) - Dutch (Netherlands) - Estonian (Estonia) - Finnish (Finland) - French (Canada) - French (France) - German (Germany) - Greek (Greece) - Hebrew (Israel) - Hungarian (Hungary) - Italian (Italy) - Latvian (Latvia) - Lithuanian (Lithuania) - Norwegian (Norway) - Polish (Poland) - Portuguese (Brazil) - Romanian (Romania) - Russian (Russia) - Serbian (Serbia) - Slovakian (Slovakia) - Slovenian (Slovenia) - Spanish (Spain) - Swedish (Sweden) - Turkish (Turkey) - Ukrainian (Ukraine) - Chinese (Simplified) - Chinese (Traditional) - Korean (Korea) ## Optimize the Bundle Size Yamada UI includes the data for all of the languages above by default. This is convenient for many users, but it increases the bundle size. If your application does not support all of these locales, you can optimize the bundle size by removing unnecessary data from `intl/index.ts`. # styled ## Overview `styled` is an object of JSX elements enabled with Yamada UI's style system, and can also be used as a function for custom components to receive Yamada UI's style system. ## Usage Use the `styled.` notation to generate an HTML element with [Style Props](https://yamada-ui.com/docs/styling/style-props.md). For example, to generate an `button` element with [Style Props](https://yamada-ui.com/docs/styling/style-props.md), write ``. ```tsx ``` ### Create a component `styled` can be used in two ways: as an object of JSX elements (``) and as a function that returns a JSX element (`styled('div')`). The function is suitable for generating simple components. ```tsx import { styled } from "@workspaces/ui" const Button = styled("button") const App = () => { return } ``` You can also pass a custom component to the argument and generate a custom component with [Style Props](https://yamada-ui.com/docs/styling/style-props.md). ```tsx import { styled } from "@workspaces/ui" import { YourComponent } from "./your-component" const NewComponent = styled(YourComponent) const App = () => { return } ``` ### Styling You can set default styles for a component or set styles based on conditions such as `variant` and `size`. #### Base Style Base style sets the default styles for a component. ```tsx const Button = styled("button", { base: { alignItems: "center", appearance: "none", cursor: "pointer", display: "inline-flex", fontWeight: "medium", justifyContent: "center", overflow: "hidden", position: "relative", rounded: "l2", transitionDuration: "moderate", transitionProperty: "common", userSelect: "none", verticalAlign: "middle", whiteSpace: "nowrap", _readOnly: { layerStyle: "readOnly" }, _disabled: { layerStyle: "disabled" }, }, }) ``` #### Variant Style Variant style sets styles based on the `variant` of the component. ```tsx const Button = styled("button", { variants: { outline: { layerStyle: "outline", _hover: { layerStyle: "outline.hover" }, }, solid: { layerStyle: "solid", _hover: { layerStyle: "solid.hover" }, }, subtle: { layerStyle: "subtle", _hover: { layerStyle: "subtle.hover" }, }, }, }) ``` To apply the variant style, set the `variant` value. ```tsx ) ``` :::note If you want to know more about the theme, please check [this](https://yamada-ui.com/docs/theming.md). ::: ### Layer Styles Layer styles are tokens used to reuse visual styles across the project. ```tsx preview {(token, index) => ( {toTitleCase(token)} )} ``` :::note If you want to know more about the layer styles, please check [this](https://yamada-ui.com/docs/styling/layer-styles.md). ::: ### Text Styles Text styles are tokens used to reuse text styles across the project. ```tsx Mono ``` :::note If you want to know more about the text styles, please check [this](https://yamada-ui.com/docs/styling/text-styles.md). ::: ## Loading Yamada UI supports loading animations needed for applications. To execute the loading animation, use [useLoading](https://yamada-ui.com/docs/hooks/use-loading.md). [useLoading](https://yamada-ui.com/docs/hooks/use-loading.md) returns instances of `screen`, `page`, and `background`. The instances include several methods. - `start`: Start the loading animation. - `update`: Update the loading animation. - `finish`: Finish the loading animation. - `force`: Force update the loading animation. ```tsx const { screen, page, background } = useLoading() const onLoadingScreen = async () => { try { screen.start() await wait(3000) } finally { screen.finish() } } const onLoadingPage = async () => { try { page.start() await wait(3000) } finally { page.finish() } } const onLoadingBackground = async () => { try { background.start() await wait(3000) } finally { background.finish() } } return ( ) ``` ### Use useAsyncCallback When executing asynchronous callbacks in applications, [useAsyncCallback](https://yamada-ui.com/docs/hooks/use-async-callback.md) is useful to indicate whether a button or other elements are loading. ```tsx const [loading, onClick] = useAsyncCallback(async () => { await wait(3000) }, []) return ( ) ``` `screen` and `page` can also be executed together. ```tsx const [loading, onClick] = useAsyncCallback( async () => { await wait(3000) }, [], { loading: "page" }, ) return ( ) ``` :::note If you want to know more about the loading animation, please check [this](https://yamada-ui.com/docs/hooks/use-loading.md). ::: ## Notice Yamada UI supports notices needed for applications. To display the notice, use [useNotice](https://yamada-ui.com/docs/hooks/use-notice.md). [useNotice](https://yamada-ui.com/docs/hooks/use-notice.md) returns an instance that displays and controls the notice. ```tsx const notice = useNotice() return ( ) ``` :::note If you want to know more about the notice, please check [this](https://yamada-ui.com/docs/hooks/use-notice.md). ::: ## Animation Yamada UI provides components specialized in CSS animations and animations. ### CSS Animation [@keyframes](https://developer.mozilla.org/ja/docs/Web/CSS/@keyframes) to apply intermediate states of animations, use `_keyframes`. ```tsx Box ``` Also, you can apply common keyframes throughout your application by using [theme](https://yamada-ui.com/docs/theming.md) [keyframes](https://yamada-ui.com/docs/theming/tokens/keyframes.md). Set the value to `animationName` or `_keyframes`. ```tsx Box ``` :::note If you want to know more about the animation, please check [this](https://yamada-ui.com/docs/styling/animation.md). ::: ### Motion Yamada UI provides a convenient component that extends the Yamada UI [Style Props](https://yamada-ui.com/docs/styling/style-props.md) to [Motion](https://motion.dev). ```tsx
``` [Motion](https://yamada-ui.com/docs/components/motion.md) supports gesture animations. - `whileHover`: The animation executed when the pointer is moved over the component. - `whileTap`: The animation executed when the pointer is clicked or tapped on the component. - `whileFocus`: The animation executed when the component is focused. ```tsx Click me! ``` :::note If you want to know more about the `Motion` component, please check [this](https://yamada-ui.com/docs/components/motion.md). ::: ## Congratulations! Congratulations!🎉 This means you've become a **Wonderful Yamada**🥳 ## Learn more Want to learn more about Yamada UI?😎 - [Learn the Theme](https://yamada-ui.com/docs/theming.md): Yamada UI's theme is customizable and ensures consistency in the application's design. - [Explore the Components](https://yamada-ui.com/docs/components.md): Yamada UI provides over 130 flexible components. All components support animations and dark mode. - [Learn the Styling](https://yamada-ui.com/docs/styling.md): All components are designed to be styled using props. - [Explore the Source Code](https://github.com/yamada-ui/yamada-ui): Yamada UI's package and documentation site are open source. If you like Yamada UI, please star it. # Learn the Basics This guide will help you understand the concepts of Yamada UI. We recommend reading this guide before you start developing with Yamada UI. :::tip This guide is basic and is intended to give you a sense of the **fun** of developing with Yamada UI. Therefore, it does not explain each concept and feature in depth. If you want to know more, please check the links within the page. ::: ## Components Yamada UI provides components in two ways. One is a new method of downloading components locally from [CLI](https://yamada-ui.com/docs/components/cli.md). The other is the traditional method of importing components from modules. ### Download The cases for downloading components locally from [CLI](https://yamada-ui.com/docs/components/cli.md) are as follows. - Customize the [variant](https://yamada-ui.com/docs/components/styled.md#variant-style) or [size](https://yamada-ui.com/docs/components/styled.md#size-style) styles of the component. - Customize the initial value or logic of the component. - Fix a bug in the component's style or logic by directly modifying it. ```bash pnpm yamada-cli add button ``` ```bash npm yamada-cli add button ``` ```bash yarn yamada-cli add button ``` ```bash bun yamada-cli add button ``` :::note Yamada UI updates the components, you can easily update the components by checking the [Check Differences](https://yamada-ui.com/docs/components/cli.md#check-differences) or [Update Components](https://yamada-ui.com/docs/components/cli.md#update-components) in [CLI](https://yamada-ui.com/docs/components/cli.md). If your changes conflict with the updates, they will be displayed in the same way as the [HOW CONFLICTS ARE PRESENTED](https://git-scm.com/docs/git-merge#_how_conflicts_are_presented) of [Git](https://git-scm.com), and you can easily resolve them. ::: ### Import If you want to use the component without making any changes, you can simply import the component from the module. ```tsx import { Button } from "@yamada-ui/react" ``` ```tsx import { Button } from "@/components/ui" ``` ```tsx import { Button } from "@workspaces/ui" ``` :::note If you want to know more about the components, please check [this](https://yamada-ui.com/docs/components.md). ::: ## Styling [Style Props](https://yamada-ui.com/docs/styling/style-props.md) is a prop that applies styles to elements using props. Style Props follows the [CSS properties](https://developer.mozilla.org/ja/docs/Web/CSS/Properties) and provides all properties in camelCase. ```tsx Box ``` :::note [Style Props](https://yamada-ui.com/docs/styling/style-props.md) uses [@mdn/browser-compat-data](https://github.com/mdn/browser-compat-data). When the library is updated, Style Props is also updated periodically. ::: ### Conditional Styles Conditional styles allow you to apply styles to [pseudo-elements](https://yamada-ui.com/docs/styling/style-props.md#pseudo-elements), [pseudo-classes](https://yamada-ui.com/docs/styling/style-props.md#pseudo-classes), and [selectors](https://yamada-ui.com/docs/styling/style-props.md#selectors). ```tsx Hover me ``` :::note If you want to know more about the styling, please check [this](https://yamada-ui.com/docs/styling.md). ::: ### Color Schemes Color schemes generate a color context for the component based on the values. This improves consistency in colors. ```tsx Solid Subtle ``` Color schemes inherit the color scheme of the parent element. ```tsx Provided by Parent Child ``` :::note If you want to know more about the color schemes, please check [this](https://yamada-ui.com/docs/styling/color-scheme.md). ::: ## Responsive Design Responsive design refers to the breakpoints defined in the theme. Yamada UI has a default theme, and [breakpoints](https://yamada-ui.com/docs/theming/tokens/breakpoints.md) are defined. To apply responsive design to [Style Props](https://yamada-ui.com/docs/styling/style-props.md), set an object with the breakpoints as the key. - The keys of the object define the keys set in the theme's [breakpoints](https://yamada-ui.com/docs/theming/tokens/breakpoints.md). - The values of the object define the values of the styles set by the key. ```tsx Box ``` :::note If you want to know more about the responsive design, please check [this](https://yamada-ui.com/docs/styling/responsive-design.md). ::: ## Color Mode Yamada UI has built-in support for managing the application's color mode, allowing you to easily switch between light and dark modes. All provided components also support dark mode. To apply color mode to [Style Props](https://yamada-ui.com/docs/styling/style-props.md), set an array. - Set the value for light mode as the first element. - Set the value for dark mode as the last element. ```tsx Box ``` :::note If you want to know more about the color mode, please check [this](https://yamada-ui.com/docs/styling/color-mode.md). ::: ## Congratulations! Congratulations!🎉 This means you've become a **Regular Yamada**🥳 To the **Regular Yamada**, I'd like to give you this word. "Next, I'm waiting for you in [Learn the Advanced](https://yamada-ui.com/docs/get-started/advanced.md)///"😘 ## Learn more Want to learn more about Yamada UI?😎 - [Learn the Advanced](https://yamada-ui.com/docs/get-started/advanced.md): Learn the applications of styling, responsiveness, dark mode, and animations of Yamada UI. - [Explore the Components](https://yamada-ui.com/docs/components.md): Yamada UI provides over 130 flexible components. All components support animations and dark mode. - [Learn the Styling](https://yamada-ui.com/docs/styling.md): All components are designed to be styled using props. - [Explore the Source Code](https://github.com/yamada-ui/yamada-ui): Yamada UI's package and documentation site are open source. If you like Yamada UI, please star it. # CLI ## Installation To use CLI, you need to install `@yamada-ui/cli` in your project. ```bash pnpm add -D @yamada-ui/cli ``` ```bash npm i -D @yamada-ui/cli ``` ```bash yarn add -D @yamada-ui/cli ``` ```bash bun add -D @yamada-ui/cli ``` ## Commands ### init When you run the `init` command, the necessary files and folders for your project will be created. ```bash pnpm yamada-cli init ``` ```bash npm yamada-cli init ``` ```bash yarn yamada-cli init ``` ```bash bun yamada-cli init ``` ```bash Usage: pnpm yamada-cli init [options] initialize your project and install dependencies Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --overwrite overwrite existing files. (default: false) -j, --jsx use jsx instead of tsx (default: false) -h, --help display help for command ``` After running the `init` command, you will see the following prompts. ```txt Would you like to use monorepo? (recommended) … No / Yes What is the path to the monorepo? … ./workspaces/ui What is the package name? … @workspaces/ui Would you like your code inside a `src/` directory? … No / Yes Would you like to use Prettier? … No / Yes Would you like to use ESLint? … No / Yes ``` After the prompts, the config and required dependencies will be installed. ### add When you run the `add` command, the specified component and its dependencies will be added to your project. ```bash pnpm yamada-cli add box ``` ```bash npm yamada-cli add box ``` ```bash yarn yamada-cli add box ``` ```bash bun yamada-cli add box ``` :::note All components that the specified component depends on will also be added. ::: If you don't specify a component, all available components will be added. ```bash pnpm yamada-cli add ``` ```bash npm yamada-cli add ``` ```bash yarn yamada-cli add ``` ```bash bun yamada-cli add ``` ```bash Usage: pnpm yamada-cli add [options] [components...] add a component to your project Arguments: components components to add Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --overwrite overwrite existing files. (default: false) -i, --install install dependencies (default: false) -s, --sequential run tasks sequentially. (default: false) -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` ### diff When you run the `diff` command, you can check the difference between the local and remote components. ```bash pnpm yamada-cli diff box ``` ```bash npm yamada-cli diff box ``` ```bash yarn yamada-cli diff box ``` ```bash bun yamada-cli diff box ``` If you don't specify a component, you can check the difference for all components in your project. ```bash pnpm yamada-cli diff ``` ```bash npm yamada-cli diff ``` ```bash yarn yamada-cli diff ``` ```bash bun yamada-cli diff ``` ```bash Usage: pnpm yamada-cli diff [options] [component] check for updates against the registry Arguments: component component to check Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -s, --sequential run tasks sequentially. (default: false) -d, --detail show detailed changes (default: false) -h, --help display help for command ``` ### update When you run the `update` command, the specified component will be updated. ```bash pnpm yamada-cli update box ``` ```bash npm yamada-cli update box ``` ```bash yarn yamada-cli update box ``` ```bash bun yamada-cli update box ``` If you don't specify a component, all components in your project will be updated. ```bash pnpm yamada-cli update ``` ```bash npm yamada-cli update ``` ```bash yarn yamada-cli update ``` ```bash bun yamada-cli update ``` ```bash Usage: pnpm yamada-cli update [options] [components...] update components in your project Arguments: components components to update Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -i, --install install dependencies (default: false) -s, --sequential run tasks sequentially. (default: false) -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` ### theme When you run the `theme` command, the theme will be generated at the specified path. ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` :::note If you don't specify a path, the theme will be generated in `./theme`. ::: ```bash Usage: pnpm yamada-cli theme [options] [path] generate theme to your project Arguments: path path to the theme directory Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --overwrite overwrite existing directory. (default: false) -j, --js use js instead of ts -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` ### tokens When you run the `tokens` command, you can update the customized theme typings. This typings are used for [Style Props](https://yamada-ui.com/docs/styling/style-props.md). ```bash pnpm yamada-cli tokens ``` ```bash npm yamada-cli tokens ``` ```bash yarn yamada-cli tokens ``` ```bash bun yamada-cli tokens ``` :::note If you don't specify a path, the `theme.path` will be used. ::: ```bash Usage: pnpm yamada-cli tokens [options] [path] generate theme typings Arguments: path path to the theme file Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --out output path -f, --format format the output file -l, --lint lint the output file --internal generate internal tokens (default: false) -h, --help display help for command ``` ## Configuration After running the `init` command, a `ui.json` will be generated in your project. You can customize it in various ways. | Property | Default | Description | | ------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------ | | `path` | `./ui` | The path to the workspace. | | `monorepo` | `false` | Whether to use a monorepo. | | `jsx` | `false` | Whether to use JSX. | | `theme.path` | `./theme` | The path to the theme directory. | | `components.path` | `./components` | The path to the components directory. | | `components.overwrite` | `true` | Whether to update the local references of existing components when components are added. | | `components.dependents` | `true` | Whether to add dependents of components when components are added. | | `components.dependencies` | `false` | Whether to add dependencies of components when components are added. | | `hooks.path` | `./hooks` | The path to the hooks directory. | | `hooks.overwrite` | `false` | Whether to update the local references of existing hooks when components are added. | | `hooks.dependents` | `true` | Whether to add dependents of hooks when hooks are added. | | `hooks.dependencies` | `false` | Whether to add dependencies of hooks when hooks are added. | | `providers.path` | `./providers` | The path to the providers directory. | | `providers.overwrite` | `false` | Whether to update the local references of existing providers when components are added. | | `providers.dependents` | `true` | Whether to add dependents of providers when providers are added. | | `providers.dependencies` | `false` | Whether to add dependencies of providers when providers are added. | | `format.configPath` | - | The path to the config file for [Prettier](https://prettier.io). | | `format.enabled` | `false` | Whether to run the `--write` option of [Prettier](https://prettier.io) when components are added or updated. | | `lint.enabled` | `false` | Whether to run the `--fix` option of [ESLint](https://eslint.org) when components are added or updated. | # Get Started ## Pick your framework - [Next.js (App)](https://yamada-ui.com/docs/get-started/frameworks/next-app.md): A guide for installing and using Yamada UI with Next.js app directory. - [Next.js (Pages)](https://yamada-ui.com/docs/get-started/frameworks/next-pages.md): A guide for installing and using Yamada UI with Next.js pages directory. - [Vite](https://yamada-ui.com/docs/get-started/frameworks/vite.md): A guide for installing and using Yamada UI with Vite.js projects. - [React Router](https://yamada-ui.com/docs/get-started/frameworks/react-router.md): A guide for installing and using Yamada UI with React Router projects. ## Installation To install Yamada UI in your project, you can either set it up using the [CLI](https://yamada-ui.com/docs/get-started/cli.md) or install it via [npm](https://www.npmjs.com). :::warning Yamada UI is compatible with React 19. If you are using React 18 or earlier, please upgrade to React 19. ::: ### CLI #### Setup Running the command will create the necessary files and folders in your project. ```bash pnpm dlx @yamada-ui/cli init ``` ```bash npx @yamada-ui/cli init ``` ```bash yarn dlx @yamada-ui/cli init ``` ```bash bunx @yamada-ui/cli init ``` #### Install the package Install `@workspaces/ui` to your application. ```bash pnpm add "@workspaces/ui@workspace:*" ``` ```bash npm install "@workspaces/ui@workspace:*" ``` ```bash yarn add "@workspaces/ui@workspace:*" ``` ```bash bun add "@workspaces/ui@workspace:*" ``` #### Add provider After installing, add `UIProvider` to the root of your application. ```tsx import { UIProvider } from "@workspaces/ui" const App = () => { return ( ) } ``` #### Use components After adding `UIProvider`, you can use the components in your application. ```tsx import { Button } from "@workspaces/ui" const App = () => { return } ``` That's it! You've successfully set up Yamada UI. ### npm #### Install the package Yamada UI can be installed with `@yamada-ui/react` only, and all components and hooks can be used. ```bash pnpm add @yamada-ui/react ``` ```bash npm install @yamada-ui/react ``` ```bash yarn add @yamada-ui/react ``` ```bash bun add @yamada-ui/react ``` #### Add provider After installing, add `UIProvider` to the root of your application. ```tsx import { UIProvider } from "@yamada-ui/react" const App = () => { return ( ) } ``` #### Use components After adding `UIProvider`, you can use the components in your application. ```tsx import { Button } from "@yamada-ui/react" const App = () => { return } ``` That's it! You've successfully set up Yamada UI. # Legacy Documentation This is the documentation for Yamada UI v2.x. If you are looking for the documentation for v1.x, please see [this link](https://v1.yamada-ui.com). # LLMs.txt Yamada UI's documentation supports [LLMs.txt](https://llmstxt.org) to make it available for large language models. ## Files - [/llms.txt](https://yamada-ui.com/llms.txt): The documentation site map. - [/llms-full.txt](https://yamada-ui.com/llms-full.txt): All documentation. - [/llms/get-started.txt](https://yamada-ui.com/llms/get-started.txt): Only the documentation for the Get Started. - [/llms/components.txt](https://yamada-ui.com/llms/components.txt): Only the documentation for the Components. - [/llms/hooks.txt](https://yamada-ui.com/llms/hooks.txt): Only the documentation for the Hooks. - [/llms/styling.txt](https://yamada-ui.com/llms/styling.txt): Only the documentation for the Styling. - [/llms/theming.txt](https://yamada-ui.com/llms/theming.txt): Only the documentation for the Theming. ## Usage ### Cursor Use the [@Docs](https://cursor.com/docs/context/symbols#docs) of [Cursor](https://cursor.com) to add [llms.txt](https://yamada-ui.com/llms.txt) or [llms-full.txt](https://yamada-ui.com/llms-full.txt) to your project. # Migration ## New Features ### Setup Using [CLI](https://yamada-ui.com/docs/get-started/cli.md), you can easily set up Yamada UI in your project. ```bash pnpm yamada-cli init ``` ```bash npm yamada-cli init ``` ```bash yarn yamada-cli init ``` ```bash bun yamada-cli init ``` `init` command will display the following prompts. ```txt Would you like to use monorepo? (recommended) … No / Yes What is the path to the monorepo? … ./workspaces/ui What is the package name? … @workspaces/ui Would you like your code inside a `src/` directory? … No / Yes Would you like to use Prettier? … No / Yes Would you like to use ESLint? … No / Yes ``` ### Download From v2.x onwards, there are two ways to use components and hooks. One is the new method of downloading components and hooks locally via the [CLI](https://yamada-ui.com/docs/components/cli.md), and the other is the conventional method of importing them from the module. By downloading the source code, you can customize the initial value or logic of the component or hook, and if there is a bug in the logic, you can fix it directly. ```bash pnpm yamada-cli add button ``` ```bash npm yamada-cli add button ``` ```bash yarn yamada-cli add button ``` ```bash bun yamada-cli add button ``` :::note By downloading the source code and customizing it, you can easily update the source code by checking the [Check Differences](https://yamada-ui.com/docs/components/cli.md#check-differences) or [Update Components](https://yamada-ui.com/docs/components/cli.md#update-components) in [CLI](https://yamada-ui.com/docs/components/cli.md). If your changes conflict with the updates, they will be displayed in the same way as the [HOW CONFLICTS ARE PRESENTED](https://git-scm.com/docs/git-merge#_how_conflicts_are_presented) of [Git](https://git-scm.com), and you can easily resolve them. ::: ### Namespace Import You can now import components using namespaces. ```tsx ``` :::note You can still import components individually, but there are components whose names have changed due to the namespace. For example, in the case of `Accordion`, it has been changed to `AccordionRoot`. ::: ### createComponent Using [createComponent](https://yamada-ui.com/docs/components/create-component.md), you can create components that support conditional styles such as variants. ```tsx const componentStyle = defineComponentStyle({ base: { /* base style */ }, variants: { /* variant style */ }, sizes: { /* size style */ }, props: { /* props style */ }, compounds: { /* compound style */ }, defaultProps: { /* default props */ }, }) type ComponentStyle = typeof componentStyle export interface ComponentProps extends HTMLStyledProps<"div">, ThemeProps {} const { component, ComponentContext, PropsContext: ComponentPropsContext, useComponentContext, usePropsContext: useComponentPropsContext, withContext, useComponentProps, } = createComponent("component", componentStyle) export { ComponentPropsContext, useComponentPropsContext } ``` ```tsx export const Component = withContext("div")() ``` ### mergeProps Using `mergeProps`, you can easily merge props while preventing props from disappearing. Previously, you had to create components while considering the provided props. Using `mergeProps`, you can focus on creating components without considering the provided props. **Before** ```tsx export const Component: FC = ({ ref: forwardedRef, className, onClick: onClickProp, ...rest }) => { const ref = useRef(null) const onClick = useCallback(() => {}, []) return ( ) } ``` **After** ```tsx export const Component: FC = (props) => { const ref = useRef(null) const onClick = useCallback(() => {}, []) return } ``` ### PropsContext Using the `PropsContext` provided by each component, you can set the props of the components in the child elements in bulk. ```tsx const value = useMemo(() => ({ variant: "outline" }), []) return ( ) ``` In the above example, the `Badge` in the child elements of `BadgePropsContext` will all have `variant` set to `"outline"`. ### Polymorphism In addition to the traditional `as`, `asChild` has been added. `as` is used to change the element of the component itself, while `asChild` is used to incorporate the functionality and style of the component into the child elements. **as** ```tsx ``` **asChild** ```tsx ``` ### Cascade Layers Using the [Cascade Layers](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) of CSS, [Theme](https://yamada-ui.com/docs/theming.md) and [Style Props](https://yamada-ui.com/docs/styling/style-props.md) now have priority. Please refer to [Cascade Layers](https://yamada-ui.com/docs/styling/cascade-layers.md) for more details. ### Focus Ring [Style Props](https://yamada-ui.com/docs/styling/style-props.md) has been added [Focus Ring](https://yamada-ui.com/docs/styling/focus-ring.md). Focus Ring is a style used to identify the focused element. Please refer to [Focus Ring](https://yamada-ui.com/docs/styling/focus-ring.md) for more details. ```tsx ``` ```tsx ``` ### Interpolation [Style Props](https://yamada-ui.com/docs/styling/style-props.md) now allows you to easily reference [CSS Custom Properties](https://yamada-ui.com/docs/styling/css-custom-properties.md) using its values. Please refer to [Interpolation](https://yamada-ui.com/docs/styling/interpolation.md) for more details. ```tsx ``` ### CSS Custom Properties [Style Props](https://yamada-ui.com/docs/styling/style-props.md) now allows you to easily set [CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/var). Please refer to [CSS Custom Properties](https://yamada-ui.com/docs/styling/css-custom-properties.md) for more details. ```tsx ``` You can also reference the tokens of [Theme](https://yamada-ui.com/docs/theming.md). ```tsx ``` ### CSS Value Functions [Style Props](https://yamada-ui.com/docs/styling/style-props.md) now allows you to use [CSS Value Functions](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Values_and_Units/CSS_Value_Functions) and reference the corresponding [Theme](https://yamada-ui.com/docs/theming.md) tokens. Please refer to [CSS Value Functions](https://yamada-ui.com/docs/styling/css-value-functions.md) for more details. ```tsx ``` ```tsx ``` ### At-rules [Style Props](https://yamada-ui.com/docs/styling/style-props.md) has been added [At-rules](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule). Please refer to [At-rules](https://yamada-ui.com/docs/styling/at-rules.md) for more details. ```tsx ``` [Container Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries) are also supported. ```tsx ``` ### Internationalization To improve accessibility, we have supported 30 or more languages, including strings embedded in all components, date and number formats. Please refer to [Internationalization](https://yamada-ui.com/docs/components/internationalization.md) for more details. ### Icons New icons have been added. Please refer to [Icons](https://yamada-ui.com/icons.md) for more details. ### Style Props New CSS properties have been added. Please refer to [Style Props](https://yamada-ui.com/docs/styling/style-props.md) for more details. ### Theme - New [keyframes](https://yamada-ui.com/docs/theming/tokens/keyframes.md), [aspectRatios](https://yamada-ui.com/docs/theming/tokens/aspect-ratios.md), [easings](https://yamada-ui.com/docs/theming/tokens/easings.md), and [durations](https://yamada-ui.com/docs/theming/tokens/durations.md) have been added to the theme tokens. - `"mono"` has been added to the [Color Schemes](https://yamada-ui.com/docs/theming/tokens/color-schemes.md). - New tokens have been added to the [Layer Styles](https://yamada-ui.com/docs/theming/styles/layer-styles.md). - New tokens have been added to the [Text Styles](https://yamada-ui.com/docs/theming/styles/text-styles.md). - New tokens have been added to the [Colors](https://yamada-ui.com/docs/theming/tokens/colors.md). - You can now set `className` in the style object of the components. ## Improvements ### styled [ui](https://v1.yamada-ui.com/styled-system/ui) has been renamed to [styled](https://yamada-ui.com/docs/components/styled.md). Also, since only the base style of the component could be set until now, it is now possible to set styles that vary depending on conditions, such as `variants` and `sizes`. **Before** ```tsx const Button = styled("button", { base: { alignItems: "center", appearance: "none", cursor: "pointer", display: "inline-flex", fontWeight: "medium", justifyContent: "center", overflow: "hidden", position: "relative", rounded: "l2", transitionDuration: "moderate", transitionProperty: "common", userSelect: "none", verticalAlign: "middle", whiteSpace: "nowrap", _readOnly: { layerStyle: "readOnly" }, _disabled: { layerStyle: "disabled" }, }, }) ``` **After** ```tsx const Button = styled("button", { base: { alignItems: "center", appearance: "none", cursor: "pointer", display: "inline-flex", fontWeight: "medium", justifyContent: "center", overflow: "hidden", position: "relative", rounded: "l2", transitionDuration: "moderate", transitionProperty: "common", userSelect: "none", verticalAlign: "middle", whiteSpace: "nowrap", _readOnly: { layerStyle: "readOnly" }, _disabled: { layerStyle: "disabled" }, }, variants: { outline: { layerStyle: "outline", _hover: { layerStyle: "outline.hover" }, }, solid: { layerStyle: "solid", _hover: { layerStyle: "solid.hover" }, }, subtle: { layerStyle: "subtle", _hover: { layerStyle: "subtle.hover" }, }, }, }) ``` ### Conditional Styles Conditional style setting has been simplified. The traditional setting can still be used. **Before** ```tsx ``` **After** ```tsx ``` ### Color Scheme Previously, the [Color Scheme](https://yamada-ui.com/docs/styling/color-scheme.md) was set as props for each component. By integrating `colorScheme` into [Style Props](https://yamada-ui.com/docs/styling/style-props.md), it is now available for components other than components. ```tsx ``` Also, since `colorScheme` uses [CSS Custom Properties](https://yamada-ui.com/docs/styling/css-custom-properties.md) to generate a context, it is now also applied to the child elements. ```tsx ``` ### Animation Previously, the [Animation](https://yamada-ui.com/docs/styling/animation.md) used the [useAnimation](https://yamada-ui.com/docs/hooks/use-animation.md) hook. Now, you can set it directly from [Style Props](https://yamada-ui.com/docs/styling/style-props.md). **Before** ```tsx const animation = useAnimation({ _keyframes: { from: { translate: "0 0" }, to: { translate: "100% 0" }, }, duration: "1s", iterationCount: "infinite", timingFunction: "linear", }) return ``` **After** ```tsx ``` ### Components - The styles of each component have been adjusted. - The slot names of each component have been adjusted. - The class names of each component have been adjusted. - The naming convention of all boolean properties (`isOpen`, `isDisabled`, etc.) in the props of each component has been changed. For example, `isOpen` has been changed to `open`. :::note The improvement points of each component are described in the documentation of each component. ::: ### Style Props - `color-mix` has been supported. If the browser does not support `color-mix`, the fallback value will be applied. - `blur` and `brightness` can now be applied without setting `filter="auto"`. - `backdropBlur` and `backdropBrightness` can now be applied without setting `backdropFilter="auto"`. - `translateX` and `skewX` can now be applied without setting `transform="auto"` or `transform="auto-3d"`. ### Theme - [CSS Value Functions](https://yamada-ui.com/docs/styling/css-value-functions.md) can now be used for tokens. - [Interpolation](https://yamada-ui.com/docs/styling/interpolation.md) can now be used for tokens. - [Theme](https://yamada-ui.com/docs/theming.md) can now be defined using `defineTheme`. - Tokens can now be defined using `defineTokens`. - Semantic tokens can now be defined using `defineSemanticTokens`. - Styles can now be defined using `defineStyles`. - [Config](https://yamada-ui.com/docs/theming/config.md) can now be defined using `defineConfig`. - The slot names of the components have been adjusted and changed. - The global styles have been adjusted. - The reset styles have been adjusted. - The values of the tokens have been adjusted. ## Removed Features ### Packages [Tree Shaking](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking) considerations have made it unnecessary to divide each package, and since there is a possibility that other choices than [React](https://react.dev) will become available in future Yamada UI projects, these packages have been deprecated. - [@yamada-ui/input](https://www.npmjs.com/package/@yamada-ui/input) has been deprecated. Use [@yamada-ui/react](https://www.npmjs.com/package/@yamada-ui/react) instead. - [@yamada-ui/use-disclosure](https://www.npmjs.com/package/@yamada-ui/use-disclosure) has been deprecated. Use [@yamada-ui/react](https://www.npmjs.com/package/@yamada-ui/react) instead. - [@yamada-ui/providers](https://www.npmjs.com/package/@yamada-ui/providers) has been deprecated. Use [@yamada-ui/react](https://www.npmjs.com/package/@yamada-ui/react) instead. - [@yamada-ui/theme](https://www.npmjs.com/package/@yamada-ui/theme) has been deprecated. Use [@yamada-ui/react](https://www.npmjs.com/package/@yamada-ui/react) instead. - [@yamada-ui/theme-tools](https://www.npmjs.com/package/@yamada-ui/theme-tools) has been deprecated. Use [@yamada-ui/react](https://www.npmjs.com/package/@yamada-ui/react) instead. - [@yamada-ui/next](https://www.npmjs.com/package/@yamada-ui/next) has been deprecated. ### Style Props - `fallback` has been removed. - `keyframes` has been removed. Use `_keyframes` instead. - `isTruncated` has been removed. Use `truncated` instead. ### Theme - `transitions` has been removed. Use [easings](https://yamada-ui.com/docs/theming/tokens/easings.md) and [durations](https://yamada-ui.com/docs/theming/tokens/durations.md) instead. - `semantics` has been removed. Use `semanticTokens` instead. - `components` has been removed. Use [CLI](https://yamada-ui.com/docs/components/cli.md) to style components. - `extendBaseTheme` has been removed. Use `extendTheme` instead. - `extendStyle` has been removed. Use `extendTheme` instead. - `extendToken` has been removed. Use `extendTheme` instead. - `extendComponent` has been removed. - `extendComponentSize` has been removed. - `extendComponentVariant` has been removed. - `extendComponentDefaultProps` has been removed. - `withDefaultSize` has been removed. - `withDefaultVariant` has been removed. - `withDefaultColorScheme` has been removed. - `withDefaultProps` has been removed. - `generate` has been removed. ### Other - `forwardRef` has been removed. Use [forwardRef](https://react.dev/reference/react/forwardRef) instead. - `memo` has been removed. Use [memo](https://react.dev/reference/react/memo) instead. - `ui` has been removed. Use [styled](https://yamada-ui.com/docs/components/styled.md) instead. - `sx` and `__css` have been removed. Use `css` instead. ## Added Components ### Mark [Mark](https://yamada-ui.com/docs/components/mark.md) has been added. ### ClientOnly [ClientOnly](https://yamada-ui.com/docs/components/client-only.md) has been added. ### Format.Datetime [Format.Datetime](https://yamada-ui.com/docs/components/format.md#日付) has been added. ### Show [Show](https://yamada-ui.com/docs/components/show.md) has been added. ### Slot [Slot](https://yamada-ui.com/docs/components/slot.md) has been added. ### Steps [Steps](https://yamada-ui.com/docs/components/steps.md) has been added. ### Group [Group](https://yamada-ui.com/docs/components/group.md) has been added. ### Timeline [Timeline](https://yamada-ui.com/docs/components/timeline.md) has been added. ## Removed Components ### FontAwesomeIcon [FontAwesomeIcon](https://v1.yamada-ui.com/components/media-and-icons/fontawesome) has been removed. ### NativeImage [NativeImage](https://v1.yamada-ui.com/components/media-and-icons/native-image) has been removed. Use [Image](https://yamada-ui.com/docs/components/image.md) instead. ### Dialog [Dialog](https://v1.yamada-ui.com/components/overlay/dialog) has been removed. Use [Modal](https://yamada-ui.com/docs/components/modal.md#use-props) instead. ### ContextMenu [ContextMenu](https://v1.yamada-ui.com/components/navigation/context-menu) has been removed. Use [Menu.ContextTrigger](https://yamada-ui.com/docs/components/menu.md#use-context-menu) instead. ### FormControl [FormControl](https://v1.yamada-ui.com/components/forms/form-control) has been removed. Use [Field](https://yamada-ui.com/docs/components/field.md) instead. ### MultiAutocomplete [MultiAutocomplete](https://v1.yamada-ui.com/components/forms/multi-autocomplete) has been removed. Use `multiple` of [Autocomplete](https://yamada-ui.com/docs/components/autocomplete.md#enable-multiple-selection) instead. ### MultiDatePicker [MultiDatePicker](https://v1.yamada-ui.com/components/forms/multi-date-picker) has been removed. Use `multiple` of [DatePicker](https://yamada-ui.com/docs/components/date-picker.md#enable-multiple-selection) instead. ### RangeDatePicker [RangeDatePicker](https://v1.yamada-ui.com/components/forms/range-date-picker) has been removed. Use `range` of [DatePicker](https://yamada-ui.com/docs/components/date-picker.md#enable-range-selection) instead. ### MultiSelect [MultiSelect](https://v1.yamada-ui.com/components/forms/multi-select) has been removed. Use `multiple` of [Select](https://yamada-ui.com/docs/components/select.md#enable-multiple-selection) instead. ### YearPicker [YearPicker](https://v1.yamada-ui.com/components/forms/year-picker) has been removed. ### MonthPicker [MonthPicker](https://v1.yamada-ui.com/components/forms/month-picker) has been removed. ### RangeSlider [RangeSlider](https://v1.yamada-ui.com/components/forms/range-slider) has been removed. Use `value` or `defaultValue` of [Slider](https://yamada-ui.com/docs/components/slider.md#enable-range-selection) with an array instead. ### Markdown [Markdown](https://v1.yamada-ui.com/components/data-display/markdown) has been removed. ### Stepper [Stepper](https://v1.yamada-ui.com/components/navigation/stepper) has been removed. Use [Steps](https://yamada-ui.com/docs/components/steps.md) instead. ### Divider [Divider](https://v1.yamada-ui.com/components/layouts/divider) has been removed. Use [Separator](https://yamada-ui.com/docs/components/separator.md) instead. ### PagingTable [PagingTable](https://v1.yamada-ui.com/components/data-display/paging-table) has been removed. Use `enablePagination` of [Table](https://yamada-ui.com/docs/components/table.md#enable-pagination) instead. ## Components that have not been migrated v2.0 does not have all components migrated. These will be migrated in v2.0.x. - [AreaChart](https://yamada-ui.com/docs/components/area-chart.md) - [BarChart](https://yamada-ui.com/docs/components/bar-chart.md) - [DonutChart](https://yamada-ui.com/docs/components/donut-chart.md) - [LineChart](https://yamada-ui.com/docs/components/line-chart.md) - [PieChart](https://yamada-ui.com/docs/components/pie-chart.md) - [RadarChart](https://yamada-ui.com/docs/components/radar-chart.md) - [RadialChart](https://yamada-ui.com/docs/components/radial-chart.md) ## Added Hooks ### useCounter [useCounter](https://yamada-ui.com/docs/hooks/use-counter.md) has been added. ### useDescendants [useDescendants](https://yamada-ui.com/docs/hooks/use-descendants.md) has been added. ### useEyeDropper [useEyeDropper](https://yamada-ui.com/docs/hooks/use-eye-dropper.md) has been added. ### useFocusOnShow [useFocusOnShow](https://yamada-ui.com/docs/hooks/use-focus-on-show.md) has been added. ### useFormatDateTime [useFormatDateTime](https://yamada-ui.com/docs/hooks/use-format-date-time.md) has been added. ### useOnline [useOnline](https://yamada-ui.com/docs/hooks/use-online.md) has been added. ## Removed Hooks ### useToken [useToken](https://v1.yamada-ui.com/hooks/use-token) has been removed. # Hooks ## Usage Yamada UI provides hooks in two ways. One is a new method of downloading hooks locally from [CLI](https://yamada-ui.com/docs/components/cli.md). The other is the traditional method of importing hooks from modules. ### Download The cases for downloading hooks locally from [CLI](https://yamada-ui.com/docs/components/cli.md) are as follows. - Customize the initial value or logic of the hook. - Fix a bug in the hook's logic by directly modifying it. ```bash pnpm yamada-cli add use-disclosure ``` ```bash npm yamada-cli add use-disclosure ``` ```bash yarn yamada-cli add use-disclosure ``` ```bash bun yamada-cli add use-disclosure ``` :::note Yamada UI updates the hooks, you can easily update them in the same way as [Update Components](https://yamada-ui.com/docs/components/cli.md#update-components). If your changes conflict with the updates, they will be displayed in the same way as the [HOW CONFLICTS ARE PRESENTED](https://git-scm.com/docs/git-merge#_how_conflicts_are_presented) of [Git](https://git-scm.com), and you can easily resolve them. ::: ### Import If you want to use the hook without making any changes, you can simply import the hook from the module. ```tsx import { useDisclosure } from "@yamada-ui/react" ``` ```tsx import { useDisclosure } from "@/components/ui" ``` ```tsx import { useDisclosure } from "@workspaces/ui" ``` ## Hooks Here's a list of all the hooks available in the library. - [useAnimation](https://yamada-ui.com/docs/hooks/use-animation.md) - [useAsync](https://yamada-ui.com/docs/hooks/use-async.md) - [useAsyncCallback](https://yamada-ui.com/docs/hooks/use-async-callback.md) - [useBoolean](https://yamada-ui.com/docs/hooks/use-boolean.md) - [useBreakpoint](https://yamada-ui.com/docs/hooks/use-breakpoint.md) - [useBreakpointEffect](https://yamada-ui.com/docs/hooks/use-breakpoint-effect.md) - [useBreakpointState](https://yamada-ui.com/docs/hooks/use-breakpoint-state.md) - [useBreakpointValue](https://yamada-ui.com/docs/hooks/use-breakpoint-value.md) - [useClipboard](https://yamada-ui.com/docs/hooks/use-clipboard.md) - [useColorMode](https://yamada-ui.com/docs/hooks/use-color-mode.md) - [useColorModeValue](https://yamada-ui.com/docs/hooks/use-color-mode-value.md) - [useCounter](https://yamada-ui.com/docs/hooks/use-counter.md) - [useDescendants](https://yamada-ui.com/docs/hooks/use-descendants.md) - [useDisclosure](https://yamada-ui.com/docs/hooks/use-disclosure.md) - [useDynamicAnimation](https://yamada-ui.com/docs/hooks/use-dynamic-animation.md) - [useEyeDropper](https://yamada-ui.com/docs/hooks/use-eye-dropper.md) - [useFocusOnShow](https://yamada-ui.com/docs/hooks/use-focus-on-show.md) - [useFormatByte](https://yamada-ui.com/docs/hooks/use-format-byte.md) - [useFormatDateTime](https://yamada-ui.com/docs/hooks/use-format-date-time.md) - [useFormatNumber](https://yamada-ui.com/docs/hooks/use-format-number.md) - [useHover](https://yamada-ui.com/docs/hooks/use-hover.md) - [useIdle](https://yamada-ui.com/docs/hooks/use-idle.md) - [useInfiniteScroll](https://yamada-ui.com/docs/hooks/use-infinite-scroll.md) - [useInterval](https://yamada-ui.com/docs/hooks/use-interval.md) - [useLoading](https://yamada-ui.com/docs/hooks/use-loading.md) - [useLocalStorage](https://yamada-ui.com/docs/hooks/use-local-storage.md) - [useMediaQuery](https://yamada-ui.com/docs/hooks/use-media-query.md) - [useNotice](https://yamada-ui.com/docs/hooks/use-notice.md) - [useOs](https://yamada-ui.com/docs/hooks/use-os.md) - [useOutsideClick](https://yamada-ui.com/docs/hooks/use-outside-click.md) - [usePrevious](https://yamada-ui.com/docs/hooks/use-previous.md) - [useProcessing](https://yamada-ui.com/docs/hooks/use-processing.md) - [usePromiseDisclosure](https://yamada-ui.com/docs/hooks/use-promise-disclosure.md) - [useResizeObserver](https://yamada-ui.com/docs/hooks/use-resize-observer.md) - [useTheme](https://yamada-ui.com/docs/hooks/use-theme.md) - [useTimeout](https://yamada-ui.com/docs/hooks/use-timeout.md) - [useUpdateBreakpointEffect](https://yamada-ui.com/docs/hooks/use-update-breakpoint-effect.md) - [useUpdateEffect](https://yamada-ui.com/docs/hooks/use-update-effect.md) - [useValue](https://yamada-ui.com/docs/hooks/use-value.md) - [useWindowEvent](https://yamada-ui.com/docs/hooks/use-window-event.md) # useAnimation ```tsx const animation = useAnimation({ keyframes: { "0%": { bg: "red.500", }, "20%": { bg: "green.500", }, "40%": { bg: "purple.500", }, "60%": { bg: "yellow.500", }, "80%": { bg: "blue.500", }, "100%": { bg: "red.500", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }) return ``` ## Usage ```tsx import { useAnimation } from "@yamada-ui/react" ``` ```tsx import { useAnimation } from "@/components/ui" ``` ```tsx import { useAnimation } from "@workspaces/ui" ``` ```tsx const animation = useAnimation() ``` ### Use Theme Tokens To use [theme](https://yamada-ui.com/docs/theming.md) [animations](https://yamada-ui.com/docs/theming/tokens/animations.md), set the argument. ```tsx const animation = useAnimation("gradient") return ``` :::warning By default, no animation tokens are defined. ::: ### Use Multiple Animations To use multiple animations, set the arguments as an array. ```tsx const animation = useAnimation([ { keyframes: { "0%": { bg: "red.500", }, "20%": { bg: "green.500", }, "40%": { bg: "purple.500", }, "60%": { bg: "yellow.500", }, "80%": { bg: "blue.500", }, "100%": { bg: "red.500", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }, { keyframes: { "0%": { h: "xs", }, "50%": { h: "md", }, "100%": { h: "xs", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }, { keyframes: { "0%": { w: "full", }, "50%": { w: "50%", }, "100%": { w: "full", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }, ]) return ( ) ``` ### Use Responsive Design To use responsive design, set the `animation` as a object. ```tsx const desktopAnimation = useAnimation({ keyframes: { "0%": { bg: "red.500", }, "20%": { bg: "green.500", }, "40%": { bg: "purple.500", }, "60%": { bg: "yellow.500", }, "80%": { bg: "blue.500", }, "100%": { bg: "red.500", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }) const tabletAnimation = useAnimation({ keyframes: { "0%": { bg: "cyan.500", }, "20%": { bg: "emerald.500", }, "40%": { bg: "pink.500", }, "60%": { bg: "amber.500", }, "80%": { bg: "sky.500", }, "100%": { bg: "cyan.500", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }) return ( ) ``` ### Use Color Mode To use color mode, pass an array to `animation`. ```tsx const lightAnimation = useAnimation({ keyframes: { "0%": { bg: "red.500", }, "20%": { bg: "green.500", }, "40%": { bg: "purple.500", }, "60%": { bg: "yellow.500", }, "80%": { bg: "blue.500", }, "100%": { bg: "red.500", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }) const darkAnimation = useAnimation({ keyframes: { "0%": { bg: "red.800", }, "20%": { bg: "green.800", }, "40%": { bg: "purple.800", }, "60%": { bg: "yellow.800", }, "80%": { bg: "blue.800", }, "100%": { bg: "red.800", }, }, duration: "10s", iterationCount: "infinite", timingFunction: "linear", }) return ``` # useAsyncCallback ```tsx const [loading, onClick] = useAsyncCallback(async () => { await wait(3000) }, []) return ( ) ``` ## Usage ```tsx import { useAsyncCallback } from "@yamada-ui/react" ``` ```tsx import { useAsyncCallback } from "@/components/ui" ``` ```tsx import { useAsyncCallback } from "@workspaces/ui" ``` ```tsx const [loading, onClick] = useAsyncCallback(async () => {}, []) ``` ### Use loading When using loading, set `loading` to `screen` or `page` etc. ```tsx const [loading, onClick] = useAsyncCallback( async () => { await wait(3000) }, [], { loading: "page" }, ) return ( ) ``` ### Disable processing When disabling processing, set `processing` to `false`. ```tsx const [, onClick] = useAsyncCallback( async () => { await wait(3000) }, [], { loading: "page", processing: false }, ) return ``` # useAsync ```tsx const [flg, { toggle }] = useBoolean() const { value, error, loading } = useAsync( async () => new Promise((resolve, reject) => { setTimeout(() => { if (Math.random() > 0.5) { resolve("Succeeded.") } else { reject(new Error("A pseudo random error occurred.")) } }, 3000) }), [flg], ) return ( {loading ? ( Loading... ) : error ? ( Error: {error.message} ) : ( Value: {value} )} ) ``` ## Usage ```tsx import { useAsync } from "@yamada-ui/react" ``` ```tsx import { useAsync } from "@/components/ui" ``` ```tsx import { useAsync } from "@workspaces/ui" ``` ```tsx const { value, error, loading } = useAsync(async () => {}, []) ``` # useBoolean ```tsx const [flg, { on, off, toggle }] = useBoolean() return ( state: {String(flg)} On Off Toggle ) ``` ## Usage ```tsx import { useBoolean } from "@yamada-ui/react" ``` ```tsx import { useBoolean } from "@/components/ui" ``` ```tsx import { useBoolean } from "@workspaces/ui" ``` ```tsx const [flg, { on, off, toggle }] = useBoolean() ``` ### Using Initial Values ```tsx const [flg, { on, off, toggle }] = useBoolean(true) return ( state: {String(flg)} On Off Toggle ) ``` # useBreakpointEffect ```tsx const [device, setDevice] = useState("mobile"); useBreakpointEffect(breakpoint => { if (breakpoint === "sm") { setDevice("mobile"); } else if (breakpoint === "md") { setDevice("tablet"); } else { setDevice("desktop"); } }, []); return The current device is "{device}"; ``` ## Usage ```tsx import { useBreakpointEffect } from "@yamada-ui/react" ``` ```tsx import { useBreakpointEffect } from "@/components/ui" ``` ```tsx import { useBreakpointEffect } from "@workspaces/ui" ``` ```tsx const [device, setDevice] = useState("mobile") useBreakpointEffect((breakpoint) => { if (breakpoint === "sm") { setDevice("mobile") } else if (breakpoint === "md") { setDevice("tablet") } else { setDevice("desktop") } }, []) ``` # useBreakpointState ```tsx const [value, setValue] = useBreakpointState({ base: 1, md: 2 }) return ( ) ``` ## Usage ```tsx import { useBreakpointState } from "@yamada-ui/react" ``` ```tsx import { useBreakpointState } from "@/components/ui" ``` ```tsx import { useBreakpointState } from "@workspaces/ui" ``` ```tsx const [value, setValue] = useBreakpointState({ base: 1, md: 2 }) ``` # useBreakpointValue ```tsx const breakpoint = useBreakpoint() const bg = useBreakpointValue({ base: "red.500", sm: "purple.500", md: "yellow.500", lg: "green.500", xl: "blue.500", "2xl": "pink.500", }) return ( The current breakpoint is "{breakpoint}" ) ``` ## Usage ```tsx import { useBreakpointValue } from "@yamada-ui/react" ``` ```tsx import { useBreakpointValue } from "@/components/ui" ``` ```tsx import { useBreakpointValue } from "@workspaces/ui" ``` ```tsx const bg = useBreakpointValue({ base: "red.500", sm: "purple.500", md: "yellow.500", lg: "green.500", xl: "blue.500", "2xl": "pink.500", }) ``` # useBreakpoint ```tsx const breakpoint = useBreakpoint() return The current breakpoint is "{breakpoint}". ``` ## Usage ```tsx import { useBreakpoint } from "@yamada-ui/react" ``` ```tsx import { useBreakpoint } from "@/components/ui" ``` ```tsx import { useBreakpoint } from "@workspaces/ui" ``` ```tsx const breakpoint = useBreakpoint() ``` :::note The return value refers to the [breakpoint](https://yamada-ui.com/docs/theming/breakpoints.md) of the theme. ::: # useClipboard ```tsx const { onCopy, value, setValue, copied } = useClipboard() return ( setValue(e.target.value)} /> ) ``` ## Usage ```tsx import { useClipboard } from "@yamada-ui/react" ``` ```tsx import { useClipboard } from "@/components/ui" ``` ```tsx import { useClipboard } from "@workspaces/ui" ``` ```tsx const { onCopy, value, setValue, copied } = useClipboard("initial value") ``` ### Using Initial Values ```tsx const { onCopy, value, setValue, copied } = useClipboard("initial value") return ( setValue(e.target.value)} /> ) ``` ### Change Timeout To change the timeout, set a number(milliseconds) to the second argument. The default is `1500`. ```tsx const { onCopy, value, setValue, copied } = useClipboard("", 5000) return ( setValue(e.target.value)} /> ) ``` ### Copy the Specified Value ```tsx const { onCopy, copied } = useClipboard() const value = "Read-Only Value" return ( ) ``` # useColorModeValue ```tsx const { colorMode } = useColorMode() const color = useColorModeValue("green", "red") return The current colorMode is "{colorMode}" ``` ## Usage ```tsx import { useColorModeValue } from "@yamada-ui/react" ``` ```tsx import { useColorModeValue } from "@/components/ui" ``` ```tsx import { useColorModeValue } from "@workspaces/ui" ``` ```tsx const color = useColorModeValue("green", "red") ``` :::tip Color Mode overview is [here](https://yamada-ui.com/docs/styling/color-mode.md). ::: # useColorMode ```tsx const { colorMode } = useColorMode() return The current colorMode is "{colorMode}" ``` ## Usage ```tsx import { useColorMode } from "@yamada-ui/react" ``` ```tsx import { useColorMode } from "@/components/ui" ``` ```tsx import { useColorMode } from "@workspaces/ui" ``` ```tsx const { changeColorMode, colorMode, internalColorMode, toggleColorMode } = useColorMode() ``` :::tip Color Mode overview is [here](https://yamada-ui.com/docs/styling/color-mode.md). ::: ### Switching Color Mode - `colorMode`: Provides the current color mode. - `internalColorMode`: Provides the current color mode including `system`. ```tsx const { colorMode, internalColorMode, changeColorMode, toggleColorMode } = useColorMode() return ( The current colorMode is "{colorMode}", internal colorMode is " {internalColorMode}" ) ``` # useCounter ```tsx const { value, increment, decrement, reset } = useCounter({ defaultValue: 10, }) return ( Count: {value} increment()} > + 1 decrement()} > - 1 Reset ) ``` ## Usage ```tsx import { useCounter } from "@yamada-ui/react" ``` ```tsx import { useCounter } from "@/components/ui" ``` ```tsx import { useCounter } from "@workspaces/ui" ``` ```tsx const { value, valueAsNumber, update, increment, decrement, reset, cast, out } = useCounter() ``` ### Set Default Value To set a default value, pass a number or string to `defaultValue`. ```tsx const { value, increment, decrement, reset } = useCounter({ defaultValue: 10, }) return ( Count: {value} increment()} > + 1 decrement()} > - 1 Reset ) ``` ### Set Min And Max Values To set minimum and maximum values, set `min` or `max` to a number. ```tsx const { value, increment, decrement, min, max, reset } = useCounter({ defaultValue: 5, min: 0, max: 10, }) return ( Count: {value} increment()} disabled={max} > + 1 decrement()} disabled={min} > - 1 Reset ) ``` ### Set Step Value To set a step value, pass a number to `step`. ```tsx const { value, increment, decrement, reset } = useCounter({ defaultValue: 0, step: 5, }) return ( Count: {value} increment()} > + 5 decrement()} > - 5 Reset ) ``` ```tsx const { value, increment, decrement } = useCounter({ defaultValue: 0, }) return ( Count: {value} {(step) => ( increment(step)}> + {step} )} {(step) => ( decrement(step)}> - {step} )} ) ``` ### Specify Precision To specify precision, pass a number to `precision`. ```tsx const { value, increment, decrement, reset } = useCounter({ defaultValue: 5.123, step: 0.1, precision: 2, }) return ( Count: {value} increment()} > + 0.1 decrement()} > - 0.1 Reset ) ``` ### Allow Out Of Range Values To allow out of range values, set `keepWithinRange` to `false`. The `out` property is also provided to indicate whether the value is out of range. ```tsx const { value, increment, decrement, out, reset } = useCounter({ defaultValue: 5, min: 0, max: 10, keepWithinRange: false, }) return ( Count: {value} {out ? "(Out Of Range)" : ""} increment()} > + 1 decrement()} > - 1 Reset ) ``` ### Cast Value To cast value, use the `cast` function. ```tsx const { value, setValue, cast } = useCounter({ defaultValue: 0, precision: 2, }) return ( setValue(e.target.value)} onBlur={(e) => cast(e.target.value)} /> ) ``` # useDescendants ```tsx const { useDescendants, useDescendant, DescendantsContext } = createDescendants() const ref = useRef(null) const descendants = useDescendants() const onFocus = useCallback( (ev: FocusEvent) => { if (ev.target !== ref.current) return const descendant = descendants.enabledFirstValue() if (descendant) { descendant.node.focus() if (ref.current) ref.current.tabIndex = -1 } }, [descendants], ) const onBlur = useCallback((ev: FocusEvent) => { if (contains(ref.current, ev.relatedTarget)) return if (ref.current) ref.current.tabIndex = 0 }, []) const Item: FC<{ index: number }> = ({ index }) => { const { descendants, register } = useDescendant() const onKeyDown = useCallback( (ev: KeyboardEvent) => { runKeyAction(ev, { ArrowDown: () => { const descendant = descendants.enabledNextValue(index) if (descendant) descendant.node.focus() }, ArrowUp: () => { const descendant = descendants.enabledPrevValue(index) if (descendant) descendant.node.focus() }, Home: () => { const descendant = descendants.enabledFirstValue() if (descendant) descendant.node.focus() }, End: () => { const descendant = descendants.enabledLastValue() if (descendant) descendant.node.focus() }, }) }, [descendants], ) return (
Item {index}
) } return ( {Array.from({ length: 5 }).map((_, index) => ( ))} ) ``` ## Usage ```tsx import { createDescendants } from "@yamada-ui/react" ``` ```tsx import { createDescendants } from "@/components/ui" ``` ```tsx import { createDescendants } from "@workspaces/ui" ``` ```tsx const { DescendantsContext, useDescendant, useDescendantRegister, useDescendants, useDescendantsContext, } = createDescendants() ``` ```tsx const descendants = useDescendants() ``` ```tsx const { descendants, register } = useDescendant() ``` ### Disable descendant To disable a descendant, set the `disabled` prop to `true` on `useDescendant`. ```tsx const { useDescendants, useDescendant, DescendantsContext } = createDescendants() const ref = useRef(null) const descendants = useDescendants() const onFocus = useCallback( (ev: FocusEvent) => { if (ev.target !== ref.current) return const descendant = descendants.enabledFirstValue() if (descendant) { descendant.node.focus() if (ref.current) ref.current.tabIndex = -1 } }, [descendants], ) const onBlur = useCallback((ev: FocusEvent) => { if (contains(ref.current, ev.relatedTarget)) return if (ref.current) ref.current.tabIndex = 0 }, []) const Item: FC<{ index: number; disabled?: boolean }> = ({ index, disabled, }) => { const { descendants, register } = useDescendant({ disabled }) const onKeyDown = useCallback( (ev: KeyboardEvent) => { runKeyAction(ev, { ArrowDown: () => { const descendant = descendants.enabledNextValue(index) if (descendant) descendant.node.focus() }, ArrowUp: () => { const descendant = descendants.enabledPrevValue(index) if (descendant) descendant.node.focus() }, Home: () => { const descendant = descendants.enabledFirstValue() if (descendant) descendant.node.focus() }, End: () => { const descendant = descendants.enabledLastValue() if (descendant) descendant.node.focus() }, }) }, [descendants], ) return (
Item {index}
) } return ( {Array.from({ length: 5 }).map((_, index) => ( ))} ) ``` # useDisclosure ```tsx const { open, onOpen, onClose } = useDisclosure() return ( <> ) ``` ## Usage ```tsx import { useDisclosure } from "@yamada-ui/react" ``` ```tsx import { useDisclosure } from "@/components/ui" ``` ```tsx import { useDisclosure } from "@workspaces/ui" ``` ```tsx const { open, onOpen, onClose, onToggle } = useDisclosure() ``` ### Using Callback Functions To use callback functions, assign a function to `onOpen` or `onClose`. This is useful for executing APIs or other logic before opening components such as [Modal](https://yamada-ui.com/docs/components/modal.md). ```tsx const { open, onClose, onOpen } = useDisclosure({ onClose: (value) => { console.log("onClose:", value) }, onOpen: (value) => { console.log("onOpen:", value) }, }) return ( <> onClose("This is arg")} onClose={() => onClose("This is arg")} onSuccess={() => onClose("This is arg")} /> ) ``` By default, the callback functions are executed before `onOpen` or `onClose`. If you want the callbacks to be executed after `onOpen` or `onClose`, set the `timing` option to `"after"`. ```tsx const { open, onClose, onOpen } = useDisclosure({ onClose: (value) => { console.log("onClose:", value) }, onOpen: (value) => { console.log("onOpen:", value) }, timing: "after", }) return ( <> onClose("This is arg")} onClose={() => onClose("This is arg")} onSuccess={() => onClose("This is arg")} /> ) ``` # useDynamicAnimation ```tsx const [animation, setAnimation] = useDynamicAnimation({ moveLeft: { duration: "moderate", fillMode: "forwards", keyframes: { "0%": { transform: "translateX(100%)" }, "100%": { transform: "translateX(0%)" }, }, timingFunction: "ease-in-out", }, moveRight: { duration: "moderate", fillMode: "forwards", keyframes: { "0%": { transform: "translateX(0%)" }, "100%": { transform: "translateX(100%)" }, }, timingFunction: "ease-in-out", }, }) return ( Box ) ``` ## Usage ```tsx import { useDynamicAnimation } from "@yamada-ui/react" ``` ```tsx import { useDynamicAnimation } from "@/components/ui" ``` ```tsx import { useDynamicAnimation } from "@workspaces/ui" ``` ```tsx const [animation, setAnimation] = useDynamicAnimation() ``` ### Use Theme Tokens To use [theme](https://yamada-ui.com/docs/theming.md) [animations](https://yamada-ui.com/docs/theming/tokens/animations.md), set the keys as the animation names. ```tsx const [animation, setAnimation] = useDynamicAnimation({ slideToLeft: "slide-to-right-full-reverse", slideToRight: "slide-to-right-full", }) return ( Box ) ``` :::warning By default, no animation tokens are defined. ::: ### Use Multiple Animations To use multiple animations, pass an object with the keys as the animation names. ```tsx const [animation, setAnimation] = useDynamicAnimation({ moveLeft: [ { duration: "moderate", fillMode: "forwards", keyframes: { "0%": { transform: "translateX(100%)" }, "100%": { transform: "translateX(0%)" }, }, timingFunction: "ease-in-out", }, { duration: "moderate", fillMode: "forwards", keyframes: { "0%": { bg: "green" }, "100%": { bg: "orange" }, }, timingFunction: "ease-in-out", }, ], moveRight: [ { duration: "moderate", fillMode: "forwards", keyframes: { "0%": { transform: "translateX(0%)" }, "100%": { transform: "translateX(100%)" }, }, timingFunction: "ease-in-out", }, { duration: "moderate", fillMode: "forwards", keyframes: { "0%": { bg: "orange" }, "100%": { bg: "green" }, }, timingFunction: "ease-in-out", }, ], }) return ( Box ) ``` # useEyeDropper ```tsx const { supported, onOpen } = useEyeDropper() const [color, setColor] = useState("#FF0000") const onClick = async () => { const result = await onOpen() if (result) setColor(result.sRGBHex) } return ( {color} EyeDropper API is not supported in this browser. ) ``` ## Usage ```tsx import { useEyeDropper } from "@yamada-ui/react" ``` ```tsx import { useEyeDropper } from "@/components/ui" ``` ```tsx import { useEyeDropper } from "@workspaces/ui" ``` ```tsx const { supported, onOpen } = useEyeDropper() ``` # useFocusOnShow ```tsx const [visible, setVisible] = useState(false) const ref = useRef(null) const inputRef = useRef(null) useFocusOnShow(ref, { focusTarget: inputRef, visible, shouldFocus: true, }) return ( ) ``` ## Usage ```tsx import { useFocusOnShow } from "@yamada-ui/react" ``` ```tsx import { useFocusOnShow } from "@/components/ui" ``` ```tsx import { useFocusOnShow } from "@workspaces/ui" ``` ```tsx const ref = useRef(null) const focusTargetRef = useRef(null) useFocusOnShow(ref, { focusTarget: focusTargetRef, visible: true, shouldFocus: true, }) ``` # useFormatByte ```tsx const kilobyte = useFormatByte(1024) const megabyte = useFormatByte(1024 * 1024) const gigabyte = useFormatByte(1024 * 1024 * 1024) const terabyte = useFormatByte(1024 * 1024 * 1024 * 1024) return ( <> {kilobyte} {megabyte} {gigabyte} {terabyte} ) ``` ## Usage ```tsx import { useFormatByte } from "@yamada-ui/react" ``` ```tsx import { useFormatByte } from "@/components/ui" ``` ```tsx import { useFormatByte } from "@workspaces/ui" ``` ```tsx const kilobyte = useFormatByte(1024) ``` :::note `FormatByte` automatically selects the most appropriate unit (`byte`, `kB`, `MB`, `GB`, `TB`) based on the byte value size. ::: :::note `useFormatByte` internally uses [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat). ::: ### Changing the Locale To change the locale, set a value for [locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales). ```tsx const enByte = useFormatByte(1024, { locale: "en-US" }) const jaByte = useFormatByte(1024, { locale: "ja-JP" }) const deByte = useFormatByte(1024, { locale: "de-DE" }) return ( en-US {enByte} ja-JP {jaByte} de-DE {deByte} ) ``` ### Set the Locale for the Entire Application If you want to set the locale for the entire application, set the `locale` for the `UIProvider`. ```tsx import { UIProvider } from "@yamada-ui/react" const App = () => { return ( ) } ``` ### Unit Format To convert units, set `unit` to either `"byte"` or `"bit"`. The default is `"byte"`. ```tsx const bytes = useFormatByte(1024, { unit: "byte" }) const bits = useFormatByte(1024, { unit: "bit" }) return ( Bytes {bytes} Bits {bits} ) ``` ### Unit Display To change the unit display, set a value for [unitDisplay](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#unitdisplay). ```tsx const short = useFormatByte(1024, { unitDisplay: "short" }) const narrow = useFormatByte(1024, { unitDisplay: "narrow" }) const long = useFormatByte(1024, { unitDisplay: "long" }) return ( Short {short} Narrow {narrow} Long {long} ) ``` # useFormatDateTime ```tsx const formattedValue = useFormatDateTime(new Date()) return {formattedValue} ``` ## Usage ```tsx import { useFormatDateTime } from "@yamada-ui/react" ``` ```tsx import { useFormatDateTime } from "@/components/ui" ``` ```tsx import { useFormatDateTime } from "@workspaces/ui" ``` ```tsx const formattedValue = useFormatDateTime(new Date()) ``` It formats date time according to the specified locale and options. The hook returns the formatted value directly. :::note `useFormatDateTime` internally uses [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat). ::: ### Changing the Locale To change the locale, set a value for [locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales). ```tsx const enValue = useFormatDateTime(new Date(), { locale: "en-US" }) const jaValue = useFormatDateTime(new Date(), { locale: "ja-JP" }) const deValue = useFormatDateTime(new Date(), { locale: "de-DE" }) const frValue = useFormatDateTime(new Date(), { locale: "fr-FR" }) const zhValue = useFormatDateTime(new Date(), { locale: "zh-CN" }) return ( en-US {enValue} ja-JP {jaValue} de-DE {deValue} fr-FR {frValue} zh-CN {zhValue} ) ``` ### Set the Locale for the Entire Application If you want to set the locale for the entire application, set the `locale` for the `UIProvider`. ```tsx import { UIProvider } from "@yamada-ui/react" const App = () => { return ( ) } ``` ### Converting to Year To convert to year, set a value for [year](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#year). ```tsx const formattedValue = useFormatDateTime(new Date(), { year: "numeric" }) return {formattedValue} ``` ### Converting to Month To convert to month, set a value for [month](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#month). ```tsx const formattedValue = useFormatDateTime(new Date(), { month: "long" }) return {formattedValue} ``` ### Converting to Day To convert to day, set a value for [day](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#day). ```tsx const formattedValue = useFormatDateTime(new Date(), { day: "2-digit" }) return {formattedValue} ``` ### Converting to Weekday To convert to weekday, set a value for [weekday](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#weekday). ```tsx const formattedValue = useFormatDateTime(new Date(), { weekday: "long" }) return {formattedValue} ``` # useFormatNumber ```tsx const formattedValue = useFormatNumber(1234567.89) return {formattedValue} ``` ## Usage ```tsx import { useFormatNumber } from "@yamada-ui/react" ``` ```tsx import { useFormatNumber } from "@/components/ui" ``` ```tsx import { useFormatNumber } from "@workspaces/ui" ``` ```tsx const formattedValue = useFormatNumber(1234567.89) ``` It formats numbers according to the specified locale and options. The hook returns the formatted value directly. :::note `useFormatNumber` internally uses [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat). ::: ### Changing the Locale To change the locale, set a value for [locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales). ```tsx const enValue = useFormatNumber(1234567.89, { locale: "en-US" }) const jaValue = useFormatNumber(1234567.89, { locale: "ja-JP" }) const deValue = useFormatNumber(1234567.89, { locale: "de-DE" }) const frValue = useFormatNumber(1234567.89, { locale: "fr-FR" }) const zhValue = useFormatNumber(1234567.89, { locale: "zh-CN" }) return ( en-US {enValue} ja-JP {jaValue} de-DE {deValue} fr-FR {frValue} zh-CN {zhValue} ) ``` ### Set the Locale for the Entire Application If you want to set the locale for the entire application, set the `locale` for the `UIProvider`. ```tsx import { UIProvider } from "@yamada-ui/react" const App = () => { return ( ) } ``` ### Converting to Currency To convert to currency, set `"currency"` for [style](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#style). ```tsx const usdValue = useFormatNumber(1234567.89, { style: "currency", currency: "USD", locale: "en-US", }) const eurValue = useFormatNumber(1234567.89, { style: "currency", currency: "EUR", locale: "de-DE", }) const jpyValue = useFormatNumber(1234567.89, { style: "currency", currency: "JPY", locale: "ja-JP", }) return ( USD {usdValue} EUR {eurValue} JPY {jpyValue} ) ``` ### Converting to Units To convert to units, set `"unit"` for [style](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#style). ```tsx const kilogramValue = useFormatNumber(100, { style: "unit", unit: "kilogram", }) const celsiusValue = useFormatNumber(100, { style: "unit", unit: "celsius", unitDisplay: "long", }) const speedValue = useFormatNumber(100, { style: "unit", unit: "kilometer-per-hour", unitDisplay: "narrow", }) return ( {kilogramValue} {celsiusValue} {speedValue} ) ``` ### Converting to Percent To convert to percent, set `"percent"` for [style](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#style). ```tsx const percent1Value = useFormatNumber(0.45, { style: "percent" }) const percent2Value = useFormatNumber(0.45, { style: "percent", minimumFractionDigits: 2, }) return ( {percent1Value} {percent2Value} ) ``` ### Converting Notation To convert notation, set a value for [notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#notation). ```tsx const standardValue = useFormatNumber(1234567.89, { notation: "standard" }) const scientificValue = useFormatNumber(1234567.89, { notation: "scientific" }) const engineeringValue = useFormatNumber(1234567.89, { notation: "engineering", }) const compactValue = useFormatNumber(1234567.89, { notation: "compact" }) return ( {standardValue} {scientificValue} {engineeringValue} {compactValue} ) ``` ### Controlling Decimal Places To control the number of decimal places, use [minimumFractionDigits](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumfractiondigits) and [maximumFractionDigits](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#maximumfractiondigits). ```tsx const fixed2Value = useFormatNumber(1234.5, { minimumFractionDigits: 2, maximumFractionDigits: 2, }) const range03Value = useFormatNumber(1234.567, { minimumFractionDigits: 0, maximumFractionDigits: 3, }) const fixed4Value = useFormatNumber(1234, { minimumFractionDigits: 4, maximumFractionDigits: 4, }) return ( {fixed2Value} {range03Value} {fixed4Value} ) ``` ### Disabling Grouping To disable grouping, set `false` for [useGrouping](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#usegrouping). ```tsx const noGroupingValue = useFormatNumber(1234567.89, { useGrouping: false }) return {noGroupingValue} ``` ### Changing the Sign Display To change the sign display, set a value for [signDisplay](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#signdisplay). ```tsx const alwaysValue = useFormatNumber(1234.5, { signDisplay: "always" }) const exceptZeroValue = useFormatNumber(-1234.5, { signDisplay: "exceptZero" }) return ( {alwaysValue} {exceptZeroValue} ) ``` # useHover ```tsx const { hovered, ref } = useHover() return ( {hovered ? "I am hovered" : "Put mouse over me please"} ) ``` ## Usage ```tsx import { useHover } from "@yamada-ui/react" ``` ```tsx import { useHover } from "@/components/ui" ``` ```tsx import { useHover } from "@workspaces/ui" ``` ```tsx const { hovered, ref } = useHover() ``` # useIdle ```tsx const idle = useIdle(2000) return Current state: {idle ? "idle" : "not idle"} ``` ## Usage ```tsx import { useIdle } from "@yamada-ui/react" ``` ```tsx import { useIdle } from "@/components/ui" ``` ```tsx import { useIdle } from "@workspaces/ui" ``` ```tsx const idle = useIdle(2000) ``` # useInfiniteScroll ```tsx const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))} {!finish ? (
) : null}
) ``` ## Usage ```tsx import { useInfiniteScroll } from "@yamada-ui/react" ``` ```tsx import { useInfiniteScroll } from "@/components/ui" ``` ```tsx import { useInfiniteScroll } from "@workspace/ui" ``` ```tsx const { ref, finish } = useInfiniteScroll() ``` ### Specify the Viewport To specify the viewport, set a `ref` to `rootRef`. :::note If `rootRef` is not set, the browser's viewport will be used. ::: ```tsx const rootRef = useRef(null) const resetRef = useRef<() => void>(noop) const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ resetRef, rootRef, onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))} {!finish ? (
) : null}
) ``` ### Set rootMargin To set [rootMargin](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#rootmargin), assign a string to rootMargin. ```tsx const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ rootMargin: "300px 0px 0px 0px", onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))} {!finish ? (
) : null}
) ``` ### Set threshold To set [threshold](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#threshold), assign a number to `threshold`. ```tsx const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ threshold: 1, onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))} {!finish ? (
) : null}
) ``` ### Initial Load To load initially, set `initialLoad` to `true`. By default, `initialLoad` is set to `false`, and the initial(`index=0`) `onLoad` is not executed. `true`: The first `onLoad` is executed regardless of the scroll amount, and the provided `index` starts from `0`.\ `false`: `onLoad` is executed when a certain scroll is reached, and the provided `index` starts from `1`. ```tsx const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ initialLoad: true, onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))} {!finish ? (
) : null}
) ``` ### Change the Starting index To change the starting index, set a number to `startIndex`. The default is `1`. ```tsx const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ startIndex: 3, onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))} {!finish ? (
) : null}
) ``` ### Reverse To reverse, set `reverse` to `true`. The default is `false`. ```tsx const rootRef = useRef(null) const [count, setCount] = useState(50) const { ref, finish } = useInfiniteScroll({ reverse: true, rootRef, onLoad: ({ finish, index }) => { console.log("onLoad", index) setCount((prev) => prev + 50) if (index >= 5) finish() }, }) return ( {!finish ? (
) : null} {Array(count) .fill(0) .map((_, index) => ( 天元突破グレンラガン いいか、忘れんな。お前を信じろ。俺が信じるお前でもない。お前が信じる俺でもない。お前が信じる…お前を信じろ! ))}
) ``` # useInterval ```tsx const [state, setState] = useState(1) useInterval(() => setState((prev) => prev + 1), 3000) return Current state: {state} ``` ## Usage ```tsx import { useInterval } from "@yamada-ui/react" ``` ```tsx import { useInterval } from "@/components/ui" ``` ```tsx import { useInterval } from "@workspaces/ui" ``` ```tsx const [state, setState] = useState(1) useInterval(() => setState((prev) => prev + 1), 3000) ``` # useLoading ```tsx const { screen, page, background } = useLoading() const onLoadingScreen = async () => { try { screen.start() await wait(3000) } finally { screen.finish() } } const onLoadingPage = async () => { try { page.start() await wait(3000) } finally { page.finish() } } const onLoadingBackground = async () => { try { background.start() await wait(3000) } finally { background.finish() } } return ( ) ``` ## Usage ```tsx import { useLoading } from "@yamada-ui/react" ``` ```tsx import { useLoading } from "@/components/ui" ``` ```tsx import { useLoading } from "@workspaces/ui" ``` ```tsx const { screen, page, background } = useLoading() ``` `useLoading` returns instances of `screen`, `page`, and `background`. Each instance provides several methods: - `start`: Starts the loading animation. - `update`: Updates the loading animation. - `finish`: Finishes the loading animation. - `force`: Forces the loading animation to update. ### Change Loading Scheme ```tsx const { screen, page, background } = useLoading() return ( ) ``` ### Set Duration To set the duration, set a number (milliseconds) to `duration`. ```tsx const { screen, page, background } = useLoading() return ( ) ``` ### Set Message To set a message, set a `ReactNode` to `message`. ```tsx const { screen, page, background } = useLoading() return ( ) ``` ### Update Message To update a message, use `update`. ```tsx const { screen, page, background } = useLoading() const onLoadingScreen = async () => { try { screen.start({ message: "Loading" }) await wait(3000) screen.update({ message: "Please Wait" }) await wait(3000) } finally { screen.finish() } } const onLoadingPage = async () => { try { page.start({ message: "Loading" }) await wait(3000) page.update({ message: "Please Wait" }) await wait(3000) } finally { page.finish() } } const onLoadingBackground = async () => { try { background.start({ message: "Loading" }) await wait(3000) background.update({ message: "Please Wait" }) await wait(3000) } finally { background.finish() } } return ( ) ``` ## Configuration ### Change Loading Scheme ```tsx const config = extendConfig({ loading: { background: { loadingScheme: "puff" }, page: { loadingScheme: "dots" }, screen: { loadingScheme: "grid" }, }, }) const App: FC = () => { const { screen, page, background } = useLoading() return ( ) } return ( ) ``` # useLocalStorage ```tsx const [value, setValue, resetValue] = useLocalStorage({ key: "value", defaultValue: 1, }) return ( ) ``` ## Usage ```tsx import { useLocalStorage } from "@yamada-ui/react" ``` ```tsx import { useLocalStorage } from "@/components/ui" ``` ```tsx import { useLocalStorage } from "@workspaces/ui" ``` ```tsx const [value, setValue, resetValue] = useLocalStorage({ key: "value", defaultValue: 1, }) ``` # useMediaQuery ```tsx const large = useMediaQuery("(min-width: 1280px)") return {large ? "larger than 1280px" : "smaller than 1280px"} ``` ## Usage ```tsx import { useMediaQuery } from "@yamada-ui/react" ``` ```tsx import { useMediaQuery } from "@/components/ui" ``` ```tsx import { useMediaQuery } from "@workspaces/ui" ``` ```tsx const large = useMediaQuery("(min-width: 1280px)") ``` # useNotice ```tsx const notice = useNotice() return ( ) ``` ## Usage ```tsx import { useNotice } from "@yamada-ui/react" ``` ```tsx import { useNotice } from "@/components/ui" ``` ```tsx import { useNotice } from "@workspaces/ui" ``` ```tsx const notice = useNotice() ``` ### Change Variant ```tsx const notice = useNotice() return ( {(variant) => ( )} ) ``` ### Change Color Scheme ```tsx const notice = useNotice() return ( {(colorScheme) => ( )} ) ``` ### Change Loading Scheme ```tsx const notice = useNotice() return ( {(loadingScheme) => ( )} ) ``` ### Change Status To change the status, set the `status` to `"info"` or `"success"` etc. ```tsx const notice = useNotice() return ( {(status) => ( )} ) ``` ### Change Limit To change the limit, set the `limit` to a number. ```tsx const notice = useNotice({ limit: 10 }) return ( ) ``` ### Change Duration To change the duration, set the `duration` to a number. ```tsx const notice = useNotice({ duration: 10000 }) return ( ) ``` ### Keep Stay To keep the notice staying, set the `duration` to `null`. ```tsx const notice = useNotice({ duration: null }) return ( ) ``` ### Change Placement To change the placement, set the `placement` to `"start"` or `"end"` etc. ```tsx const notice = useNotice({ duration: null }) return ( {(placement) => ( )} ) ``` ### Change Close Strategy To change the close strategy, set the `closeStrategy` to `"click"` or `"drag"` etc. ```tsx const notice = useNotice() return ( {(closeStrategy) => ( )} {(closeStrategy) => ( )} ) ``` ### Close Notice To close the notice, use `close` or `closeAll`. ```tsx const notice = useNotice() const id = useRef(null) const onOpen = () => { id.current = notice({ closable: true, description: "お前が好きだ。", duration: 30000, title: "クラン・クラン", }) } const onClose = () => { if (id.current) notice.close(id.current) } const onCloseAll = () => { notice.closeAll() } return ( ) ``` ### Update Notice To update the notice, use `update`. ```tsx const notice = useNotice() const id = useRef(null) const onOpen = () => { id.current = notice({ colorScheme: "orange", description: "チャンスは目の前にあるものよ。", duration: 5000, title: "シェリル・ノーム", }) } const onUpdate = () => { if (id.current) notice.update(id.current, { colorScheme: "blue", description: "人生はワン・ツー・デカルチャー!!頑張れ、私。", duration: 5000, title: "ランカ・リー", }) } return ( ) ``` ## Configuration ### Make Notice Always Expand To make the notice always expand, set the `expand` to `true`. ```tsx import { UIProvider, extendConfig } from "@yamada-ui/react" const config = extendConfig({ notice: { expand: true, }, }) const App = () => { return ( ) } ``` ### Change Placement To change the placement, set the `placement` to `"start"` or `"end"` etc. ```tsx import { UIProvider, extendConfig } from "@yamada-ui/react" const config = extendConfig({ notice: { placement: "end-end",, }, }) const App = () => { return ( ) } ``` ### Change Limit To change the limit, set the `limit` to a number. ```tsx import { UIProvider, extendConfig } from "@yamada-ui/react" const config = extendConfig({ notice: { limit: 5, }, }) const App = () => { return ( ) } ``` ### Change Close Strategy To change the close strategy, set the `closeStrategy` to `"click"` or `"drag"` etc. ```tsx import { UIProvider, extendConfig } from "@yamada-ui/react" const config = extendConfig({ notice: { closeStrategy: "click", }, }) const App = () => { return ( ) } ``` # useOS ```tsx const os = useOS() return Your os is "{os}" ``` ## Usage ```tsx import { useOS } from "@yamada-ui/react" ``` ```tsx import { useOS } from "@/components/ui" ``` ```tsx import { useOS } from "@workspaces/ui" ``` ```tsx const os = useOS() ``` # useOutsideClick ```tsx const ref = useRef(null) const { open, onOpen, onClose } = useDisclosure() useOutsideClick({ ref, handler: onClose, }) return ( <> {open ? (
Hey, Click anywhere outside of me to close.
) : ( )} ) ``` ## Usage ```tsx import { useOutsideClick } from "@yamada-ui/react" ``` ```tsx import { useOutsideClick } from "@/components/ui" ``` ```tsx import { useOutsideClick } from "@workspaces/ui" ``` ```tsx const { open, onOpen, onClose } = useDisclosure() useOutsideClick({ ref, handler: onClose, }) ``` # usePrevious ```tsx const [flg, { toggle }] = useBoolean() const prevFlg = usePrevious(flg) return ( state: {String(flg)}, prev: {String(prevFlg)} ) ``` ## Usage ```tsx import { usePrevious } from "@yamada-ui/react" ``` ```tsx import { usePrevious } from "@/components/ui" ``` ```tsx import { usePrevious } from "@workspaces/ui" ``` ```tsx const [flg, { toggle }] = useBoolean() const prevFlg = usePrevious(flg) ``` # useProcessing ```tsx const { loading, start, finish } = useProcessing() const onClick = () => { start() setTimeout(() => finish(), 3000) } return ( ) ``` ## Usage ```tsx import { useProcessing } from "@yamada-ui/react" ``` ```tsx import { useProcessing } from "@/components/ui" ``` ```tsx import { useProcessing } from "@workspaces/ui" ``` ```tsx const { loading, start, finish } = useProcessing() ``` # usePromiseDisclosure ```tsx const { open, onClose, onOpen, onSuccess } = usePromiseDisclosure() const onClick = async () => { try { await onOpen() console.log("やるじゃねえか、サタン!!!") console.log("おめえはホントに世界の…") console.log("救世主かもな!!!!") } catch { console.error("地球は滅亡しました") } } return ( だ…大地よ海よ そして生きているすべての みんな… このオラにほんのちょっとずつだけ元気をわけてくれ…!!! き、きさまらいいかげんにしろーーーっ!!! さっさと協力しないかーーーっ!!! このミスター・サタンさまのたのみも、きけんというのかーーーっ!!! } cancel="わけない" open={open} success="わける" title="ミスター・サタン" onCancel={onClose} onClose={onClose} onSuccess={onSuccess} /> ) ``` ## Usage ```tsx import { usePromiseDisclosure } from "@yamada-ui/react" ``` ```tsx import { usePromiseDisclosure } from "@/components/ui" ``` ```tsx import { usePromiseDisclosure } from "@workspaces/ui" ``` ```tsx const { open, onClose, onOpen, onSuccess } = usePromiseDisclosure() ``` # useResizeObserver ```tsx const [flg, { toggle }] = useBoolean() const [ref, rect] = useResizeObserver() return ( {JSON.stringify(rect)}
Click me
) ``` ## Usage ```tsx import { useResizeObserver } from "@yamada-ui/react" ``` ```tsx import { useResizeObserver } from "@/components/ui" ``` ```tsx import { useResizeObserver } from "@workspaces/ui" ``` ```tsx const [ref, rect] = useResizeObserver() ``` # useTheme ```tsx const { theme } = useTheme() return {JSON.stringify(theme)} ``` ## Usage ```tsx import { useTheme } from "@yamada-ui/react" ``` ```tsx import { useTheme } from "@/components/ui" ``` ```tsx import { useTheme } from "@workspaces/ui" ``` ```tsx const { themeScheme, changeThemeScheme } = useTheme() ``` :::note For more information about themes, please see [here](https://yamada-ui.com/docs/theming.md). ::: ### Switching Themes ```tsx const { themeScheme, changeThemeScheme } = useTheme() return ( The current scheme is "{themeScheme}" Primary Secondary Primary Secondary ) ``` :::warning In order to switch themes, you need to prepare multiple themes. For more details, please check [here](https://yamada-ui.com/docs/theming/switching-themes.md). ::: # useTimeout ```tsx const [state, setState] = useState(1) useTimeout(() => setState((prev) => prev + 1), 3000) return Current state: {state} ``` ## Usage ```tsx import { useTimeout } from "@yamada-ui/react" ``` ```tsx import { useTimeout } from "@/components/ui" ``` ```tsx import { useTimeout } from "@workspaces/ui" ``` ```tsx const [state, setState] = useState(1) useTimeout(() => setState((prev) => prev + 1), 3000) ``` # useUpdateBreakpointEffect ```tsx const [device, setDevice] = useState("unknown"); useUpdateBreakpointEffect(breakpoint => { if (breakpoint === "sm") { setDevice("mobile"); } else if (breakpoint === "md") { setDevice("tablet"); } else { setDevice("desktop"); } }, []); return The current device is "{device}"
; ``` ## Usage ```tsx import { useUpdateBreakpointEffect } from "@yamada-ui/react" ``` ```tsx import { useUpdateBreakpointEffect } from "@/components/ui" ``` ```tsx import { useUpdateBreakpointEffect } from "@workspaces/ui" ``` ```tsx const [device, setDevice] = useState("unknown") useUpdateBreakpointEffect((breakpoint) => { if (breakpoint === "sm") { setDevice("mobile") } else if (breakpoint === "md") { setDevice("tablet") } else { setDevice("desktop") } }, []) ``` # useUpdateEffect ```tsx const [state, setState] = useState(1) const [updateState, setUpdateState] = useState(1) const [flg, { toggle }] = useBoolean() useEffect(() => { setState((prev) => prev + 1) }, [flg]) useUpdateEffect(() => { setUpdateState((prev) => prev + 1) }, [flg]) return ( state changed by useEffect: {String(state)} state changed by useUpdateEffect: {String(updateState)} ) ``` ## Usage ```tsx import { useUpdateEffect } from "@yamada-ui/react" ``` ```tsx import { useUpdateEffect } from "@/components/ui" ``` ```tsx import { useUpdateEffect } from "@workspaces/ui" ``` ```tsx useUpdateEffect(() => {}, []) ``` # useValue ```tsx const breakpoint = useBreakpoint() const color = useValue({ base: "red", md: "green" }) return The current breakpoint is "{breakpoint}" ``` ```tsx const { colorMode } = useColorMode() const color = useValue(["green", "red"]) return The current colorMode is "{colorMode}" ``` ## Usage ```tsx import { useValue } from "@yamada-ui/react" ``` ```tsx import { useValue } from "@/components/ui" ``` ```tsx import { useValue } from "@workspaces/ui" ``` ```tsx const color = useValue({ base: "red", md: "green" }) ``` :::note `useValue` is using [useBreakpointValue](https://yamada-ui.com/hooks/use-breakpoint-value.md) and [useColorModeValue](https://yamada-ui.com/hooks/use-color-mode-value.md). ::: # useWindowEvent ```tsx const [count, setCount] = useState(0) useWindowEvent("click", () => { setCount((prev) => prev + 1) }) return Click count: {count} ``` ## Usage ```tsx import { useWindowEvent } from "@yamada-ui/react" ``` ```tsx import { useWindowEvent } from "@/components/ui" ``` ```tsx import { useWindowEvent } from "@workspaces/ui" ``` ```tsx const [count, setCount] = useState(0) useWindowEvent("click", () => { setCount((prev) => prev + 1) }) ``` # Animation ## Usage ```tsx Box ``` You can also use [theme](https://yamada-ui.com/docs/theming.md) [keyframes](https://yamada-ui.com/docs/theming/tokens/keyframes.md) to apply common keyframes throughout your application. Using `animationName` or `_keyframes` is recommended. ```tsx Box ``` ### Use Theme Tokens To use [theme](https://yamada-ui.com/docs/theming.md) [animations](https://yamada-ui.com/docs/theming/tokens/animations.md), set the `animation` property. ```tsx Box ``` :::warning By default, no animation tokens are defined. ::: ## Components Yamada UI provides components that make animations easier to implement. - [Motion](https://yamada-ui.com/docs/components/motion.md): A convenient component that extends the Yamada UI [Style Props](https://yamada-ui.com/docs/styling/style-props.md) to [Motion](https://motion.dev/). - [Airy](https://yamada-ui.com/docs/components/airy.md): A component that provides an animation that smoothly switches between two elements. - [Collapse](https://yamada-ui.com/docs/components/collapse.md): A component that expands or collapses an element to display it. - [FadeScale](https://yamada-ui.com/docs/components/fade-scale.md): A component that gradually expands or shrinks an element to display or hide it. - [Fade](https://yamada-ui.com/docs/components/fade.md): A component that gradually displays or hides an element. - [Flip](https://yamada-ui.com/docs/components/flip.md): A component that provides an animation that flips between two elements. - [Ripple](https://yamada-ui.com/docs/components/ripple.md): A component that provides a ripple effect to an element to recognize if the user has clicked it. - [Rotate](https://yamada-ui.com/docs/components/rotate.md): A component that provides an animation that rotates between two elements. - [Skeleton](https://yamada-ui.com/docs/components/skeleton.md): A component that functions as a placeholder until the content is loaded. - [SlideFade](https://yamada-ui.com/docs/components/slide-fade.md): A component that gradually displays or hides an element from a specified position. - [Slide](https://yamada-ui.com/docs/components/slide.md): A component that displays or hides an element from the corner of the page. ## Hooks Yamada UI provides convenient custom hooks for animations. - [useAnimation](https://yamada-ui.com/docs/hooks/use-animation.md): A custom hook that implements animations similar to CSS `keyframes`. - [useDynamicAnimation](https://yamada-ui.com/docs/hooks/use-dynamic-animation.md): A custom hook that is used to switch animations. # At-Rules ## Overview You can configure CSS [at-rules](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule) by using [Style Props](https://yamada-ui.com/docs/styling/style-props.md). ## @media [@media](https://developer.mozilla.org/en-US/docs/Web/CSS/@media) to apply styles based on specific conditions, use `_media`. ```tsx
Print me
``` `print` and other media types have a convenient shortcut. ```tsx
Print me
``` :::note Available @media are [here](https://yamada-ui.com/docs/styling/style-props.md#at-rules). ::: ### Use multiple queries To use multiple queries, set multiple values in an array. ```tsx Box ``` ### Use arbitrary queries To use arbitrary queries, use `query`. ```tsx Box ``` ## @container [@container](https://developer.mozilla.org/en-US/docs/Web/CSS/@container) to apply styles based on the size or conditions of a specific container, use `_container`. ```tsx
Resize me
``` ### Specify container name ```tsx
Resize me
``` ## @supports [@supports](https://developer.mozilla.org/en-US/docs/Web/CSS/@supports) to apply styles based on conditions, use `_supports`. ```tsx Supported flex ``` ## @keyframes [@keyframes](https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes) to apply intermediate states of an animation, use `_keyframes`. ```tsx Box ``` :::note Animations have their own documentation. See [Animations](https://yamada-ui.com/docs/styling/animation.md) for more details. ::: ## Arbitrary at-rules To use arbitrary at-rules, use `css`. ```tsx (RULE)": { // Define the style you want to customize. }, }} > Box ``` # Cascade Layers ## Overview Yamada UI uses CSS [Cascade Layers](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) to set the priority between [themes](https://yamada-ui.com/docs/theming.md) and [Style Props](https://yamada-ui.com/docs/styling/style-props.md). This priority plays an important role in component styling. ## Layer Types The layer types are as follows. - `tokens`: [themes](https://yamada-ui.com/docs/theming.md) tokens. - `reset`: [reset styles](https://yamada-ui.com/docs/styling/reset-styles.md). - `global`: [global styles](https://yamada-ui.com/docs/styling/global-styles.md). - `base`: [base style](https://yamada-ui.com/docs/components/styled.md#base-style) of components. - `size`: [size style](https://yamada-ui.com/docs/components/styled.md#size-style) of components. - `variant`: [variant style](https://yamada-ui.com/docs/components/styled.md#variant-style) of components. - `props`: [props style](https://yamada-ui.com/docs/components/styled.md#props-style) of components. - `compounds`: [compounds style](https://yamada-ui.com/docs/components/styled.md#compounds-style) of components. ## Layer Order The order of the generated layers is as follows. The same property is overridden in order of priority. ```css @layer tokens, reset, global, base, size, variant, props, compounds; ``` :::note [Style Props](https://yamada-ui.com/docs/styling/style-props.md) is always prioritized unless [!important](https://developer.mozilla.org/en-US/docs/Web/CSS/important) is applied because it is not set in the layer. ::: ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Config Change the `config.ts` in the generated theme. ```tsx import type { LayersConfig } from "@yamada-ui/react" import { defineConfig } from "@yamada-ui/react" export const layers: LayersConfig = { tokens: { name: "tokens", order: 0 }, reset: { name: "reset", order: 1 }, global: { name: "global", order: 2 }, base: { name: "base", order: 3 }, size: { name: "size", order: 4 }, variant: { name: "variant", order: 5 }, props: { name: "props", order: 6 }, compounds: { name: "compounds", order: 7 }, } export const config = defineConfig({ css: { layers, varPrefix: "ui" }, breakpoint: { direction: "down", identifier: "@media screen" }, defaultColorMode: "dark", defaultThemeScheme: "base", notice: { duration: 5000 }, theme: { responsive: true }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme, config } from "@workspace/theme" const App = () => { return ( ) } ``` ## Disable To disable the cascade layers, set `css.layers` to `false`. ```tsx import { defineConfig } from "@yamada-ui/react" export const config = defineConfig({ css: { layers: false, varPrefix: "ui" }, // [!code highlight] breakpoint: { direction: "down", identifier: "@media screen" }, defaultColorMode: "dark", defaultThemeScheme: "base", notice: { duration: 5000 }, theme: { responsive: true }, }) ``` # Color Mode ## Overview Yamada UI has built-in support for managing the application's color mode, allowing you to easily switch between light and dark modes. All provided components also support dark mode. :::info If you want to change the default color mode, please see [here](https://yamada-ui.com/docs/theming/color-mode.md). ::: ## Usage To apply color mode to [Style Props](https://yamada-ui.com/docs/styling/style-props.md), set an array. - Set the value for light mode as the first element. - Set the value for dark mode as the last element. ```tsx This is Box ``` ## Utilities Yamada UI provides useful custom hooks for color mode. - [useColorMode](https://yamada-ui.com/docs/hooks/use-color-mode.md): A custom hook that returns the current color mode. - [useColorModeValue](https://yamada-ui.com/docs/hooks/use-color-mode-value.md): A custom hook that returns the value of the current color mode from the provided values. # Color Scheme ## Overview Color scheme generates color contexts for components based on values. This improves color consistency. When a value is set to the color scheme, the following properties are generated. These values are set in the [semantic tokens](https://yamada-ui.com/docs/theming/tokens/colors.md#semantic-tokens) of the [theme](https://yamada-ui.com/docs/theming.md). - `colorScheme.solid`: The solid color used for background etc. - `colorScheme.bg`: The faint color used for background etc. - `colorScheme.ghost`: The faint color used for background etc. - `colorScheme.fg`: The color used for text etc. - `colorScheme.outline`: The color used for border etc. - `colorScheme.contrast`: The text color used for `colorScheme.solid`. - `colorScheme.subtle`: The color with higher contrast than `colorScheme.bg`. - `colorScheme.muted`: The color with higher contrast than `colorScheme.subtle`. - `colorScheme.emphasized`: The color with higher contrast than `colorScheme.muted`. Also, [tone colors](https://yamada-ui.com/docs/theming/tokens/colors.md#tokens) from `colorScheme.50` to `colorScheme.950` are generated. :::note In Yamada UI, the `colorScheme` is set to `"mono"` for the `body` in the [global styles](https://yamada-ui.com/docs/styling/global-styles.md). If you want to change the `colorScheme` for the entire application, please refer to [customization](https://yamada-ui.com/docs/theming/styles/global-styles.md#customize). ::: ## 使い方 ```tsx Solid Subtle ``` Color scheme inherits the color scheme of the parent element. ```tsx Provided by Parent Child ``` # Conditional Styles ## Overview By using conditional styles, you can apply styles for [pseudo-elements](https://yamada-ui.com/docs/styling/style-props.md#pseudo-elements), [pseudo-classes](https://yamada-ui.com/docs/styling/style-props.md#pseudo-classes), and [selectors](https://yamada-ui.com/docs/styling/style-props.md#selectors). ## Pseudo Elements To apply styles to the `::before` pseudo-element, use `_before`. ```tsx Box ``` :::note Available pseudo-elements are [here](https://yamada-ui.com/docs/styling/style-props.md#pseudo-elements). ::: ## Pseudo Classes To apply styles to the `:hover` pseudo-class, use `_hover`. ```tsx Hover me ``` You can also apply multiple values together. ```tsx Hover me ``` You can also combine multiple conditions. ```tsx Hover and focus me ``` :::note Available pseudo-classes are [here](https://yamada-ui.com/docs/styling/style-props.md#pseudo-classes). ::: ## Selectors To apply styles based on the `data-orientation` attribute, use `_horizontal` or `_vertical`. ```tsx horizontal ``` :::note Available selectors are [here](https://yamada-ui.com/docs/styling/style-props.md#selectors). ::: ### Group Selectors To apply styles to an element based on the state or attribute of the parent element, add the `"group"` or `"data-group"` role to the parent element and use the `_group*` conditional styles for the child elements. ```tsx Hover me ``` :::note Available group selectors are [here](https://yamada-ui.com/docs/styling/style-props.md#selectors). ::: ### Peer Selectors To apply styles to an element based on the state or attribute of the peer element, add the `data-peer` to the peer element and use the `_peer*` conditional styles. ```tsx
Focus the peer
Focus me!
``` :::note Available peer selectors are [here](https://yamada-ui.com/docs/styling/style-props.md#selectors). ::: ### Any Selectors To use any selectors, use `css` to apply styles. ```tsx Closed ``` # CSS Custom Properties ## Usage To create a [CSS custom property (variable)](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties), set a property with the `--` prefix in either props or `css`. ```tsx ``` To reference custom properties, use CSS [var](https://developer.mozilla.org/en-US/docs/Web/CSS/var) or `{}` ([interpolation](https://yamada-ui.com/docs/styling/interpolation.md)). ```tsx Box ``` :::warning Custom properties you set will only apply to child elements of the element where they are defined. ::: Additionally, custom properties can reference [theme](https://yamada-ui.com/docs/theming.md) tokens. ```tsx Box ``` # CSS Value Functions :::note Function arguments can reference tokens from the [theme](https://yamada-ui.com/docs/theming.md). ::: ## Calculation & Comparison Yamada UI provides functions that make CSS calculation and comparison functions more convenient. ### calc You can use CSS's [calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc) to reference and calculate tokens from the [theme](https://yamada-ui.com/docs/theming.md). ```tsx
Calc
``` ```tsx
Use interpolated token
``` :::warning If the token name is a number, such as the [spaces](https://yamada-ui.com/docs/theming/tokens/spaces.md) tokens in the [theme](https://yamada-ui.com/docs/theming.md), reference it using `{}` (see [interpolation](https://yamada-ui.com/docs/styling/interpolation.md)). ::: ### min Use CSS's [min](https://developer.mozilla.org/en-US/docs/Web/CSS/min) to set the smallest value from the given arguments. If there is only one argument, a second value of `"100%"` is set. ```tsx
Min
Omitted Min
``` ### max Use CSS's [max](https://developer.mozilla.org/en-US/docs/Web/CSS/max) to set the largest value from the given arguments. If there is only one argument, a second value of `"100%"` is set. ```tsx
Max
Omitted Max
``` ### clamp Use CSS's [clamp](https://developer.mozilla.org/en-US/docs/Web/CSS/clamp) to constrain a value between an upper and lower bound. If there are two arguments, a recommended value of `"100%"` is set. ```tsx
Clamp
Omitted Clamp
``` ## Color Yamada UI provides functions that easily mix colors together, lighten, and darken colors. ### mix Use CSS's [color-mix](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix) to mix colors together. You can specify two or three arguments. The [method](https://developer.mozilla.org/en-US/docs/Web/CSS/color-interpolation-method) can be omitted, and the default is `in srgb`. ```tsx
"in srgb" + "red.500" + "blue.500"
``` You can change the ratio by specifying a percentage. ```tsx
"in lab" + "orange.500 80%" + "purple.500 20%"
``` :::warning Make sure the percentages add up to `100%`. ::: ### tint Use [mix](#mix) to lighten a color by mixing it with `#FFFFFF`. ```tsx
Tint color
``` ### shade Use [mix](#mix) to darken a color by mixing it with `#000000`. ```tsx
Shade color
``` ### transparentize Use [mix](#mix) to make a color transparent by mixing it with `transparent`. A shorthand notation like `bg="red.500 / 50"` is also available. ```tsx
Transparentize color
``` ### tone Use [mix](#mix) to create a color based on a specified color and tone. ```tsx preview {TONES.map((tone) => (
Tone {tone}
))}
``` ## Gradient Yamada UI provides functions that easily create gradients. To add a gradient, set functions and values to `bgGradient`. - `linear(, , )` - `radial(, )` You can also use other CSS gradient functions like `repeating-linear` or `conic`. Shortcuts are available for ``. ```ts { 'to-t': 'to top', 'to-tr': 'to top right', 'to-r': 'to right', 'to-br': 'to bottom right', 'to-b': 'to bottom', 'to-bl': 'to bottom left', 'to-l': 'to left', 'to-tl': 'to top left', } ``` ```tsx ``` ### Customize Colors You can use both theme [tokens](https://yamada-ui.com/docs/theming/tokens/colors.md) and [CSS color values](https://developer.mozilla.org/en-US/docs/Web/CSS/color). ```tsx ``` ### Text Gradient To add a gradient to text, set `bgGradient` and `bgClip` to `text`. ```tsx クリリンのことか……クリリンのことかーーーっ!!!!! ``` # Focus Ring ## Overview A focus ring is used to identify the element that is currently focused. Yamada UI provides `focusRing` and `focusVisibleRing` to easily configure the style of the focus ring. ## Usage ### focusRing `focusRing` is applied to `&:is(:focus, [data-focus])`. ```tsx ``` ### focusVisibleRing `focusVisibleRing` is applied to `&:is(:focus-visible, [data-focus-visible])`. ```tsx ``` :::note By default, Yamada UI sets `focusVisibleRing="outline"` for all elements via [global styles](https://yamada-ui.com/docs/styling/global-styles.md). Therefore, you do not need to set `focusVisibleRing` individually for each element. ::: ## Customize ### Change Variant ```tsx {(value, index) => ( )} ``` ### Change Color To change the color, set a value to `focusRingColor`. ```tsx ``` ### Change Width To change the width, set a value to `focusRingWidth`. ```tsx ``` ### Change Style To change the style, set a value to `focusRingStyle`. ```tsx ``` ### Change Offset To change the offset, set a value to `focusRingOffset`. ```tsx ``` # Global Styles ## Overview Global styles are styles that are applied to the entire application. The styles defined in the theme are [here](https://github.com/yamada-ui/yamada-ui/blob/main/packages/react/src/theme/styles/global-style.ts). ```tsx export const globalStyle = defineStyles.globalStyle({ "*, *::before, *::after": { borderColor: "border", borderStyle: "solid", borderWidth: "0", focusVisibleRing: "outline", fontFeatureSettings: '"cv11"', overflowWrap: "break-word", }, "*::placeholder, *[data-placeholder]": { color: "fg.subtle", }, body: { colorScheme: "mono", bg: "bg", color: "fg", fontFamily: "body", lineHeight: "moderate", overflowX: "hidden", transitionDuration: "moderate", transitionProperty: "background-color", }, }) ``` ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Style Change the `styles/global-style.ts` in the generated theme. ```tsx import { defineStyles } from "@yamada-ui/react" export const globalStyle = defineStyles.globalStyle({ "*, *::before, *::after": { borderColor: "border", borderStyle: "solid", borderWidth: "0", focusVisibleRing: "outline", fontFeatureSettings: '"cv11"', overflowWrap: "break-word", }, "*::placeholder, *[data-placeholder]": { color: "fg.subtle", }, body: { colorScheme: "blue", // [!code highlight] bg: "bg", color: "fg", fontFamily: "body", lineHeight: "moderate", overflowX: "hidden", transitionDuration: "moderate", transitionProperty: "background-color", }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` # Styling ## Overview The list of major concepts provided by the library is as follows. - [Style Props](https://yamada-ui.com/docs/styling/style-props.md) - [Conditional Styles](https://yamada-ui.com/docs/styling/conditional-styles.md) - [Responsive Design](https://yamada-ui.com/docs/styling/responsive-design.md) - [Color Mode](https://yamada-ui.com/docs/styling/color-mode.md) - [Color Scheme](https://yamada-ui.com/docs/styling/color-scheme.md) - [CSS Value Functions](https://yamada-ui.com/docs/styling/css-value-functions.md) - [Interpolation](https://yamada-ui.com/docs/styling/interpolation.md) - [Animation](https://yamada-ui.com/docs/styling/animation.md) - [Focus Ring](https://yamada-ui.com/docs/styling/focus-ring.md) - [Global Styles](https://yamada-ui.com/docs/styling/global-styles.md) - [Reset Styles](https://yamada-ui.com/docs/styling/reset-styles.md) - [Layer Styles](https://yamada-ui.com/docs/styling/layer-styles.md) - [Text Styles](https://yamada-ui.com/docs/styling/text-styles.md) - [At-Rules](https://yamada-ui.com/docs/styling/at-rules.md) - [Cascade Layers](https://yamada-ui.com/docs/styling/cascade-layers.md) ## Usage [Style Props](https://yamada-ui.com/docs/styling/style-props.md) allow you to apply styles to elements using props. Style Props conform to the [CSS properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Properties) and provide all properties in camelCase. ```tsx Box ``` :::note [Style Props](https://yamada-ui.com/docs/styling/style-props.md) uses [@mdn/browser-compat-data](https://github.com/mdn/browser-compat-data). When the library is updated, Style Props is also updated periodically. ::: # Interpolation ## Overview Interpolation is a feature for referencing [CSS custom properties (variables)](https://yamada-ui.com/docs/styling/css-custom-properties.md) or tokens from the [theme](https://yamada-ui.com/docs/theming.md). ## Usage You can reference the property name set with [CSS custom properties (variables)](https://yamada-ui.com/docs/styling/css-custom-properties.md) using `{custom-property-name}`. ```tsx Box ``` ### Reference Theme Tokens Yamada UI [Style Props](https://yamada-ui.com/docs/styling/style-props.md) only reference the corresponding tokens from the [theme](https://yamada-ui.com/docs/theming.md). For example, `borderRadius` references tokens from `radii`, but not from `spaces`. By using `{}`, you can reference tokens outside of the corresponding ones. ```tsx Box Box ``` Additionally, by using `{}` within strings, you can reference tokens from the [theme](https://yamada-ui.com/docs/theming.md). This is useful for [shorthand properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) such as [border](https://developer.mozilla.org/en-US/docs/Web/CSS/border). ```tsx Box ``` # Layer Styles ## Overview Layer styles are tokens that are used to reuse visual styles across the project. The styles defined in the theme are [here](https://github.com/yamada-ui/yamada-ui/blob/main/packages/react/src/theme/styles/layer-styles.ts). ```tsx preview {(token, index) => ( {toTitleCase(token)} )} ``` ```tsx export const layerStyles = defineStyles.layerStyle({ active: { opacity: 1 }, disabled: { cursor: "not-allowed", opacity: 0.4, _ripple: { display: "none" }, }, ghost: { bg: "transparent", border: "1px solid transparent", color: "colorScheme.outline", }, "ghost.hover": { bg: "colorScheme.ghost", }, hover: { opacity: 0.8 }, outline: { bg: "transparent", border: "1px solid {colorScheme.muted}", color: "colorScheme.outline", }, "outline.hover": { bg: "colorScheme.ghost", }, panel: { bg: "bg.panel", borderColor: "border", borderWidth: "1px", }, readOnly: { cursor: "default", _ripple: { display: "none" }, }, solid: { bg: "colorScheme.solid", border: "1px solid transparent", color: "colorScheme.contrast", }, "solid.hover": { bg: "colorScheme.solid/80", }, subtle: { bg: "colorScheme.subtle", border: "1px solid transparent", color: "colorScheme.fg", }, "subtle.hover": { bg: "colorScheme.muted", }, surface: { bg: "colorScheme.subtle", border: "1px solid {colorScheme.muted}", color: "colorScheme.fg", }, "surface.hover": { bg: "colorScheme.muted", }, visuallyHidden: visuallyHiddenAttributes.style, }) ``` ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Style Change the `styles/layer-styles.ts` in the generated theme. ```tsx import { defineStyles, visuallyHiddenAttributes } from "@yamada-ui/react" export const layerStyles = defineStyles.layerStyle({ dim: { opacity: 0.6 }, // [!code highlight] active: { opacity: 1 }, disabled: { cursor: "not-allowed", opacity: 0.4, _ripple: { display: "none" }, }, ghost: { bg: "transparent", border: "1px solid transparent", color: "colorScheme.outline", }, "ghost.hover": { bg: "colorScheme.ghost", }, hover: { opacity: 0.8 }, outline: { bg: "transparent", border: "1px solid {colorScheme.muted}", color: "colorScheme.outline", }, "outline.hover": { bg: "colorScheme.ghost", }, panel: { bg: "bg.panel", borderColor: "border", borderWidth: "1px", }, readOnly: { cursor: "default", _ripple: { display: "none" }, }, solid: { bg: "colorScheme.solid", border: "1px solid transparent", color: "colorScheme.contrast", }, "solid.hover": { bg: "colorScheme.solid/80", }, subtle: { bg: "colorScheme.subtle", border: "1px solid transparent", color: "colorScheme.fg", }, "subtle.hover": { bg: "colorScheme.muted", }, surface: { bg: "colorScheme.subtle", border: "1px solid {colorScheme.muted}", color: "colorScheme.fg", }, "surface.hover": { bg: "colorScheme.muted", }, visuallyHidden: visuallyHiddenAttributes.style, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` ### Use Layer Style Set the value to `layerStyle`. ```tsx ``` # Reset Styles ## Overview Reset styles are styles that are applied to the entire application. The styles defined in the theme are [here](https://github.com/yamada-ui/yamada-ui/blob/main/packages/react/src/theme/styles/reset-style.ts). ```tsx export const resetStyle = defineStyles.resetStyle({ "*, *::before, *::after": { boxSizing: "border-box", margin: 0, padding: 0, }, "::-webkit-file-upload-button": { font: "inherit", WebkitAppearance: "button", }, "::-webkit-search-cancel-button, ::-webkit-search-decoration": { WebkitAppearance: "none", }, "[contenteditable]": { outline: "none", }, "[hidden]:where(:not([hidden='until-found']))": { display: "none !important", }, "[type='time']::-webkit-calendar-picker-indicator": { display: "none", }, a: { color: "inherit", textDecoration: "none", }, "abbr[title]": { textDecoration: "underline dotted", }, "b, strong": { fontWeight: "bolder", }, "button, input, optgroup, select, textarea": { appearance: "none", backgroundColor: "transparent", border: 0, borderRadius: 0, color: "inherit", font: "inherit", fontFeatureSettings: "inherit", fontVariationSettings: "inherit", letterSpacing: "inherit", outline: 0, WebkitAppearance: "none", }, "code, kbd, samp, pre": { fontFamily: "inherit", fontSize: "1em", }, fieldset: { border: 0, minWidth: 0, }, "h1, h2, h3, h4, h5, h6": { fontSize: "inherit", fontWeight: "inherit", }, hr: { blockSize: 0, border: "none", borderBlockStart: "1px solid", color: "inherit", overflow: "visible", }, html: { fontFamily: "system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'", lineHeight: 1.5, WebkitTapHighlightColor: "transparent", WebkitTextSizeAdjust: "100%", }, "img, svg, video, canvas, audio, iframe, embed, object": { display: "block", }, "input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button": { display: "none", }, "input[type='search']": { outlineOffset: "-2px", }, legend: { display: "table", float: "left", width: "100%", }, mark: { backgroundColor: "inherit", color: "inherit", }, progress: { verticalAlign: "baseline", }, small: { fontSize: "80%", }, sub: { bottom: "-0.25em", }, "sub, sup": { fontSize: "75%", lineHeight: 0, position: "relative", verticalAlign: "baseline", }, summary: { display: "list-item", }, sup: { top: "-0.5em", }, "ul, ol": { listStyle: "none", }, "@media (prefers-reduced-motion: no-preference)": { ":where(html:focus-within)": { scrollBehavior: "smooth", }, }, ":where(html:has(dialog:modal[open]))": { overflow: "clip", }, ":where(dialog, [popover])": { background: "none", border: "none", color: "inherit", inset: "unset", maxHeight: "unset", maxWidth: "unset", overflow: "unset", }, ":where(dialog:not([open], [popover]), [popover]:not(:popover-open))": { display: "none !important", }, }) ``` ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Style Change the `styles/reset-style.ts` in the generated theme. ```tsx import { defineStyles } from "@yamada-ui/react" export const resetStyle = defineStyles.resetStyle({ "*, *::before, *::after": { boxSizing: "content-box", // [!code highlight] margin: 0, padding: 0, }, "::-webkit-file-upload-button": { font: "inherit", WebkitAppearance: "button", }, "::-webkit-search-cancel-button, ::-webkit-search-decoration": { WebkitAppearance: "none", }, "[contenteditable]": { outline: "none", }, "[hidden]:where(:not([hidden='until-found']))": { display: "none !important", }, "[type='time']::-webkit-calendar-picker-indicator": { display: "none", }, a: { color: "inherit", textDecoration: "none", }, "abbr[title]": { textDecoration: "underline dotted", }, "b, strong": { fontWeight: "bolder", }, "button, input, optgroup, select, textarea": { appearance: "none", backgroundColor: "transparent", border: 0, borderRadius: 0, color: "inherit", font: "inherit", fontFeatureSettings: "inherit", fontVariationSettings: "inherit", letterSpacing: "inherit", outline: 0, WebkitAppearance: "none", }, "code, kbd, samp, pre": { fontFamily: "inherit", fontSize: "1em", }, fieldset: { border: 0, minWidth: 0, }, "h1, h2, h3, h4, h5, h6": { fontSize: "inherit", fontWeight: "inherit", }, hr: { blockSize: 0, border: "none", borderBlockStart: "1px solid", color: "inherit", overflow: "visible", }, html: { fontFamily: "system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'", lineHeight: 1.5, WebkitTapHighlightColor: "transparent", WebkitTextSizeAdjust: "100%", }, "img, svg, video, canvas, audio, iframe, embed, object": { display: "block", }, "input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button": { display: "none", }, "input[type='search']": { outlineOffset: "-2px", }, legend: { display: "table", float: "left", width: "100%", }, mark: { backgroundColor: "inherit", color: "inherit", }, progress: { verticalAlign: "baseline", }, small: { fontSize: "80%", }, sub: { bottom: "-0.25em", }, "sub, sup": { fontSize: "75%", lineHeight: 0, position: "relative", verticalAlign: "baseline", }, summary: { display: "list-item", }, sup: { top: "-0.5em", }, "ul, ol": { listStyle: "none", }, "@media (prefers-reduced-motion: no-preference)": { ":where(html:focus-within)": { scrollBehavior: "smooth", }, }, ":where(html:has(dialog:modal[open]))": { overflow: "clip", }, ":where(dialog, [popover])": { background: "none", border: "none", color: "inherit", inset: "unset", maxHeight: "unset", maxWidth: "unset", overflow: "unset", }, ":where(dialog:not([open], [popover]), [popover]:not(:popover-open))": { display: "none !important", }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` # Responsive Design :::tip By default, responsive design using `@media(max-width)` media queries is adopted. If you want to use `@media(min-width)` media queries, please refer to [here](https://yamada-ui.com/docs/theming/breakpoints.md#media-queries). ::: ## Overview Responsive design refers to the breakpoints defined in the theme. Yamada UI has a Default Theme where [breakpoints](https://yamada-ui.com/docs/theming/tokens/breakpoints.md) are defined. :::note If you want to change the breakpoints, please check theme's [Breakpoints](https://yamada-ui.com/docs/theming/breakpoints.md). ::: ## Usage To set responsive design to [Style Props](https://yamada-ui.com/docs/styling/style-props.md), set an object with the breakpoints as the key. - The keys of the object define the keys set in the theme's [Breakpoints](https://yamada-ui.com/docs/theming/tokens/breakpoints.md). - The values of the object define the values of the styles set by the key. ```tsx Box ``` The above code generates the following CSS: ```css .Box { background: var(--ui-colors-bg-contrast); @media screen and (max-width: 768px) { background: var(--ui-colors-success); } } ``` ## Utilities Yamada UI provides useful custom hooks for building responsive layouts. - [useBreakpoint](https://yamada-ui.com/docs/hooks/use-breakpoint.md): A custom hook that returns the current breakpoint. This hook monitors the window size and returns the appropriate value. - [useBreakpointEffect](https://yamada-ui.com/docs/hooks/use-breakpoint-effect.md): A custom hook that executes a specific callback function when the breakpoint changes. - [useUpdateBreakpointEffect](https://yamada-ui.com/docs/hooks/use-update-breakpoint-effect.md): A custom hook that skips the side effect on the initial render and executes a specific callback function when the breakpoint changes. - [useBreakpointState](https://yamada-ui.com/docs/hooks/use-breakpoint-state.md): A custom hook that returns the current breakpoint from the provided object as the initial value. - [useBreakpointValue](https://yamada-ui.com/docs/hooks/use-breakpoint-value.md): A custom hook that returns the value of the current breakpoint from the provided object. This hook monitors changes in the window size and returns the appropriate value. # Style Props Here's a list of all the Style Props available in the library. | Prop | CSS Property | Theme Token | | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `accent` | [`accent-color`](https://developer.mozilla.org/docs/Web/CSS/accent-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `accentColor` | [`accent-color`](https://developer.mozilla.org/docs/Web/CSS/accent-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `alignContent` | [`align-content`](https://developer.mozilla.org/docs/Web/CSS/align-content) | - | | `alignItems` | [`align-items`](https://developer.mozilla.org/docs/Web/CSS/align-items) | - | | `alignmentBaseline` | [`alignment-baseline`](https://developer.mozilla.org/docs/Web/CSS/alignment-baseline) | - | | `alignSelf` | [`align-self`](https://developer.mozilla.org/docs/Web/CSS/align-self) | - | | `all` | [`all`](https://developer.mozilla.org/docs/Web/CSS/all) | - | | `anchorName` | [`anchor-name`](https://developer.mozilla.org/docs/Web/CSS/anchor-name) | - | | `anchorScope` | [`anchor-scope`](https://drafts.csswg.org/css-anchor-position-1/#propdef-anchor-scope) | - | | `animation` | [`animation`](https://developer.mozilla.org/docs/Web/CSS/animation) | [`animations`](https://yamada-ui.com/docs/theming/tokens/animations.md) | | `animationComposition` | [`animation-composition`](https://developer.mozilla.org/docs/Web/CSS/animation-composition) | - | | `animationDelay` | [`animation-delay`](https://developer.mozilla.org/docs/Web/CSS/animation-delay) | - | | `animationDirection` | [`animation-direction`](https://developer.mozilla.org/docs/Web/CSS/animation-direction) | - | | `animationDuration` | [`animation-duration`](https://developer.mozilla.org/docs/Web/CSS/animation-duration) | [`durations`](https://yamada-ui.com/docs/theming/tokens/durations.md) | | `animationFillMode` | [`animation-fill-mode`](https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode) | - | | `animationIterationCount` | [`animation-iteration-count`](https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count) | - | | `animationName` | [`animation-name`](https://developer.mozilla.org/docs/Web/CSS/animation-name) | [`keyframes`](https://yamada-ui.com/docs/theming/tokens/keyframes.md) | | `animationPlayState` | [`animation-play-state`](https://developer.mozilla.org/docs/Web/CSS/animation-play-state) | - | | `animationRange` | [`animation-range`](https://developer.mozilla.org/docs/Web/CSS/animation-range) | - | | `animationRangeEnd` | [`animation-range-end`](https://developer.mozilla.org/docs/Web/CSS/animation-range-end) | - | | `animationRangeStart` | [`animation-range-start`](https://developer.mozilla.org/docs/Web/CSS/animation-range-start) | - | | `animationTimeline` | [`animation-timeline`](https://developer.mozilla.org/docs/Web/CSS/animation-timeline) | - | | `animationTimingFunction` | [`animation-timing-function`](https://developer.mozilla.org/docs/Web/CSS/animation-timing-function) | [`easings`](https://yamada-ui.com/docs/theming/tokens/easings.md) | | `appearance` | [`appearance`](https://developer.mozilla.org/docs/Web/CSS/appearance) | - | | `apply` | - | - | | `aspectRatio` | [`aspect-ratio`](https://developer.mozilla.org/docs/Web/CSS/aspect-ratio) | [`aspectRatios`](https://yamada-ui.com/docs/theming/tokens/aspect-ratios.md) | | `backdropBlur` | `--backdrop-blur` | [`blurs`](https://yamada-ui.com/docs/theming/tokens/blurs.md) | | `backdropBrightness` | `--backdrop-brightness` | - | | `backdropContrast` | `--backdrop-contrast` | - | | `backdropDropShadow` | `--backdrop-drop-shadow` | [`shadows`](https://yamada-ui.com/docs/theming/tokens/shadows.md) | | `backdropFilter` | [`backdrop-filter`](https://developer.mozilla.org/docs/Web/CSS/backdrop-filter) | - | | `backdropGrayscale` | `--backdrop-grayscale` | - | | `backdropHueRotate` | `--backdrop-hue-rotate` | - | | `backdropInvert` | `--backdrop-invert` | - | | `backdropSaturate` | `--backdrop-saturate` | - | | `backdropSepia` | `--backdrop-sepia` | - | | `backfaceVisibility` | [`backface-visibility`](https://developer.mozilla.org/docs/Web/CSS/backface-visibility) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `background` | [`background`](https://developer.mozilla.org/docs/Web/CSS/background) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `backgroundAttachment` | [`background-attachment`](https://developer.mozilla.org/docs/Web/CSS/background-attachment) | - | | `backgroundBlendMode` | [`background-blend-mode`](https://developer.mozilla.org/docs/Web/CSS/background-blend-mode) | - | | `backgroundClip` | [`background-clip`](https://developer.mozilla.org/docs/Web/CSS/background-clip) | - | | `backgroundColor` | [`background-color`](https://developer.mozilla.org/docs/Web/CSS/background-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `backgroundImage` | [`background-image`](https://developer.mozilla.org/docs/Web/CSS/background-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `backgroundOrigin` | [`background-origin`](https://developer.mozilla.org/docs/Web/CSS/background-origin) | - | | `backgroundPosition` | [`background-position`](https://developer.mozilla.org/docs/Web/CSS/background-position) | - | | `backgroundPositionX` | [`background-position-x`](https://developer.mozilla.org/docs/Web/CSS/background-position-x) | - | | `backgroundPositionY` | [`background-position-y`](https://developer.mozilla.org/docs/Web/CSS/background-position-y) | - | | `backgroundRepeat` | [`background-repeat`](https://developer.mozilla.org/docs/Web/CSS/background-repeat) | - | | `backgroundRepeatX` | [`background-repeat-x`](https://drafts.csswg.org/css-backgrounds-4/#background-repeat-longhands) | - | | `backgroundRepeatY` | [`background-repeat-y`](https://drafts.csswg.org/css-backgrounds-4/#background-repeat-longhands) | - | | `backgroundSize` | [`background-size`](https://developer.mozilla.org/docs/Web/CSS/background-size) | - | | `baselineShift` | [`baseline-shift`](https://drafts.csswg.org/css-inline/#baseline-shift-property) | - | | `baselineSource` | [`baseline-source`](https://drafts.csswg.org/css-inline/#baseline-source) | - | | `bg` | [`background`](https://developer.mozilla.org/docs/Web/CSS/background) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `bgAttachment` | [`background-attachment`](https://developer.mozilla.org/docs/Web/CSS/background-attachment) | - | | `bgBlendMode` | [`background-blend-mode`](https://developer.mozilla.org/docs/Web/CSS/background-blend-mode) | - | | `bgClip` | [`background-clip`](https://developer.mozilla.org/docs/Web/CSS/background-clip) | - | | `bgColor` | [`background-color`](https://developer.mozilla.org/docs/Web/CSS/background-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `bgGradient` | [`background-image`](https://developer.mozilla.org/docs/Web/CSS/background-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `bgImage` | [`background-image`](https://developer.mozilla.org/docs/Web/CSS/background-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `bgImg` | [`background-image`](https://developer.mozilla.org/docs/Web/CSS/background-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `bgOrigin` | [`background-origin`](https://developer.mozilla.org/docs/Web/CSS/background-origin) | - | | `bgPosition` | [`background-position`](https://developer.mozilla.org/docs/Web/CSS/background-position) | - | | `bgPositionX` | [`background-position-x`](https://developer.mozilla.org/docs/Web/CSS/background-position-x) | - | | `bgPositionY` | [`background-position-y`](https://developer.mozilla.org/docs/Web/CSS/background-position-y) | - | | `bgPosX` | [`background-position-x`](https://developer.mozilla.org/docs/Web/CSS/background-position-x) | - | | `bgPosY` | [`background-position-y`](https://developer.mozilla.org/docs/Web/CSS/background-position-y) | - | | `bgRepeat` | [`background-repeat`](https://developer.mozilla.org/docs/Web/CSS/background-repeat) | - | | `bgSize` | [`background-size`](https://developer.mozilla.org/docs/Web/CSS/background-size) | - | | `blendMode` | [`mix-blend-mode`](https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode) | - | | `blockSize` | [`block-size`](https://developer.mozilla.org/docs/Web/CSS/block-size) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `blur` | `--blur` | [`blurs`](https://yamada-ui.com/docs/theming/tokens/blurs.md) | | `border` | [`border`](https://developer.mozilla.org/docs/Web/CSS/border) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderBlock` | [`border-block`](https://developer.mozilla.org/docs/Web/CSS/border-block) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderBlockColor` | [`border-block-color`](https://developer.mozilla.org/docs/Web/CSS/border-block-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderBlockEnd` | [`border-block-end`](https://developer.mozilla.org/docs/Web/CSS/border-block-end) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderBlockEndColor` | [`border-block-end-color`](https://developer.mozilla.org/docs/Web/CSS/border-block-end-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderBlockEndStyle` | [`border-block-end-style`](https://developer.mozilla.org/docs/Web/CSS/border-block-end-style) | - | | `borderBlockEndWidth` | [`border-block-end-width`](https://developer.mozilla.org/docs/Web/CSS/border-block-end-width) | - | | `borderBlockStart` | [`border-block-start`](https://developer.mozilla.org/docs/Web/CSS/border-block-start) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderBlockStartColor` | [`border-block-start-color`](https://developer.mozilla.org/docs/Web/CSS/border-block-start-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderBlockStartStyle` | [`border-block-start-style`](https://developer.mozilla.org/docs/Web/CSS/border-block-start-style) | - | | `borderBlockStartWidth` | [`border-block-start-width`](https://developer.mozilla.org/docs/Web/CSS/border-block-start-width) | - | | `borderBlockStyle` | [`border-block-style`](https://developer.mozilla.org/docs/Web/CSS/border-block-style) | - | | `borderBlockWidth` | [`border-block-width`](https://developer.mozilla.org/docs/Web/CSS/border-block-width) | - | | `borderBottom` | [`border-bottom`](https://developer.mozilla.org/docs/Web/CSS/border-bottom) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderBottomColor` | [`border-bottom-color`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderBottomEndRadius` | [`border-end-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderBottomLeftRadius` | [`border-bottom-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderBottomRadius` | [`border-bottom-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius), [`border-bottom-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderBottomRightRadius` | [`border-bottom-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderBottomStartRadius` | [`border-end-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderBottomStyle` | [`border-bottom-style`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-style) | - | | `borderBottomWidth` | [`border-bottom-width`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-width) | - | | `borderCollapse` | [`border-collapse`](https://developer.mozilla.org/docs/Web/CSS/border-collapse) | - | | `borderColor` | [`border-color`](https://developer.mozilla.org/docs/Web/CSS/border-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderEnd` | [`border-inline-end`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderEndColor` | [`border-inline-end-color`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderEndEndRadius` | [`border-end-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderEndRadius` | [`border-end-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius), [`border-end-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderEndStartRadius` | [`border-end-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderEndStyle` | [`border-inline-end-style`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style) | - | | `borderEndWidth` | [`border-inline-end-width`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width) | - | | `borderImage` | [`border-image`](https://developer.mozilla.org/docs/Web/CSS/border-image) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderImageOutset` | [`border-image-outset`](https://developer.mozilla.org/docs/Web/CSS/border-image-outset) | - | | `borderImageRepeat` | [`border-image-repeat`](https://developer.mozilla.org/docs/Web/CSS/border-image-repeat) | - | | `borderImageSlice` | [`border-image-slice`](https://developer.mozilla.org/docs/Web/CSS/border-image-slice) | - | | `borderImageSource` | [`border-image-source`](https://developer.mozilla.org/docs/Web/CSS/border-image-source) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `borderImageWidth` | [`border-image-width`](https://developer.mozilla.org/docs/Web/CSS/border-image-width) | - | | `borderInline` | [`border-inline`](https://developer.mozilla.org/docs/Web/CSS/border-inline) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderInlineColor` | [`border-inline-color`](https://developer.mozilla.org/docs/Web/CSS/border-inline-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderInlineEnd` | [`border-inline-end`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderInlineEndColor` | [`border-inline-end-color`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderInlineEndRadius` | [`border-end-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius), [`border-end-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderInlineEndStyle` | [`border-inline-end-style`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style) | - | | `borderInlineEndWidth` | [`border-inline-end-width`](https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width) | - | | `borderInlineStart` | [`border-inline-start`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderInlineStartColor` | [`border-inline-start-color`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderInlineStartRadius` | [`border-start-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius), [`border-start-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderInlineStartStyle` | [`border-inline-start-style`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style) | - | | `borderInlineStartWidth` | [`border-inline-start-width`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width) | - | | `borderInlineStyle` | [`border-inline-style`](https://developer.mozilla.org/docs/Web/CSS/border-inline-style) | - | | `borderInlineWidth` | [`border-inline-width`](https://developer.mozilla.org/docs/Web/CSS/border-inline-width) | - | | `borderLeft` | [`border-left`](https://developer.mozilla.org/docs/Web/CSS/border-left) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderLeftColor` | [`border-left-color`](https://developer.mozilla.org/docs/Web/CSS/border-left-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderLeftRadius` | [`border-top-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius), [`border-bottom-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderLeftStyle` | [`border-left-style`](https://developer.mozilla.org/docs/Web/CSS/border-left-style) | - | | `borderLeftWidth` | [`border-left-width`](https://developer.mozilla.org/docs/Web/CSS/border-left-width) | - | | `borderRadius` | [`border-radius`](https://developer.mozilla.org/docs/Web/CSS/border-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderRight` | [`border-right`](https://developer.mozilla.org/docs/Web/CSS/border-right) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderRightColor` | [`border-right-color`](https://developer.mozilla.org/docs/Web/CSS/border-right-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderRightRadius` | [`border-top-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius), [`border-bottom-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderRightStyle` | [`border-right-style`](https://developer.mozilla.org/docs/Web/CSS/border-right-style) | - | | `borderRightWidth` | [`border-right-width`](https://developer.mozilla.org/docs/Web/CSS/border-right-width) | - | | `borderSpacing` | [`border-spacing`](https://developer.mozilla.org/docs/Web/CSS/border-spacing) | - | | `borderStart` | [`border-inline-start`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderStartColor` | [`border-inline-start-color`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderStartEndRadius` | [`border-start-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderStartRadius` | [`border-start-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius), [`border-start-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderStartStartRadius` | [`border-start-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderStartStyle` | [`border-inline-start-style`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style) | - | | `borderStartWidth` | [`border-inline-start-width`](https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width) | - | | `borderStyle` | [`border-style`](https://developer.mozilla.org/docs/Web/CSS/border-style) | - | | `borderTop` | [`border-top`](https://developer.mozilla.org/docs/Web/CSS/border-top) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderTopColor` | [`border-top-color`](https://developer.mozilla.org/docs/Web/CSS/border-top-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `borderTopEndRadius` | [`border-start-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderTopLeftRadius` | [`border-top-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderTopRadius` | [`border-top-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius), [`border-top-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderTopRightRadius` | [`border-top-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderTopStartRadius` | [`border-start-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `borderTopStyle` | [`border-top-style`](https://developer.mozilla.org/docs/Web/CSS/border-top-style) | - | | `borderTopWidth` | [`border-top-width`](https://developer.mozilla.org/docs/Web/CSS/border-top-width) | - | | `borderWidth` | [`border-width`](https://developer.mozilla.org/docs/Web/CSS/border-width) | - | | `borderX` | [`border-left`](https://developer.mozilla.org/docs/Web/CSS/border-left), [`border-right`](https://developer.mozilla.org/docs/Web/CSS/border-right) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `borderY` | [`border-top`](https://developer.mozilla.org/docs/Web/CSS/border-top), [`border-bottom`](https://developer.mozilla.org/docs/Web/CSS/border-bottom) | [`borders`](https://yamada-ui.com/docs/theming/tokens/borders.md) | | `bottom` | [`bottom`](https://developer.mozilla.org/docs/Web/CSS/bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `boxAlign` | [`box-align`](https://developer.mozilla.org/docs/Web/CSS/box-align) | - | | `boxDecorationBreak` | [`box-decoration-break`](https://developer.mozilla.org/docs/Web/CSS/box-decoration-break) | - | | `boxDirection` | [`box-direction`](https://developer.mozilla.org/docs/Web/CSS/box-direction) | - | | `boxFlex` | [`box-flex`](https://developer.mozilla.org/docs/Web/CSS/box-flex) | - | | `boxFlexGroup` | [`box-flex-group`](https://developer.mozilla.org/docs/Web/CSS/box-flex-group) | - | | `boxLines` | [`box-lines`](https://developer.mozilla.org/docs/Web/CSS/box-lines) | - | | `boxOrdinalGroup` | [`box-ordinal-group`](https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group) | - | | `boxOrient` | [`box-orient`](https://developer.mozilla.org/docs/Web/CSS/box-orient) | - | | `boxPack` | [`box-pack`](https://developer.mozilla.org/docs/Web/CSS/box-pack) | - | | `boxShadow` | [`box-shadow`](https://developer.mozilla.org/docs/Web/CSS/box-shadow) | [`shadows`](https://yamada-ui.com/docs/theming/tokens/shadows.md) | | `boxSize` | [`width`](https://developer.mozilla.org/docs/Web/CSS/width), [`height`](https://developer.mozilla.org/docs/Web/CSS/height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `boxSizing` | [`box-sizing`](https://developer.mozilla.org/docs/Web/CSS/box-sizing) | - | | `breakAfter` | [`break-after`](https://developer.mozilla.org/docs/Web/CSS/break-after) | - | | `breakBefore` | [`break-before`](https://developer.mozilla.org/docs/Web/CSS/break-before) | - | | `breakInside` | [`break-inside`](https://developer.mozilla.org/docs/Web/CSS/break-inside) | - | | `brightness` | `--brightness` | - | | `captionSide` | [`caption-side`](https://developer.mozilla.org/docs/Web/CSS/caption-side) | - | | `caret` | [`caret-color`](https://developer.mozilla.org/docs/Web/CSS/caret-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `caretAnimation` | [`caret-animation`](https://developer.mozilla.org/docs/Web/CSS/caret-animation) | - | | `caretColor` | [`caret-color`](https://developer.mozilla.org/docs/Web/CSS/caret-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `caretShape` | [`caret-shape`](https://developer.mozilla.org/docs/Web/CSS/caret-shape) | - | | `clear` | [`clear`](https://developer.mozilla.org/docs/Web/CSS/clear) | - | | `clip` | [`clip`](https://developer.mozilla.org/docs/Web/CSS/clip) | - | | `clipPath` | [`clip-path`](https://developer.mozilla.org/docs/Web/CSS/clip-path) | - | | `clipRule` | [`clip-rule`](https://developer.mozilla.org/docs/Web/CSS/clip-rule) | - | | `color` | [`color`](https://developer.mozilla.org/docs/Web/CSS/color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `colorAdjust` | [`color-adjust`](https://drafts.csswg.org/css-color-adjust-1/#color-adjust) | - | | `colorInterpolation` | [`color-interpolation`](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) | - | | `colorInterpolationFilters` | [`color-interpolation-filters`](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) | - | | `colorMode` | [`color-scheme`](https://developer.mozilla.org/docs/Web/CSS/color-scheme) | - | | `colorScheme` | - | - | | `columnCount` | [`column-count`](https://developer.mozilla.org/docs/Web/CSS/column-count) | - | | `columnFill` | [`column-fill`](https://developer.mozilla.org/docs/Web/CSS/column-fill) | - | | `columnGap` | [`column-gap`](https://developer.mozilla.org/docs/Web/CSS/column-gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `columnRule` | [`column-rule`](https://developer.mozilla.org/docs/Web/CSS/column-rule) | - | | `columnRuleColor` | [`column-rule-color`](https://developer.mozilla.org/docs/Web/CSS/column-rule-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `columnRuleStyle` | [`column-rule-style`](https://developer.mozilla.org/docs/Web/CSS/column-rule-style) | - | | `columnRuleWidth` | [`column-rule-width`](https://developer.mozilla.org/docs/Web/CSS/column-rule-width) | - | | `columns` | [`columns`](https://developer.mozilla.org/docs/Web/CSS/columns) | - | | `columnSpan` | [`column-span`](https://developer.mozilla.org/docs/Web/CSS/column-span) | - | | `columnWidth` | [`column-width`](https://developer.mozilla.org/docs/Web/CSS/column-width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `contain` | [`contain`](https://developer.mozilla.org/docs/Web/CSS/contain) | - | | `container` | [`container`](https://developer.mozilla.org/docs/Web/CSS/container) | - | | `containerName` | [`container-name`](https://developer.mozilla.org/docs/Web/CSS/container-name) | - | | `containerType` | [`container-type`](https://developer.mozilla.org/docs/Web/CSS/container-type) | - | | `containIntrinsicBlockSize` | [`contain-intrinsic-block-size`](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) | - | | `containIntrinsicHeight` | [`contain-intrinsic-height`](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) | - | | `containIntrinsicInlineSize` | [`contain-intrinsic-inline-size`](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) | - | | `containIntrinsicSize` | [`contain-intrinsic-size`](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) | - | | `containIntrinsicWidth` | [`contain-intrinsic-width`](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `content` | [`content`](https://developer.mozilla.org/docs/Web/CSS/content) | - | | `contentVisibility` | [`content-visibility`](https://developer.mozilla.org/docs/Web/CSS/content-visibility) | - | | `contrast` | `--contrast` | - | | `cornerBlockEndShape` | [`corner-block-end-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-block-end-shape) | - | | `cornerBlockStartShape` | [`corner-block-start-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-block-start-shape) | - | | `cornerBottomLeftShape` | [`corner-bottom-left-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-bottom-left-shape) | - | | `cornerBottomRightShape` | [`corner-bottom-right-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-bottom-right-shape) | - | | `cornerBottomShape` | [`corner-bottom-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-bottom-shape) | - | | `cornerEndEndShape` | [`corner-end-end-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-end-end-shape) | - | | `cornerEndStartShape` | [`corner-end-start-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-end-start-shape) | - | | `cornerInlineEndShape` | [`corner-inline-end-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-inline-end-shape) | - | | `cornerInlineStartShape` | [`corner-inline-start-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-inline-start-shape) | - | | `cornerLeftShape` | [`corner-left-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-left-shape) | - | | `cornerRightShape` | [`corner-right-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-right-shape) | - | | `cornerShape` | [`corner-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-shape) | - | | `cornerStartEndShape` | [`corner-start-end-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-start-end-shape) | - | | `cornerStartStartShape` | [`corner-start-start-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-start-start-shape) | - | | `cornerTopLeftShape` | [`corner-top-left-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-top-left-shape) | - | | `cornerTopRightShape` | [`corner-top-right-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-top-right-shape) | - | | `cornerTopShape` | [`corner-top-shape`](https://developer.mozilla.org/docs/Web/CSS/corner-top-shape) | - | | `counterIncrement` | [`counter-increment`](https://developer.mozilla.org/docs/Web/CSS/counter-increment) | - | | `counterReset` | [`counter-reset`](https://developer.mozilla.org/docs/Web/CSS/counter-reset) | - | | `counterSet` | [`counter-set`](https://developer.mozilla.org/docs/Web/CSS/counter-set) | - | | `cursor` | [`cursor`](https://developer.mozilla.org/docs/Web/CSS/cursor) | - | | `cx` | [`cx`](https://developer.mozilla.org/docs/Web/CSS/cx) | - | | `cy` | [`cy`](https://developer.mozilla.org/docs/Web/CSS/cy) | - | | `d` | [`d`](https://developer.mozilla.org/docs/Web/CSS/d) | - | | `direction` | [`direction`](https://developer.mozilla.org/docs/Web/CSS/direction) | - | | `display` | - | - | | `dominantBaseline` | [`dominant-baseline`](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) | - | | `dropShadow` | `--drop-shadow` | [`shadows`](https://yamada-ui.com/docs/theming/tokens/shadows.md) | | `dynamicRangeLimit` | [`dynamic-range-limit`](https://developer.mozilla.org/docs/Web/CSS/dynamic-range-limit) | - | | `emptyCells` | [`empty-cells`](https://developer.mozilla.org/docs/Web/CSS/empty-cells) | - | | `fieldSizing` | [`field-sizing`](https://developer.mozilla.org/docs/Web/CSS/field-sizing) | - | | `fill` | [`fill`](https://developer.mozilla.org/docs/Web/CSS/fill) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `fillOpacity` | [`fill-opacity`](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) | - | | `fillRule` | [`fill-rule`](https://developer.mozilla.org/docs/Web/CSS/fill-rule) | - | | `filter` | [`filter`](https://developer.mozilla.org/docs/Web/CSS/filter) | - | | `flex` | [`flex`](https://developer.mozilla.org/docs/Web/CSS/flex) | - | | `flexBasis` | [`flex-basis`](https://developer.mozilla.org/docs/Web/CSS/flex-basis) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `flexDir` | [`flex-direction`](https://developer.mozilla.org/docs/Web/CSS/flex-direction) | - | | `flexDirection` | [`flex-direction`](https://developer.mozilla.org/docs/Web/CSS/flex-direction) | - | | `flexFlow` | [`flex-flow`](https://developer.mozilla.org/docs/Web/CSS/flex-flow) | - | | `flexGrow` | [`flex-grow`](https://developer.mozilla.org/docs/Web/CSS/flex-grow) | - | | `flexShrink` | [`flex-shrink`](https://developer.mozilla.org/docs/Web/CSS/flex-shrink) | - | | `flexWrap` | [`flex-wrap`](https://developer.mozilla.org/docs/Web/CSS/flex-wrap) | - | | `float` | [`float`](https://developer.mozilla.org/docs/Web/CSS/float) | - | | `floodColor` | [`flood-color`](https://developer.mozilla.org/docs/Web/CSS/flood-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `floodOpacity` | [`flood-opacity`](https://developer.mozilla.org/docs/Web/CSS/flood-opacity) | - | | `focusRing` | - | - | | `focusRingColor` | `--focus-ring-color` | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `focusRingOffset` | `--focus-ring-offset` | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `focusRingStyle` | `--focus-ring-style` | - | | `focusRingWidth` | `--focus-ring-width` | - | | `focusVisibleRing` | - | - | | `font` | [`font`](https://developer.mozilla.org/docs/Web/CSS/font) | - | | `fontFamily` | [`font-family`](https://developer.mozilla.org/docs/Web/CSS/font-family) | [`fonts`](https://yamada-ui.com/docs/theming/tokens/fonts.md) | | `fontFeatureSettings` | [`font-feature-settings`](https://developer.mozilla.org/docs/Web/CSS/font-feature-settings) | - | | `fontKerning` | [`font-kerning`](https://developer.mozilla.org/docs/Web/CSS/font-kerning) | - | | `fontLanguageOverride` | [`font-language-override`](https://developer.mozilla.org/docs/Web/CSS/font-language-override) | - | | `fontOpticalSizing` | [`font-optical-sizing`](https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing) | - | | `fontPalette` | [`font-palette`](https://developer.mozilla.org/docs/Web/CSS/font-palette) | - | | `fontSize` | [`font-size`](https://developer.mozilla.org/docs/Web/CSS/font-size) | [`fontSizes`](https://yamada-ui.com/docs/theming/tokens/font-sizes.md) | | `fontSizeAdjust` | [`font-size-adjust`](https://developer.mozilla.org/docs/Web/CSS/font-size-adjust) | - | | `fontSmooth` | [`font-smooth`](https://developer.mozilla.org/docs/Web/CSS/font-smooth) | - | | `fontStretch` | [`font-stretch`](https://developer.mozilla.org/docs/Web/CSS/font-stretch) | - | | `fontStyle` | [`font-style`](https://developer.mozilla.org/docs/Web/CSS/font-style) | - | | `fontSynthesis` | [`font-synthesis`](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) | - | | `fontSynthesisPosition` | [`font-synthesis-position`](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position) | - | | `fontSynthesisSmallCaps` | [`font-synthesis-small-caps`](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) | - | | `fontSynthesisStyle` | [`font-synthesis-style`](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) | - | | `fontSynthesisWeight` | [`font-synthesis-weight`](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) | - | | `fontVariant` | [`font-variant`](https://developer.mozilla.org/docs/Web/CSS/font-variant) | - | | `fontVariantAlternates` | [`font-variant-alternates`](https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates) | - | | `fontVariantCaps` | [`font-variant-caps`](https://developer.mozilla.org/docs/Web/CSS/font-variant-caps) | - | | `fontVariantEastAsian` | [`font-variant-east-asian`](https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian) | - | | `fontVariantEmoji` | [`font-variant-emoji`](https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji) | - | | `fontVariantLigatures` | [`font-variant-ligatures`](https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures) | - | | `fontVariantNumeric` | [`font-variant-numeric`](https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric) | - | | `fontVariantPosition` | [`font-variant-position`](https://developer.mozilla.org/docs/Web/CSS/font-variant-position) | - | | `fontVariationSettings` | [`font-variation-settings`](https://developer.mozilla.org/docs/Web/CSS/font-variation-settings) | - | | `fontWeight` | [`font-weight`](https://developer.mozilla.org/docs/Web/CSS/font-weight) | [`fontWeights`](https://yamada-ui.com/docs/theming/tokens/font-weights.md) | | `fontWidth` | [`font-width`](https://drafts.csswg.org/css-fonts/#propdef-font-width) | - | | `forcedColorAdjust` | [`forced-color-adjust`](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) | - | | `g` | [`gap`](https://developer.mozilla.org/docs/Web/CSS/gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `gap` | [`gap`](https://developer.mozilla.org/docs/Web/CSS/gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `gapX` | [`column-gap`](https://developer.mozilla.org/docs/Web/CSS/column-gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `gapY` | [`row-gap`](https://developer.mozilla.org/docs/Web/CSS/row-gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `glyphOrientationHorizontal` | [`glyph-orientation-horizontal`](https://developer.mozilla.org/docs/Web/SVG/Reference/Attribute/glyph-orientation-horizontal) | - | | `glyphOrientationVertical` | [`glyph-orientation-vertical`](https://drafts.csswg.org/css-writing-modes-4/#glyph-orientation) | - | | `grayscale` | `--grayscale` | - | | `grid` | [`grid`](https://developer.mozilla.org/docs/Web/CSS/grid) | - | | `gridArea` | [`grid-area`](https://developer.mozilla.org/docs/Web/CSS/grid-area) | - | | `gridAutoColumns` | [`grid-auto-columns`](https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `gridAutoFlow` | [`grid-auto-flow`](https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow) | - | | `gridAutoRows` | [`grid-auto-rows`](https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `gridColumn` | [`grid-column`](https://developer.mozilla.org/docs/Web/CSS/grid-column) | - | | `gridColumnEnd` | [`grid-column-end`](https://developer.mozilla.org/docs/Web/CSS/grid-column-end) | - | | `gridColumnStart` | [`grid-column-start`](https://developer.mozilla.org/docs/Web/CSS/grid-column-start) | - | | `gridRow` | [`grid-row`](https://developer.mozilla.org/docs/Web/CSS/grid-row) | - | | `gridRowEnd` | [`grid-row-end`](https://developer.mozilla.org/docs/Web/CSS/grid-row-end) | - | | `gridRowStart` | [`grid-row-start`](https://developer.mozilla.org/docs/Web/CSS/grid-row-start) | - | | `gridTemplate` | [`grid-template`](https://developer.mozilla.org/docs/Web/CSS/grid-template) | - | | `gridTemplateAreas` | [`grid-template-areas`](https://developer.mozilla.org/docs/Web/CSS/grid-template-areas) | - | | `gridTemplateColumns` | [`grid-template-columns`](https://developer.mozilla.org/docs/Web/CSS/grid-template-columns) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `gridTemplateRows` | [`grid-template-rows`](https://developer.mozilla.org/docs/Web/CSS/grid-template-rows) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `gx` | [`column-gap`](https://developer.mozilla.org/docs/Web/CSS/column-gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `gy` | [`row-gap`](https://developer.mozilla.org/docs/Web/CSS/row-gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `h` | [`height`](https://developer.mozilla.org/docs/Web/CSS/height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `hangingPunctuation` | [`hanging-punctuation`](https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation) | - | | `height` | [`height`](https://developer.mozilla.org/docs/Web/CSS/height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `hueRotate` | `--hue-rotate` | - | | `hyphenateCharacter` | [`hyphenate-character`](https://developer.mozilla.org/docs/Web/CSS/hyphenate-character) | - | | `hyphenateLimitChars` | [`hyphenate-limit-chars`](https://developer.mozilla.org/docs/Web/CSS/hyphenate-limit-chars) | - | | `hyphens` | [`hyphens`](https://developer.mozilla.org/docs/Web/CSS/hyphens) | - | | `imageOrientation` | [`image-orientation`](https://developer.mozilla.org/docs/Web/CSS/image-orientation) | - | | `imageRendering` | [`image-rendering`](https://developer.mozilla.org/docs/Web/CSS/image-rendering) | - | | `imeMode` | [`ime-mode`](https://drafts.csswg.org/css-ui/#input-method-editor) | - | | `initialLetter` | [`initial-letter`](https://developer.mozilla.org/docs/Web/CSS/initial-letter) | - | | `inlineSize` | [`inline-size`](https://developer.mozilla.org/docs/Web/CSS/inline-size) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `inset` | [`inset`](https://developer.mozilla.org/docs/Web/CSS/inset) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetBlock` | [`inset-block`](https://developer.mozilla.org/docs/Web/CSS/inset-block) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetBlockEnd` | [`inset-block-end`](https://developer.mozilla.org/docs/Web/CSS/inset-block-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetBlockStart` | [`inset-block-start`](https://developer.mozilla.org/docs/Web/CSS/inset-block-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetEnd` | [`inset-inline-end`](https://developer.mozilla.org/docs/Web/CSS/inset-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetInline` | [`inset-inline`](https://developer.mozilla.org/docs/Web/CSS/inset-inline) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetInlineEnd` | [`inset-inline-end`](https://developer.mozilla.org/docs/Web/CSS/inset-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetInlineStart` | [`inset-inline-start`](https://developer.mozilla.org/docs/Web/CSS/inset-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetStart` | [`inset-inline-start`](https://developer.mozilla.org/docs/Web/CSS/inset-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetX` | [`left`](https://developer.mozilla.org/docs/Web/CSS/left), [`right`](https://developer.mozilla.org/docs/Web/CSS/right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `insetY` | [`top`](https://developer.mozilla.org/docs/Web/CSS/top), [`bottom`](https://developer.mozilla.org/docs/Web/CSS/bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `interactivity` | [`interactivity`](https://drafts.csswg.org/css-ui-4/#propdef-interactivity) | - | | `interestDelay` | [`interest-delay`](https://drafts.csswg.org/css-ui-4/#propdef-interest-delay) | - | | `interestDelayEnd` | [`interest-delay-end`](https://drafts.csswg.org/css-ui-4/#propdef-interest-delay-end) | - | | `interestDelayStart` | [`interest-delay-start`](https://drafts.csswg.org/css-ui-4/#propdef-interest-delay-start) | - | | `interpolateSize` | [`interpolate-size`](https://developer.mozilla.org/docs/Web/CSS/interpolate-size) | - | | `invert` | `--invert` | - | | `isolation` | [`isolation`](https://developer.mozilla.org/docs/Web/CSS/isolation) | - | | `justifyContent` | [`justify-content`](https://developer.mozilla.org/docs/Web/CSS/justify-content) | - | | `justifyItems` | [`justify-items`](https://developer.mozilla.org/docs/Web/CSS/justify-items) | - | | `justifySelf` | [`justify-self`](https://developer.mozilla.org/docs/Web/CSS/justify-self) | - | | `layerStyle` | - | - | | `leading` | [`line-height`](https://developer.mozilla.org/docs/Web/CSS/line-height) | [`lineHeights`](https://yamada-ui.com/docs/theming/tokens/line-heights.md) | | `left` | [`left`](https://developer.mozilla.org/docs/Web/CSS/left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `letterSpacing` | [`letter-spacing`](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) | [`letterSpacings`](https://yamada-ui.com/docs/theming/tokens/letter-spacings.md) | | `lightingColor` | [`lighting-color`](https://developer.mozilla.org/docs/Web/CSS/lighting-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `lineBreak` | [`line-break`](https://developer.mozilla.org/docs/Web/CSS/line-break) | - | | `lineClamp` | `--line-clamp` | - | | `lineHeight` | [`line-height`](https://developer.mozilla.org/docs/Web/CSS/line-height) | [`lineHeights`](https://yamada-ui.com/docs/theming/tokens/line-heights.md) | | `listStyle` | [`list-style`](https://developer.mozilla.org/docs/Web/CSS/list-style) | - | | `listStyleImage` | [`list-style-image`](https://developer.mozilla.org/docs/Web/CSS/list-style-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `listStyleImg` | [`list-style-image`](https://developer.mozilla.org/docs/Web/CSS/list-style-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `listStylePos` | [`list-style-position`](https://developer.mozilla.org/docs/Web/CSS/list-style-position) | - | | `listStylePosition` | [`list-style-position`](https://developer.mozilla.org/docs/Web/CSS/list-style-position) | - | | `listStyleType` | [`list-style-type`](https://developer.mozilla.org/docs/Web/CSS/list-style-type) | - | | `m` | [`margin`](https://developer.mozilla.org/docs/Web/CSS/margin) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `margin` | [`margin`](https://developer.mozilla.org/docs/Web/CSS/margin) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginBlock` | [`margin-block`](https://developer.mozilla.org/docs/Web/CSS/margin-block) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginBlockEnd` | [`margin-block-end`](https://developer.mozilla.org/docs/Web/CSS/margin-block-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginBlockStart` | [`margin-block-start`](https://developer.mozilla.org/docs/Web/CSS/margin-block-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginBottom` | [`margin-bottom`](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginEnd` | [`margin-inline-end`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginInline` | [`margin-inline`](https://developer.mozilla.org/docs/Web/CSS/margin-inline) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginInlineEnd` | [`margin-inline-end`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginInlineStart` | [`margin-inline-start`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginLeft` | [`margin-left`](https://developer.mozilla.org/docs/Web/CSS/margin-left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginRight` | [`margin-right`](https://developer.mozilla.org/docs/Web/CSS/margin-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginStart` | [`margin-inline-start`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginTop` | [`margin-top`](https://developer.mozilla.org/docs/Web/CSS/margin-top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginTrim` | [`margin-trim`](https://developer.mozilla.org/docs/Web/CSS/margin-trim) | - | | `marginX` | [`margin-inline-start`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start), [`margin-inline-end`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marginY` | [`margin-top`](https://developer.mozilla.org/docs/Web/CSS/margin-top), [`margin-bottom`](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `marker` | [`marker`](https://developer.mozilla.org/docs/Web/CSS/marker) | - | | `markerEnd` | [`marker-end`](https://developer.mozilla.org/docs/Web/CSS/marker-end) | - | | `markerMid` | [`marker-mid`](https://developer.mozilla.org/docs/Web/CSS/marker-mid) | - | | `markerStart` | [`marker-start`](https://developer.mozilla.org/docs/Web/CSS/marker-start) | - | | `mask` | [`mask`](https://developer.mozilla.org/docs/Web/CSS/mask) | - | | `maskBorder` | [`mask-border`](https://developer.mozilla.org/docs/Web/CSS/mask-border) | - | | `maskBorderOutset` | [`mask-border-outset`](https://developer.mozilla.org/docs/Web/CSS/mask-border-outset) | - | | `maskBorderRepeat` | [`mask-border-repeat`](https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat) | - | | `maskBorderSlice` | [`mask-border-slice`](https://developer.mozilla.org/docs/Web/CSS/mask-border-slice) | - | | `maskBorderSource` | [`mask-border-source`](https://developer.mozilla.org/docs/Web/CSS/mask-border-source) | - | | `maskBorderWidth` | [`mask-border-width`](https://developer.mozilla.org/docs/Web/CSS/mask-border-width) | - | | `maskClip` | [`mask-clip`](https://developer.mozilla.org/docs/Web/CSS/mask-clip) | - | | `maskComposite` | [`mask-composite`](https://developer.mozilla.org/docs/Web/CSS/mask-composite) | - | | `maskImage` | [`mask-image`](https://developer.mozilla.org/docs/Web/CSS/mask-image) | [`gradients`](https://yamada-ui.com/docs/theming/tokens/gradients.md) | | `maskMode` | [`mask-mode`](https://developer.mozilla.org/docs/Web/CSS/mask-mode) | - | | `maskOrigin` | [`mask-origin`](https://developer.mozilla.org/docs/Web/CSS/mask-origin) | - | | `maskPosition` | [`mask-position`](https://developer.mozilla.org/docs/Web/CSS/mask-position) | - | | `maskRepeat` | [`mask-repeat`](https://developer.mozilla.org/docs/Web/CSS/mask-repeat) | - | | `maskSize` | [`mask-size`](https://developer.mozilla.org/docs/Web/CSS/mask-size) | - | | `maskType` | [`mask-type`](https://developer.mozilla.org/docs/Web/CSS/mask-type) | - | | `mathDepth` | [`math-depth`](https://developer.mozilla.org/docs/Web/CSS/math-depth) | - | | `mathShift` | [`math-shift`](https://developer.mozilla.org/docs/Web/CSS/math-shift) | - | | `mathStyle` | [`math-style`](https://developer.mozilla.org/docs/Web/CSS/math-style) | - | | `maxBlockSize` | [`max-block-size`](https://developer.mozilla.org/docs/Web/CSS/max-block-size) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `maxBoxSize` | [`max-width`](https://developer.mozilla.org/docs/Web/CSS/max-width), [`max-height`](https://developer.mozilla.org/docs/Web/CSS/max-height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `maxH` | [`max-height`](https://developer.mozilla.org/docs/Web/CSS/max-height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `maxHeight` | [`max-height`](https://developer.mozilla.org/docs/Web/CSS/max-height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `maxInlineSize` | [`max-inline-size`](https://developer.mozilla.org/docs/Web/CSS/max-inline-size) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `maxW` | [`max-width`](https://developer.mozilla.org/docs/Web/CSS/max-width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `maxWidth` | [`max-width`](https://developer.mozilla.org/docs/Web/CSS/max-width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `mb` | [`margin-bottom`](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `me` | [`margin-inline-end`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `minBlockSize` | [`min-block-size`](https://developer.mozilla.org/docs/Web/CSS/min-block-size) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `minBoxSize` | [`min-width`](https://developer.mozilla.org/docs/Web/CSS/min-width), [`min-height`](https://developer.mozilla.org/docs/Web/CSS/min-height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `minH` | [`min-height`](https://developer.mozilla.org/docs/Web/CSS/min-height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `minHeight` | [`min-height`](https://developer.mozilla.org/docs/Web/CSS/min-height) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `minInlineSize` | [`min-inline-size`](https://developer.mozilla.org/docs/Web/CSS/min-inline-size) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `minW` | [`min-width`](https://developer.mozilla.org/docs/Web/CSS/min-width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `minWidth` | [`min-width`](https://developer.mozilla.org/docs/Web/CSS/min-width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `mixBlendMode` | [`mix-blend-mode`](https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode) | - | | `ml` | [`margin-left`](https://developer.mozilla.org/docs/Web/CSS/margin-left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `mr` | [`margin-right`](https://developer.mozilla.org/docs/Web/CSS/margin-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `ms` | [`margin-inline-start`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `mt` | [`margin-top`](https://developer.mozilla.org/docs/Web/CSS/margin-top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `mx` | [`margin-inline-start`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-start), [`margin-inline-end`](https://developer.mozilla.org/docs/Web/CSS/margin-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `my` | [`margin-top`](https://developer.mozilla.org/docs/Web/CSS/margin-top), [`margin-bottom`](https://developer.mozilla.org/docs/Web/CSS/margin-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `objectFit` | [`object-fit`](https://developer.mozilla.org/docs/Web/CSS/object-fit) | - | | `objectPosition` | [`object-position`](https://developer.mozilla.org/docs/Web/CSS/object-position) | - | | `objectViewBox` | [`object-view-box`](https://developer.mozilla.org/docs/Web/CSS/object-view-box) | - | | `offset` | [`offset`](https://developer.mozilla.org/docs/Web/CSS/offset) | - | | `offsetAnchor` | [`offset-anchor`](https://developer.mozilla.org/docs/Web/CSS/offset-anchor) | - | | `offsetDistance` | [`offset-distance`](https://developer.mozilla.org/docs/Web/CSS/offset-distance) | - | | `offsetPath` | [`offset-path`](https://developer.mozilla.org/docs/Web/CSS/offset-path) | - | | `offsetPosition` | [`offset-position`](https://developer.mozilla.org/docs/Web/CSS/offset-position) | - | | `offsetRotate` | [`offset-rotate`](https://developer.mozilla.org/docs/Web/CSS/offset-rotate) | - | | `opacity` | [`opacity`](https://developer.mozilla.org/docs/Web/CSS/opacity) | - | | `order` | [`order`](https://developer.mozilla.org/docs/Web/CSS/order) | - | | `orphans` | [`orphans`](https://developer.mozilla.org/docs/Web/CSS/orphans) | - | | `outline` | [`outline`](https://developer.mozilla.org/docs/Web/CSS/outline) | - | | `outlineColor` | [`outline-color`](https://developer.mozilla.org/docs/Web/CSS/outline-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `outlineOffset` | [`outline-offset`](https://developer.mozilla.org/docs/Web/CSS/outline-offset) | - | | `outlineStyle` | [`outline-style`](https://developer.mozilla.org/docs/Web/CSS/outline-style) | - | | `outlineWidth` | [`outline-width`](https://developer.mozilla.org/docs/Web/CSS/outline-width) | - | | `overflow` | [`overflow`](https://developer.mozilla.org/docs/Web/CSS/overflow) | - | | `overflowAnchor` | [`overflow-anchor`](https://developer.mozilla.org/docs/Web/CSS/overflow-anchor) | - | | `overflowBlock` | [`overflow-block`](https://developer.mozilla.org/docs/Web/CSS/overflow-block) | - | | `overflowClipMargin` | [`overflow-clip-margin`](https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin) | - | | `overflowInline` | [`overflow-inline`](https://developer.mozilla.org/docs/Web/CSS/overflow-inline) | - | | `overflowWrap` | [`overflow-wrap`](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) | - | | `overflowX` | [`overflow-x`](https://developer.mozilla.org/docs/Web/CSS/overflow-x) | - | | `overflowY` | [`overflow-y`](https://developer.mozilla.org/docs/Web/CSS/overflow-y) | - | | `overlay` | [`overlay`](https://developer.mozilla.org/docs/Web/CSS/overlay) | - | | `overscroll` | [`overscroll-behavior`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior) | - | | `overscrollBehavior` | [`overscroll-behavior`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior) | - | | `overscrollBehaviorBlock` | [`overscroll-behavior-block`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block) | - | | `overscrollBehaviorInline` | [`overscroll-behavior-inline`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline) | - | | `overscrollBehaviorX` | [`overscroll-behavior-x`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x) | - | | `overscrollBehaviorY` | [`overscroll-behavior-y`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y) | - | | `overscrollX` | [`overscroll-behavior-x`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x) | - | | `overscrollY` | [`overscroll-behavior-y`](https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y) | - | | `p` | [`padding`](https://developer.mozilla.org/docs/Web/CSS/padding) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `padding` | [`padding`](https://developer.mozilla.org/docs/Web/CSS/padding) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingBlock` | [`padding-block`](https://developer.mozilla.org/docs/Web/CSS/padding-block) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingBlockEnd` | [`padding-block-end`](https://developer.mozilla.org/docs/Web/CSS/padding-block-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingBlockStart` | [`padding-block-start`](https://developer.mozilla.org/docs/Web/CSS/padding-block-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingBottom` | [`padding-bottom`](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingEnd` | [`padding-inline-end`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingInline` | [`padding-inline`](https://developer.mozilla.org/docs/Web/CSS/padding-inline) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingInlineEnd` | [`padding-inline-end`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingInlineStart` | [`padding-inline-start`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingLeft` | [`padding-left`](https://developer.mozilla.org/docs/Web/CSS/padding-left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingRight` | [`padding-right`](https://developer.mozilla.org/docs/Web/CSS/padding-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingStart` | [`padding-inline-start`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingTop` | [`padding-top`](https://developer.mozilla.org/docs/Web/CSS/padding-top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingX` | [`padding-inline-start`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start), [`padding-inline-end`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `paddingY` | [`padding-top`](https://developer.mozilla.org/docs/Web/CSS/padding-top), [`padding-bottom`](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `page` | [`page`](https://developer.mozilla.org/docs/Web/CSS/page) | - | | `pageBreakAfter` | [`page-break-after`](https://developer.mozilla.org/docs/Web/CSS/page-break-after) | - | | `pageBreakBefore` | [`page-break-before`](https://developer.mozilla.org/docs/Web/CSS/page-break-before) | - | | `pageBreakInside` | [`page-break-inside`](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) | - | | `paintOrder` | [`paint-order`](https://developer.mozilla.org/docs/Web/CSS/paint-order) | - | | `pb` | [`padding-bottom`](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `pe` | [`padding-inline-end`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `perspective` | [`perspective`](https://developer.mozilla.org/docs/Web/CSS/perspective) | - | | `perspectiveOrigin` | [`perspective-origin`](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) | - | | `pl` | [`padding-left`](https://developer.mozilla.org/docs/Web/CSS/padding-left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `placeContent` | [`place-content`](https://developer.mozilla.org/docs/Web/CSS/place-content) | - | | `placeItems` | [`place-items`](https://developer.mozilla.org/docs/Web/CSS/place-items) | - | | `placeSelf` | [`place-self`](https://developer.mozilla.org/docs/Web/CSS/place-self) | - | | `pointerEvents` | [`pointer-events`](https://developer.mozilla.org/docs/Web/CSS/pointer-events) | - | | `pos` | [`position`](https://developer.mozilla.org/docs/Web/CSS/position) | - | | `position` | [`position`](https://developer.mozilla.org/docs/Web/CSS/position) | - | | `positionAnchor` | [`position-anchor`](https://developer.mozilla.org/docs/Web/CSS/position-anchor) | - | | `positionArea` | [`position-area`](https://developer.mozilla.org/docs/Web/CSS/position-area) | - | | `positionTry` | [`position-try`](https://developer.mozilla.org/docs/Web/CSS/position-try) | - | | `positionTryFallbacks` | [`position-try-fallbacks`](https://developer.mozilla.org/docs/Web/CSS/position-try-fallbacks) | - | | `positionTryOrder` | [`position-try-order`](https://developer.mozilla.org/docs/Web/CSS/position-try-order) | - | | `positionVisibility` | [`position-visibility`](https://developer.mozilla.org/docs/Web/CSS/position-visibility) | - | | `pr` | [`padding-right`](https://developer.mozilla.org/docs/Web/CSS/padding-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `printColorAdjust` | [`print-color-adjust`](https://developer.mozilla.org/docs/Web/CSS/print-color-adjust) | - | | `ps` | [`padding-inline-start`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `pt` | [`padding-top`](https://developer.mozilla.org/docs/Web/CSS/padding-top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `px` | [`padding-inline-start`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-start), [`padding-inline-end`](https://developer.mozilla.org/docs/Web/CSS/padding-inline-end) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `py` | [`padding-top`](https://developer.mozilla.org/docs/Web/CSS/padding-top), [`padding-bottom`](https://developer.mozilla.org/docs/Web/CSS/padding-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `quotes` | [`quotes`](https://developer.mozilla.org/docs/Web/CSS/quotes) | - | | `r` | [`r`](https://developer.mozilla.org/docs/Web/CSS/r) | - | | `readingFlow` | [`reading-flow`](https://developer.mozilla.org/docs/Web/CSS/reading-flow) | - | | `readingOrder` | [`reading-order`](https://developer.mozilla.org/docs/Web/CSS/reading-order) | - | | `resize` | [`resize`](https://developer.mozilla.org/docs/Web/CSS/resize) | - | | `right` | [`right`](https://developer.mozilla.org/docs/Web/CSS/right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `rotate` | [`rotate`](https://developer.mozilla.org/docs/Web/CSS/rotate) | - | | `rotateX` | `--rotate-x` | - | | `rotateY` | `--rotate-y` | - | | `rotateZ` | `--rotate-z` | - | | `rounded` | [`border-radius`](https://developer.mozilla.org/docs/Web/CSS/border-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedBottom` | [`border-bottom-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius), [`border-bottom-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedBottomEnd` | [`border-end-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedBottomLeft` | [`border-bottom-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedBottomRight` | [`border-bottom-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedBottomStart` | [`border-end-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedEnd` | [`border-end-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius), [`border-end-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedLeft` | [`border-top-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius), [`border-bottom-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedRight` | [`border-top-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius), [`border-bottom-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedStart` | [`border-start-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius), [`border-start-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedTop` | [`border-top-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius), [`border-top-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedTopEnd` | [`border-start-end-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedTopLeft` | [`border-top-left-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedTopRight` | [`border-top-right-radius`](https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `roundedTopStart` | [`border-start-start-radius`](https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius) | [`radii`](https://yamada-ui.com/docs/theming/tokens/radii.md) | | `rowGap` | [`row-gap`](https://developer.mozilla.org/docs/Web/CSS/row-gap) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `rubyAlign` | [`ruby-align`](https://developer.mozilla.org/docs/Web/CSS/ruby-align) | - | | `rubyOverhang` | [`ruby-overhang`](https://developer.mozilla.org/docs/Web/CSS/ruby-overhang) | - | | `rubyPosition` | [`ruby-position`](https://developer.mozilla.org/docs/Web/CSS/ruby-position) | - | | `rx` | [`rx`](https://developer.mozilla.org/docs/Web/CSS/rx) | - | | `ry` | [`ry`](https://developer.mozilla.org/docs/Web/CSS/ry) | - | | `saturate` | `--saturate` | - | | `scale` | [`scale`](https://developer.mozilla.org/docs/Web/CSS/scale) | - | | `scaleX` | `--scale-x` | - | | `scaleY` | `--scale-y` | - | | `scaleZ` | `--scale-z` | - | | `scrollbarColor` | [`scrollbar-color`](https://developer.mozilla.org/docs/Web/CSS/scrollbar-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `scrollbarGutter` | [`scrollbar-gutter`](https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter) | - | | `scrollbarWidth` | [`scrollbar-width`](https://developer.mozilla.org/docs/Web/CSS/scrollbar-width) | - | | `scrollBehavior` | [`scroll-behavior`](https://developer.mozilla.org/docs/Web/CSS/scroll-behavior) | - | | `scrollInitialTarget` | [`scroll-initial-target`](https://drafts.csswg.org/css-scroll-snap-2/#propdef-scroll-initial-target) | - | | `scrollMargin` | [`scroll-margin`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarginBlock` | [`scroll-margin-block`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block) | - | | `scrollMarginBlockEnd` | [`scroll-margin-block-end`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end) | - | | `scrollMarginBlockStart` | [`scroll-margin-block-start`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start) | - | | `scrollMarginBottom` | [`scroll-margin-bottom`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarginInline` | [`scroll-margin-inline`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline) | - | | `scrollMarginInlineEnd` | [`scroll-margin-inline-end`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end) | - | | `scrollMarginInlineStart` | [`scroll-margin-inline-start`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start) | - | | `scrollMarginLeft` | [`scroll-margin-left`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarginRight` | [`scroll-margin-right`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarginTop` | [`scroll-margin-top`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarginX` | [`scroll-margin-left`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left), [`scroll-margin-right`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarginY` | [`scroll-margin-top`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top), [`scroll-margin-bottom`](https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollMarkerGroup` | [`scroll-marker-group`](https://developer.mozilla.org/docs/Web/CSS/scroll-marker-group) | - | | `scrollPadding` | [`scroll-padding`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollPaddingBlock` | [`scroll-padding-block`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block) | - | | `scrollPaddingBlockEnd` | [`scroll-padding-block-end`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end) | - | | `scrollPaddingBlockStart` | [`scroll-padding-block-start`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start) | - | | `scrollPaddingBottom` | [`scroll-padding-bottom`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollPaddingInline` | [`scroll-padding-inline`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline) | - | | `scrollPaddingInlineEnd` | [`scroll-padding-inline-end`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end) | - | | `scrollPaddingInlineStart` | [`scroll-padding-inline-start`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start) | - | | `scrollPaddingLeft` | [`scroll-padding-left`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollPaddingRight` | [`scroll-padding-right`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollPaddingTop` | [`scroll-padding-top`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollPaddingX` | [`scroll-padding-left`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left), [`scroll-padding-right`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollPaddingY` | [`scroll-padding-top`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top), [`scroll-padding-bottom`](https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `scrollSnapAlign` | [`scroll-snap-align`](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align) | - | | `scrollSnapStop` | [`scroll-snap-stop`](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop) | - | | `scrollSnapType` | [`scroll-snap-type`](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) | - | | `scrollTargetGroup` | [`scroll-target-group`](https://developer.mozilla.org/docs/Web/CSS/scroll-target-group) | - | | `scrollTimeline` | [`scroll-timeline`](https://developer.mozilla.org/docs/Web/CSS/scroll-timeline) | - | | `scrollTimelineAxis` | [`scroll-timeline-axis`](https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis) | - | | `scrollTimelineName` | [`scroll-timeline-name`](https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name) | - | | `sepia` | `--sepia` | - | | `shadow` | [`box-shadow`](https://developer.mozilla.org/docs/Web/CSS/box-shadow) | [`shadows`](https://yamada-ui.com/docs/theming/tokens/shadows.md) | | `shapeImageThreshold` | [`shape-image-threshold`](https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold) | - | | `shapeMargin` | [`shape-margin`](https://developer.mozilla.org/docs/Web/CSS/shape-margin) | - | | `shapeOutside` | [`shape-outside`](https://developer.mozilla.org/docs/Web/CSS/shape-outside) | - | | `shapeRendering` | [`shape-rendering`](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) | - | | `skewX` | `--skew-x` | - | | `skewY` | `--skew-y` | - | | `speak` | [`speak`](https://drafts.csswg.org/css-speech-1/#speaking-props-speak) | - | | `speakAs` | [`speak-as`](https://developer.mozilla.org/docs/Web/CSS/speak-as) | - | | `stopColor` | [`stop-color`](https://developer.mozilla.org/docs/Web/CSS/stop-color) | - | | `stopOpacity` | [`stop-opacity`](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) | - | | `stroke` | [`stroke`](https://developer.mozilla.org/docs/Web/CSS/stroke) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `strokeColor` | [`stroke-color`](https://drafts.fxtf.org/fill-stroke-3/#stroke-color) | - | | `strokeDasharray` | [`stroke-dasharray`](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) | - | | `strokeDashoffset` | [`stroke-dashoffset`](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) | - | | `strokeLinecap` | [`stroke-linecap`](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) | - | | `strokeLinejoin` | [`stroke-linejoin`](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) | - | | `strokeMiterlimit` | [`stroke-miterlimit`](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) | - | | `strokeOpacity` | [`stroke-opacity`](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) | - | | `strokeWidth` | [`stroke-width`](https://developer.mozilla.org/docs/Web/CSS/stroke-width) | - | | `tableLayout` | [`table-layout`](https://developer.mozilla.org/docs/Web/CSS/table-layout) | - | | `tabSize` | [`tab-size`](https://developer.mozilla.org/docs/Web/CSS/tab-size) | - | | `text` | [`font-size`](https://developer.mozilla.org/docs/Web/CSS/font-size) | [`fontSizes`](https://yamada-ui.com/docs/theming/tokens/font-sizes.md) | | `textAlign` | [`text-align`](https://developer.mozilla.org/docs/Web/CSS/text-align) | - | | `textAlignLast` | [`text-align-last`](https://developer.mozilla.org/docs/Web/CSS/text-align-last) | - | | `textAnchor` | [`text-anchor`](https://developer.mozilla.org/docs/Web/CSS/text-anchor) | - | | `textAutospace` | [`text-autospace`](https://developer.mozilla.org/docs/Web/CSS/text-autospace) | - | | `textBox` | [`text-box`](https://developer.mozilla.org/docs/Web/CSS/text-box) | - | | `textBoxEdge` | [`text-box-edge`](https://developer.mozilla.org/docs/Web/CSS/text-box-edge) | - | | `textBoxTrim` | [`text-box-trim`](https://developer.mozilla.org/docs/Web/CSS/text-box-trim) | - | | `textColor` | [`color`](https://developer.mozilla.org/docs/Web/CSS/color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `textCombineUpright` | [`text-combine-upright`](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) | - | | `textDecor` | [`text-decoration`](https://developer.mozilla.org/docs/Web/CSS/text-decoration) | - | | `textDecoration` | [`text-decoration`](https://developer.mozilla.org/docs/Web/CSS/text-decoration) | - | | `textDecorationColor` | [`text-decoration-color`](https://developer.mozilla.org/docs/Web/CSS/text-decoration-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `textDecorationLine` | [`text-decoration-line`](https://developer.mozilla.org/docs/Web/CSS/text-decoration-line) | - | | `textDecorationSkip` | [`text-decoration-skip`](https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip) | - | | `textDecorationSkipInk` | [`text-decoration-skip-ink`](https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink) | - | | `textDecorationStyle` | [`text-decoration-style`](https://developer.mozilla.org/docs/Web/CSS/text-decoration-style) | - | | `textDecorationThickness` | [`text-decoration-thickness`](https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness) | - | | `textEmphasis` | [`text-emphasis`](https://developer.mozilla.org/docs/Web/CSS/text-emphasis) | - | | `textEmphasisColor` | [`text-emphasis-color`](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color) | [`colors`](https://yamada-ui.com/docs/theming/tokens/colors.md) | | `textEmphasisPosition` | [`text-emphasis-position`](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position) | - | | `textEmphasisStyle` | [`text-emphasis-style`](https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style) | - | | `textIndent` | [`text-indent`](https://developer.mozilla.org/docs/Web/CSS/text-indent) | - | | `textJustify` | [`text-justify`](https://developer.mozilla.org/docs/Web/CSS/text-justify) | - | | `textOrientation` | [`text-orientation`](https://developer.mozilla.org/docs/Web/CSS/text-orientation) | - | | `textOverflow` | [`text-overflow`](https://developer.mozilla.org/docs/Web/CSS/text-overflow) | - | | `textRendering` | [`text-rendering`](https://developer.mozilla.org/docs/Web/CSS/text-rendering) | - | | `textShadow` | [`text-shadow`](https://developer.mozilla.org/docs/Web/CSS/text-shadow) | [`shadows`](https://yamada-ui.com/docs/theming/tokens/shadows.md) | | `textSizeAdjust` | [`text-size-adjust`](https://developer.mozilla.org/docs/Web/CSS/text-size-adjust) | - | | `textSpacingTrim` | [`text-spacing-trim`](https://developer.mozilla.org/docs/Web/CSS/text-spacing-trim) | - | | `textStyle` | - | - | | `textTransform` | [`text-transform`](https://developer.mozilla.org/docs/Web/CSS/text-transform) | - | | `textUnderlineOffset` | [`text-underline-offset`](https://developer.mozilla.org/docs/Web/CSS/text-underline-offset) | - | | `textUnderlinePosition` | [`text-underline-position`](https://developer.mozilla.org/docs/Web/CSS/text-underline-position) | - | | `textWrap` | [`text-wrap`](https://developer.mozilla.org/docs/Web/CSS/text-wrap) | - | | `textWrapMode` | [`text-wrap-mode`](https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode) | - | | `textWrapStyle` | [`text-wrap-style`](https://developer.mozilla.org/docs/Web/CSS/text-wrap-style) | - | | `timelineScope` | [`timeline-scope`](https://developer.mozilla.org/docs/Web/CSS/timeline-scope) | - | | `top` | [`top`](https://developer.mozilla.org/docs/Web/CSS/top) | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `touchAction` | [`touch-action`](https://developer.mozilla.org/docs/Web/CSS/touch-action) | - | | `tracking` | [`letter-spacing`](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) | [`letterSpacings`](https://yamada-ui.com/docs/theming/tokens/letter-spacings.md) | | `transform` | [`transform`](https://developer.mozilla.org/docs/Web/CSS/transform) | - | | `transformBox` | [`transform-box`](https://developer.mozilla.org/docs/Web/CSS/transform-box) | - | | `transformOrigin` | [`transform-origin`](https://developer.mozilla.org/docs/Web/CSS/transform-origin) | - | | `transformStyle` | [`transform-style`](https://developer.mozilla.org/docs/Web/CSS/transform-style) | - | | `transition` | - | - | | `transitionBehavior` | [`transition-behavior`](https://developer.mozilla.org/docs/Web/CSS/transition-behavior) | - | | `transitionDelay` | [`transition-delay`](https://developer.mozilla.org/docs/Web/CSS/transition-delay) | - | | `transitionDuration` | [`transition-duration`](https://developer.mozilla.org/docs/Web/CSS/transition-duration) | [`durations`](https://yamada-ui.com/docs/theming/tokens/durations.md) | | `transitionProperty` | - | - | | `transitionTimingFunction` | [`transition-timing-function`](https://developer.mozilla.org/docs/Web/CSS/transition-timing-function) | [`easings`](https://yamada-ui.com/docs/theming/tokens/easings.md) | | `translateX` | `--translate-x` | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `translateY` | `--translate-y` | [`spaces`](https://yamada-ui.com/docs/theming/tokens/spaces.md) | | `translateZ` | `--translate-z` | - | | `truncated` | - | - | | `unicodeBidi` | [`unicode-bidi`](https://developer.mozilla.org/docs/Web/CSS/unicode-bidi) | - | | `userModify` | [`user-modify`](https://developer.mozilla.org/docs/Web/CSS/user-modify) | - | | `userSelect` | [`user-select`](https://developer.mozilla.org/docs/Web/CSS/user-select) | - | | `vectorEffect` | [`vector-effect`](https://developer.mozilla.org/docs/Web/CSS/vector-effect) | - | | `verticalAlign` | [`vertical-align`](https://developer.mozilla.org/docs/Web/CSS/vertical-align) | - | | `viewTimeline` | [`view-timeline`](https://developer.mozilla.org/docs/Web/CSS/view-timeline) | - | | `viewTimelineAxis` | [`view-timeline-axis`](https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis) | - | | `viewTimelineInset` | [`view-timeline-inset`](https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset) | - | | `viewTimelineName` | [`view-timeline-name`](https://developer.mozilla.org/docs/Web/CSS/view-timeline-name) | - | | `viewTransitionClass` | [`view-transition-class`](https://developer.mozilla.org/docs/Web/CSS/view-transition-class) | - | | `viewTransitionGroup` | [`view-transition-group`](https://drafts.csswg.org/css-view-transitions-2/#view-transition-group-prop) | - | | `viewTransitionName` | [`view-transition-name`](https://developer.mozilla.org/docs/Web/CSS/view-transition-name) | - | | `visibility` | [`visibility`](https://developer.mozilla.org/docs/Web/CSS/visibility) | - | | `w` | [`width`](https://developer.mozilla.org/docs/Web/CSS/width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `whiteSpace` | [`white-space`](https://developer.mozilla.org/docs/Web/CSS/white-space) | - | | `whiteSpaceCollapse` | [`white-space-collapse`](https://developer.mozilla.org/docs/Web/CSS/white-space-collapse) | - | | `widows` | [`widows`](https://developer.mozilla.org/docs/Web/CSS/widows) | - | | `width` | [`width`](https://developer.mozilla.org/docs/Web/CSS/width) | [`sizes`](https://yamada-ui.com/docs/theming/tokens/sizes.md) | | `willChange` | [`will-change`](https://developer.mozilla.org/docs/Web/CSS/will-change) | - | | `wordBreak` | [`word-break`](https://developer.mozilla.org/docs/Web/CSS/word-break) | - | | `wordSpacing` | [`word-spacing`](https://developer.mozilla.org/docs/Web/CSS/word-spacing) | - | | `writingMode` | [`writing-mode`](https://developer.mozilla.org/docs/Web/CSS/writing-mode) | - | | `x` | [`x`](https://developer.mozilla.org/docs/Web/CSS/x) | - | | `y` | [`y`](https://developer.mozilla.org/docs/Web/CSS/y) | - | | `z` | [`z-index`](https://developer.mozilla.org/docs/Web/CSS/z-index) | [`zIndices`](https://yamada-ui.com/docs/theming/tokens/z-indices.md) | | `zIndex` | [`z-index`](https://developer.mozilla.org/docs/Web/CSS/z-index) | [`zIndices`](https://yamada-ui.com/docs/theming/tokens/z-indices.md) | | `zoom` | [`zoom`](https://developer.mozilla.org/docs/Web/CSS/zoom) | - | ## At-Rules | Prop | CSS Property | Theme Token | | -------------------- | ------------ | --------------------------------------------------------------------- | | `_container` | @container | - | | `_keyframes` | @keyframes | [`keyframes`](https://yamada-ui.com/docs/theming/tokens/keyframes.md) | | `_landscape` | @media | - | | `_media` | @media | - | | `_mediaDark` | @media | - | | `_mediaLight` | @media | - | | `_mediaReduceMotion` | @media | - | | `_portrait` | @media | - | | `_print` | @media | - | | `_supports` | @supports | - | ## Pseudo Elements | Prop | CSS Property | | ---------------------- | ----------------------------------------- | | `_after` | `&::after` | | `_backdrop` | `&::backdrop` | | `_before` | `&::before` | | `_cue` | `&::cue` | | `_cueRegion` | `&::cue-region` | | `_fileSelector` | `&::file-selector-button` | | `_firstLetter` | `&::first-letter` | | `_firstLine` | `&::first-line` | | `_marker` | `&::marker` | | `_placeholder` | `&::placeholder, &[data-placeholder]` | | `_scrollbar` | `&::-webkit-scrollbar, &[data-scrollbar]` | | `_scrollbarButton` | `&::-webkit-scrollbar-button` | | `_scrollbarCorner` | `&::-webkit-scrollbar-corner` | | `_scrollbarThumb` | `&::-webkit-scrollbar-thumb` | | `_scrollbarTrack` | `&::-webkit-scrollbar-track` | | `_scrollbarTrackPiece` | `&::-webkit-scrollbar-track-piece` | | `_selection` | `&::selection` | ## Pseudo Classes | Prop | CSS Property | | --------------------- | ------------------------------------------------------------------------------------------------ | | `_active` | `&:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])` | | `_activedescendant` | `&:is([data-activedescendant])` | | `_anyLink` | `&:is(:any-link, [data-any-link])` | | `_autofill` | `&:autofill` | | `_blank` | `&:is(:blank, [data-blank])` | | `_checked` | `&:is(:checked, [data-checked], [aria-checked=true])` | | `_child` | `& > *` | | `_default` | `&:default` | | `_disabled` | `&:is(:disabled, [disabled], [data-disabled])` | | `_empty` | `&:empty` | | `_enabled` | `&:is(:enabled, [data-enabled])` | | `_even` | `&:nth-of-type(even)` | | `_first` | `&:first-of-type` | | `_firstChild` | `& > *:first-child` | | `_focus` | `&:is(:focus, [data-focus])` | | `_focusVisible` | `&:is(:focus-visible, [data-focus-visible])` | | `_focusWithin` | `&:not(:focus-within, [data-focus-within])` | | `_fullScreen` | `&:fullscreen` | | `_horizontal` | `&:is([data-orientation=horizontal], [aria-orientation=horizontal])` | | `_hover` | `&:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])` | | `_icon` | `&:where(svg:not([data-loading])), & > [data-icon]` | | `_indeterminate` | `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])` | | `_inRange` | `&:is(:in-range, [data-in-range])` | | `_invalid` | `&:is([data-invalid], [aria-invalid=true])` | | `_last` | `&:last-of-type` | | `_lastChild` | `& > *:last-child` | | `_link` | `&:is(:link, [data-link])` | | `_modal` | `&:modal` | | `_nativeActive` | `&:active` | | `_nativeChecked` | `&:checked` | | `_nativeDisabled` | `&:is(disabled, [disabled])` | | `_nativeFocus` | `&:focus` | | `_nativeFocusVisible` | `&:focus-visible` | | `_nativeFocusWithin` | `&:focus-within` | | `_nativeHover` | `&:hover` | | `_nativeReadOnly` | `&:is([readonly], [aria-readonly=true])` | | `_nativeTarget` | `&:target` | | `_nativeValid` | `&:valid` | | `_notChecked` | `&:not(:checked):not([data-checked]):not([aria-checked=true])` | | `_notEmpty` | `&:not(:empty)` | | `_notFirst` | `&:not(:first-of-type)` | | `_notFirstChild` | `& > *:not(:first-child)` | | `_notLast` | `&:not(:last-of-type)` | | `_notLastChild` | `& > *:not(:last-child)` | | `_notTarget` | `&:not(:target)` | | `_odd` | `&:nth-of-type(odd)` | | `_only` | `&:only-of-type` | | `_onlyChild` | `&:only-child` | | `_optional` | `&:is(:optional, [data-optional])` | | `_outRange` | `&:is(:out-of-range, [data-out-of-range])` | | `_paused` | `&:is(:paused, [data-paused])` | | `_picture` | `&:picture-in-picture` | | `_placeholderShown` | `&:placeholder-shown` | | `_playing` | `&:is(:playing, [data-playing])` | | `_readOnly` | `&:is([readonly], [data-readonly], [aria-readonly=true])` | | `_readWrite` | `&:is(:read-write, [data-read-write])` | | `_required` | `&:is(:required, [required])` | | `_target` | `&:is(:target, [data-target])` | | `_userInvalid` | `&:is(:user-invalid, [data-user-invalid])` | | `_valid` | `&:is(:valid, [data-valid])` | | `_vertical` | `&:is([data-orientation=vertical], [aria-orientation=vertical])` | | `_visited` | `&:visited` | ## Selectors | Prop | CSS Property | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `_accept` | `&[data-accept]` | | `_between` | `&[data-between]` | | `_complete` | `&[data-complete]` | | `_current` | `&:is([aria-current], [data-current]):not([aria-current='false'])` | | `_dark` | `.dark &:not([data-mode]), [data-mode=dark] &:not([data-mode]), &[data-mode=dark]` | | `_end` | `&:is([data-end], [data-group-end])` | | `_expanded` | `&:is([data-expanded], [aria-expanded=true])` | | `_fallback` | `&[data-fallback]` | | `_filled` | `&[data-filled]` | | `_grabbed` | `&:is([data-grabbed], [aria-grabbed=true])` | | `_grid` | `&:is([role=grid], [data-grid])` | | `_groupAccept` | `[role=group][data-accept] &, [data-group][data-accept] &, .group[data-accept] &` | | `_groupActive` | `[role=group]:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) &, [data-group]:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) &, .group:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) &` | | `_groupActivedescendant` | `[role=group]:is([data-activedescendant]) &, [data-group]:is([data-activedescendant]) &, .group:is([data-activedescendant]) &` | | `_groupBlank` | `[role=group]:is(:blank, [data-blank]) &, [data-group]:is(:blank, [data-blank]) &, .group:is(:blank, [data-blank]) &` | | `_groupChecked` | `[role=group]:is(:checked, [data-checked], [aria-checked=true]) &, [data-group]:is(:checked, [data-checked], [aria-checked=true]) &, .group:is(:checked, [data-checked], [aria-checked=true]) &` | | `_groupComplete` | `[role=group][data-complete] &, [data-group][data-complete] &, .group[data-complete] &` | | `_groupCurrent` | `[role=group]:is([aria-current], [data-current]):not([aria-current='false']) &, [data-group]:is([aria-current], [data-current]):not([aria-current='false']) &, .group:is([aria-current], [data-current]):not([aria-current='false']) &` | | `_groupDisabled` | `[role=group]:is(:disabled, [disabled], [data-disabled]) &, [data-group]:is(:disabled, [disabled], [data-disabled]) &, .group:is(:disabled, [disabled], [data-disabled]) &` | | `_groupEnabled` | `[role=group]:is(:enabled, [data-enabled]) &, [data-group]:is(:enabled, [data-enabled]) &, .group:is(:enabled, [data-enabled]) &` | | `_groupExpanded` | `[role=group]:is([data-expanded], [aria-expanded=true]) &, [data-group]:is([data-expanded], [aria-expanded=true]) &, .group:is([data-expanded], [aria-expanded=true]) &` | | `_groupFocus` | `[role=group]:is(:focus, [data-focus]) &, [data-group]:is(:focus, [data-focus]) &, .group:is(:focus, [data-focus]) &` | | `_groupFocusVisible` | `[role=group]:is(:focus-visible, [data-focus-visible]) &, [data-group]:is(:focus-visible, [data-focus-visible]) &, .group:is(:focus-visible, [data-focus-visible]) &` | | `_groupFocusWithin` | `[role=group]:not(:focus-within, [data-focus-within]) &, [data-group]:not(:focus-within, [data-focus-within]) &, .group:not(:focus-within, [data-focus-within]) &` | | `_groupGrabbed` | `[role=group]:is([data-grabbed], [aria-grabbed=true]) &, [data-group]:is([data-grabbed], [aria-grabbed=true]) &, .group:is([data-grabbed], [aria-grabbed=true]) &` | | `_groupHorizontal` | `[role=group]:is([data-orientation=horizontal], [aria-orientation=horizontal]) &, [data-group]:is([data-orientation=horizontal], [aria-orientation=horizontal]) &, .group:is([data-orientation=horizontal], [aria-orientation=horizontal]) &` | | `_groupHover` | `[role=group]:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) &, [data-group]:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) &, .group:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) &` | | `_groupIdle` | `[role=group][data-idle] &, [data-group][data-idle] &, .group[data-idle] &` | | `_groupIncomplete` | `[role=group][data-incomplete] &, [data-group][data-incomplete] &, .group[data-incomplete] &` | | `_groupInvalid` | `[role=group]:is([data-invalid], [aria-invalid=true]) &, [data-group]:is([data-invalid], [aria-invalid=true]) &, .group:is([data-invalid], [aria-invalid=true]) &` | | `_groupLoaded` | `[role=group][data-loaded] &, [data-group][data-loaded] &, .group[data-loaded] &` | | `_groupLoading` | `[role=group]:is([data-loading], [aria-busy=true]) &, [data-group]:is([data-loading], [aria-busy=true]) &, .group:is([data-loading], [aria-busy=true]) &` | | `_groupOptional` | `[role=group]:is(:optional, [data-optional]) &, [data-group]:is(:optional, [data-optional]) &, .group:is(:optional, [data-optional]) &` | | `_groupPlaceholderShown` | `[role=group]:placeholder-shown &, [data-group]:placeholder-shown &, .group:placeholder-shown &` | | `_groupPressed` | `[role=group]:is([data-pressed], [aria-pressed=true]) &, [data-group]:is([data-pressed], [aria-pressed=true]) &, .group:is([data-pressed], [aria-pressed=true]) &` | | `_groupRange` | `[role=group]:is([data-range]) &, [data-group]:is([data-range]) &, .group:is([data-range]) &` | | `_groupReadOnly` | `[role=group]:is([readonly], [data-readonly], [aria-readonly=true]) &, [data-group]:is([readonly], [data-readonly], [aria-readonly=true]) &, .group:is([readonly], [data-readonly], [aria-readonly=true]) &` | | `_groupReadWrite` | `[role=group]:is(:read-write, [data-read-write]) &, [data-group]:is(:read-write, [data-read-write]) &, .group:is(:read-write, [data-read-write]) &` | | `_groupReject` | `[role=group][data-reject] &, [data-group][data-reject] &, .group[data-reject] &` | | `_groupRequired` | `[role=group]:is(:required, [required]) &, [data-group]:is(:required, [required]) &, .group:is(:required, [required]) &` | | `_groupSelected` | `[role=group]:is([data-selected], [aria-selected=true]) &, [data-group]:is([data-selected], [aria-selected=true]) &, .group:is([data-selected], [aria-selected=true]) &` | | `_groupUserInvalid` | `[role=group]:is(:user-invalid, [data-user-invalid]) &, [data-group]:is(:user-invalid, [data-user-invalid]) &, .group:is(:user-invalid, [data-user-invalid]) &` | | `_groupValid` | `[role=group]:is(:valid, [data-valid]) &, [data-group]:is(:valid, [data-valid]) &, .group:is(:valid, [data-valid]) &` | | `_groupVertical` | `[role=group]:is([data-orientation=vertical], [aria-orientation=vertical]) &, [data-group]:is([data-orientation=vertical], [aria-orientation=vertical]) &, .group:is([data-orientation=vertical], [aria-orientation=vertical]) &` | | `_hasIcon` | `&:has(> [data-icon])` | | `_hidden` | `&:is([hidden], [data-hidden])` | | `_idle` | `&[data-idle]` | | `_incomplete` | `&[data-incomplete]` | | `_light` | `.light &:not([data-mode]), [data-mode=light] &:not([data-mode]), &[data-mode=light]` | | `_loaded` | `&[data-loaded]` | | `_loading` | `&:is([data-loading], [aria-busy=true])` | | `_ltr` | `[dir=ltr] &` | | `_nativeHidden` | `&[hidden]` | | `_never` | `&[data-never]` | | `_notAllowed` | `&[data-not-allowed]` | | `_notCurrent` | `&:not([aria-current], [data-current]), &[aria-current='false']` | | `_notFallback` | `&:not([data-fallback])` | | `_notSelected` | `&:not([data-selected]):not([aria-selected=true])` | | `_numeric` | `&[data-numeric]` | | `_peerAccept` | `&:has(~ [data-peer][data-accept]), [data-peer][data-accept] ~ &, &:has(~ .peer[data-accept]), .peer[data-accept] ~ &, &:has(~ [data-peer] *[data-accept]), [data-peer]:has(*[data-accept]) ~ &, &:has(~ .peer *[data-accept]), .peer:has(*[data-accept]) ~ &` | | `_peerActive` | `&:has(~ [data-peer]:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), [data-peer]:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) ~ &, &:has(~ .peer:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), .peer:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) ~ &, &:has(~ [data-peer] *:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), [data-peer]:has(*:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])) ~ &, &:has(~ .peer *:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), .peer:has(*:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])) ~ &` | | `_peerBlank` | `&:has(~ [data-peer]:is(:blank, [data-blank])), [data-peer]:is(:blank, [data-blank]) ~ &, &:has(~ .peer:is(:blank, [data-blank])), .peer:is(:blank, [data-blank]) ~ &, &:has(~ [data-peer] *:is(:blank, [data-blank])), [data-peer]:has(*:is(:blank, [data-blank])) ~ &, &:has(~ .peer *:is(:blank, [data-blank])), .peer:has(*:is(:blank, [data-blank])) ~ &` | | `_peerChecked` | `&:has(~ [data-peer]:is(:checked, [data-checked], [aria-checked=true])), [data-peer]:is(:checked, [data-checked], [aria-checked=true]) ~ &, &:has(~ .peer:is(:checked, [data-checked], [aria-checked=true])), .peer:is(:checked, [data-checked], [aria-checked=true]) ~ &, &:has(~ [data-peer] *:is(:checked, [data-checked], [aria-checked=true])), [data-peer]:has(*:is(:checked, [data-checked], [aria-checked=true])) ~ &, &:has(~ .peer *:is(:checked, [data-checked], [aria-checked=true])), .peer:has(*:is(:checked, [data-checked], [aria-checked=true])) ~ &` | | `_peerComplete` | `&:has(~ [data-peer][data-complete]), [data-peer][data-complete] ~ &, &:has(~ .peer[data-complete]), .peer[data-complete] ~ &, &:has(~ [data-peer] *[data-complete]), [data-peer]:has(*[data-complete]) ~ &, &:has(~ .peer *[data-complete]), .peer:has(*[data-complete]) ~ &` | | `_peerCurrent` | `&:has(~ [data-peer]:is([aria-current], [data-current]):not([aria-current='false'])), [data-peer]:is([aria-current], [data-current]):not([aria-current='false']) ~ &, &:has(~ .peer:is([aria-current], [data-current]):not([aria-current='false'])), .peer:is([aria-current], [data-current]):not([aria-current='false']) ~ &, &:has(~ [data-peer] *:is([aria-current], [data-current]):not([aria-current='false'])), [data-peer]:has(*:is([aria-current], [data-current]):not([aria-current='false'])) ~ &, &:has(~ .peer *:is([aria-current], [data-current]):not([aria-current='false'])), .peer:has(*:is([aria-current], [data-current]):not([aria-current='false'])) ~ &` | | `_peerDisabled` | `&:has(~ [data-peer]:is(:disabled, [disabled], [data-disabled])), [data-peer]:is(:disabled, [disabled], [data-disabled]) ~ &, &:has(~ .peer:is(:disabled, [disabled], [data-disabled])), .peer:is(:disabled, [disabled], [data-disabled]) ~ &, &:has(~ [data-peer] *:is(:disabled, [disabled], [data-disabled])), [data-peer]:has(*:is(:disabled, [disabled], [data-disabled])) ~ &, &:has(~ .peer *:is(:disabled, [disabled], [data-disabled])), .peer:has(*:is(:disabled, [disabled], [data-disabled])) ~ &` | | `_peerEnabled` | `&:has(~ [data-peer]:is(:enabled, [data-enabled])), [data-peer]:is(:enabled, [data-enabled]) ~ &, &:has(~ .peer:is(:enabled, [data-enabled])), .peer:is(:enabled, [data-enabled]) ~ &, &:has(~ [data-peer] *:is(:enabled, [data-enabled])), [data-peer]:has(*:is(:enabled, [data-enabled])) ~ &, &:has(~ .peer *:is(:enabled, [data-enabled])), .peer:has(*:is(:enabled, [data-enabled])) ~ &` | | `_peerExpanded` | `&:has(~ [data-peer]:is([data-expanded], [aria-expanded=true])), [data-peer]:is([data-expanded], [aria-expanded=true]) ~ &, &:has(~ .peer:is([data-expanded], [aria-expanded=true])), .peer:is([data-expanded], [aria-expanded=true]) ~ &, &:has(~ [data-peer] *:is([data-expanded], [aria-expanded=true])), [data-peer]:has(*:is([data-expanded], [aria-expanded=true])) ~ &, &:has(~ .peer *:is([data-expanded], [aria-expanded=true])), .peer:has(*:is([data-expanded], [aria-expanded=true])) ~ &` | | `_peerFocus` | `&:has(~ [data-peer]:is(:focus, [data-focus])), [data-peer]:is(:focus, [data-focus]) ~ &, &:has(~ .peer:is(:focus, [data-focus])), .peer:is(:focus, [data-focus]) ~ &, &:has(~ [data-peer] *:is(:focus, [data-focus])), [data-peer]:has(*:is(:focus, [data-focus])) ~ &, &:has(~ .peer *:is(:focus, [data-focus])), .peer:has(*:is(:focus, [data-focus])) ~ &` | | `_peerFocusVisible` | `&:has(~ [data-peer]:is(:focus-visible, [data-focus-visible])), [data-peer]:is(:focus-visible, [data-focus-visible]) ~ &, &:has(~ .peer:is(:focus-visible, [data-focus-visible])), .peer:is(:focus-visible, [data-focus-visible]) ~ &, &:has(~ [data-peer] *:is(:focus-visible, [data-focus-visible])), [data-peer]:has(*:is(:focus-visible, [data-focus-visible])) ~ &, &:has(~ .peer *:is(:focus-visible, [data-focus-visible])), .peer:has(*:is(:focus-visible, [data-focus-visible])) ~ &` | | `_peerFocusWithin` | `&:has(~ [data-peer]:not(:focus-within, [data-focus-within])), [data-peer]:not(:focus-within, [data-focus-within]) ~ &, &:has(~ .peer:not(:focus-within, [data-focus-within])), .peer:not(:focus-within, [data-focus-within]) ~ &, &:has(~ [data-peer] *:not(:focus-within, [data-focus-within])), [data-peer]:has(*:not(:focus-within, [data-focus-within])) ~ &, &:has(~ .peer *:not(:focus-within, [data-focus-within])), .peer:has(*:not(:focus-within, [data-focus-within])) ~ &` | | `_peerGrabbed` | `&:has(~ [data-peer]:is([data-grabbed], [aria-grabbed=true])), [data-peer]:is([data-grabbed], [aria-grabbed=true]) ~ &, &:has(~ .peer:is([data-grabbed], [aria-grabbed=true])), .peer:is([data-grabbed], [aria-grabbed=true]) ~ &, &:has(~ [data-peer] *:is([data-grabbed], [aria-grabbed=true])), [data-peer]:has(*:is([data-grabbed], [aria-grabbed=true])) ~ &, &:has(~ .peer *:is([data-grabbed], [aria-grabbed=true])), .peer:has(*:is([data-grabbed], [aria-grabbed=true])) ~ &` | | `_peerHorizontal` | `&:has(~ [data-peer]:is([data-orientation=horizontal], [aria-orientation=horizontal])), [data-peer]:is([data-orientation=horizontal], [aria-orientation=horizontal]) ~ &, &:has(~ .peer:is([data-orientation=horizontal], [aria-orientation=horizontal])), .peer:is([data-orientation=horizontal], [aria-orientation=horizontal]) ~ &, &:has(~ [data-peer] *:is([data-orientation=horizontal], [aria-orientation=horizontal])), [data-peer]:has(*:is([data-orientation=horizontal], [aria-orientation=horizontal])) ~ &, &:has(~ .peer *:is([data-orientation=horizontal], [aria-orientation=horizontal])), .peer:has(*:is([data-orientation=horizontal], [aria-orientation=horizontal])) ~ &` | | `_peerHover` | `&:has(~ [data-peer]:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), [data-peer]:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) ~ &, &:has(~ .peer:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), .peer:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled]) ~ &, &:has(~ [data-peer] *:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), [data-peer]:has(*:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])) ~ &, &:has(~ .peer *:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])), .peer:has(*:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])) ~ &` | | `_peerIdle` | `&:has(~ [data-peer][data-idle]), [data-peer][data-idle] ~ &, &:has(~ .peer[data-idle]), .peer[data-idle] ~ &, &:has(~ [data-peer] *[data-idle]), [data-peer]:has(*[data-idle]) ~ &, &:has(~ .peer *[data-idle]), .peer:has(*[data-idle]) ~ &` | | `_peerIncomplete` | `&:has(~ [data-peer][data-incomplete]), [data-peer][data-incomplete] ~ &, &:has(~ .peer[data-incomplete]), .peer[data-incomplete] ~ &, &:has(~ [data-peer] *[data-incomplete]), [data-peer]:has(*[data-incomplete]) ~ &, &:has(~ .peer *[data-incomplete]), .peer:has(*[data-incomplete]) ~ &` | | `_peerInvalid` | `&:has(~ [data-peer]:is([data-invalid], [aria-invalid=true])), [data-peer]:is([data-invalid], [aria-invalid=true]) ~ &, &:has(~ .peer:is([data-invalid], [aria-invalid=true])), .peer:is([data-invalid], [aria-invalid=true]) ~ &, &:has(~ [data-peer] *:is([data-invalid], [aria-invalid=true])), [data-peer]:has(*:is([data-invalid], [aria-invalid=true])) ~ &, &:has(~ .peer *:is([data-invalid], [aria-invalid=true])), .peer:has(*:is([data-invalid], [aria-invalid=true])) ~ &` | | `_peerLoaded` | `&:has(~ [data-peer][data-loaded]), [data-peer][data-loaded] ~ &, &:has(~ .peer[data-loaded]), .peer[data-loaded] ~ &, &:has(~ [data-peer] *[data-loaded]), [data-peer]:has(*[data-loaded]) ~ &, &:has(~ .peer *[data-loaded]), .peer:has(*[data-loaded]) ~ &` | | `_peerLoading` | `&:has(~ [data-peer]:is([data-loading], [aria-busy=true])), [data-peer]:is([data-loading], [aria-busy=true]) ~ &, &:has(~ .peer:is([data-loading], [aria-busy=true])), .peer:is([data-loading], [aria-busy=true]) ~ &, &:has(~ [data-peer] *:is([data-loading], [aria-busy=true])), [data-peer]:has(*:is([data-loading], [aria-busy=true])) ~ &, &:has(~ .peer *:is([data-loading], [aria-busy=true])), .peer:has(*:is([data-loading], [aria-busy=true])) ~ &` | | `_peerOptional` | `&:has(~ [data-peer]:is(:optional, [data-optional])), [data-peer]:is(:optional, [data-optional]) ~ &, &:has(~ .peer:is(:optional, [data-optional])), .peer:is(:optional, [data-optional]) ~ &, &:has(~ [data-peer] *:is(:optional, [data-optional])), [data-peer]:has(*:is(:optional, [data-optional])) ~ &, &:has(~ .peer *:is(:optional, [data-optional])), .peer:has(*:is(:optional, [data-optional])) ~ &` | | `_peerPlaceholderShown` | `&:has(~ [data-peer]:placeholder-shown), [data-peer]:placeholder-shown ~ &, &:has(~ .peer:placeholder-shown), .peer:placeholder-shown ~ &, &:has(~ [data-peer] *:placeholder-shown), [data-peer]:has(*:placeholder-shown) ~ &, &:has(~ .peer *:placeholder-shown), .peer:has(*:placeholder-shown) ~ &` | | `_peerPressed` | `&:has(~ [data-peer]:is([data-pressed], [aria-pressed=true])), [data-peer]:is([data-pressed], [aria-pressed=true]) ~ &, &:has(~ .peer:is([data-pressed], [aria-pressed=true])), .peer:is([data-pressed], [aria-pressed=true]) ~ &, &:has(~ [data-peer] *:is([data-pressed], [aria-pressed=true])), [data-peer]:has(*:is([data-pressed], [aria-pressed=true])) ~ &, &:has(~ .peer *:is([data-pressed], [aria-pressed=true])), .peer:has(*:is([data-pressed], [aria-pressed=true])) ~ &` | | `_peerRange` | `&:has(~ [data-peer]:is([data-range])), [data-peer]:is([data-range]) ~ &, &:has(~ .peer:is([data-range])), .peer:is([data-range]) ~ &, &:has(~ [data-peer] *:is([data-range])), [data-peer]:has(*:is([data-range])) ~ &, &:has(~ .peer *:is([data-range])), .peer:has(*:is([data-range])) ~ &` | | `_peerReadOnly` | `&:has(~ [data-peer]:is([readonly], [data-readonly], [aria-readonly=true])), [data-peer]:is([readonly], [data-readonly], [aria-readonly=true]) ~ &, &:has(~ .peer:is([readonly], [data-readonly], [aria-readonly=true])), .peer:is([readonly], [data-readonly], [aria-readonly=true]) ~ &, &:has(~ [data-peer] *:is([readonly], [data-readonly], [aria-readonly=true])), [data-peer]:has(*:is([readonly], [data-readonly], [aria-readonly=true])) ~ &, &:has(~ .peer *:is([readonly], [data-readonly], [aria-readonly=true])), .peer:has(*:is([readonly], [data-readonly], [aria-readonly=true])) ~ &` | | `_peerReadWrite` | `&:has(~ [data-peer]:is(:read-write, [data-read-write])), [data-peer]:is(:read-write, [data-read-write]) ~ &, &:has(~ .peer:is(:read-write, [data-read-write])), .peer:is(:read-write, [data-read-write]) ~ &, &:has(~ [data-peer] *:is(:read-write, [data-read-write])), [data-peer]:has(*:is(:read-write, [data-read-write])) ~ &, &:has(~ .peer *:is(:read-write, [data-read-write])), .peer:has(*:is(:read-write, [data-read-write])) ~ &` | | `_peerReject` | `&:has(~ [data-peer][data-reject]), [data-peer][data-reject] ~ &, &:has(~ .peer[data-reject]), .peer[data-reject] ~ &, &:has(~ [data-peer] *[data-reject]), [data-peer]:has(*[data-reject]) ~ &, &:has(~ .peer *[data-reject]), .peer:has(*[data-reject]) ~ &` | | `_peerRequired` | `&:has(~ [data-peer]:is(:required, [required])), [data-peer]:is(:required, [required]) ~ &, &:has(~ .peer:is(:required, [required])), .peer:is(:required, [required]) ~ &, &:has(~ [data-peer] *:is(:required, [required])), [data-peer]:has(*:is(:required, [required])) ~ &, &:has(~ .peer *:is(:required, [required])), .peer:has(*:is(:required, [required])) ~ &` | | `_peerSelected` | `&:has(~ [data-peer]:is([data-selected], [aria-selected=true])), [data-peer]:is([data-selected], [aria-selected=true]) ~ &, &:has(~ .peer:is([data-selected], [aria-selected=true])), .peer:is([data-selected], [aria-selected=true]) ~ &, &:has(~ [data-peer] *:is([data-selected], [aria-selected=true])), [data-peer]:has(*:is([data-selected], [aria-selected=true])) ~ &, &:has(~ .peer *:is([data-selected], [aria-selected=true])), .peer:has(*:is([data-selected], [aria-selected=true])) ~ &` | | `_peerUserInvalid` | `&:has(~ [data-peer]:is(:user-invalid, [data-user-invalid])), [data-peer]:is(:user-invalid, [data-user-invalid]) ~ &, &:has(~ .peer:is(:user-invalid, [data-user-invalid])), .peer:is(:user-invalid, [data-user-invalid]) ~ &, &:has(~ [data-peer] *:is(:user-invalid, [data-user-invalid])), [data-peer]:has(*:is(:user-invalid, [data-user-invalid])) ~ &, &:has(~ .peer *:is(:user-invalid, [data-user-invalid])), .peer:has(*:is(:user-invalid, [data-user-invalid])) ~ &` | | `_peerValid` | `&:has(~ [data-peer]:is(:valid, [data-valid])), [data-peer]:is(:valid, [data-valid]) ~ &, &:has(~ .peer:is(:valid, [data-valid])), .peer:is(:valid, [data-valid]) ~ &, &:has(~ [data-peer] *:is(:valid, [data-valid])), [data-peer]:has(*:is(:valid, [data-valid])) ~ &, &:has(~ .peer *:is(:valid, [data-valid])), .peer:has(*:is(:valid, [data-valid])) ~ &` | | `_peerVertical` | `&:has(~ [data-peer]:is([data-orientation=vertical], [aria-orientation=vertical])), [data-peer]:is([data-orientation=vertical], [aria-orientation=vertical]) ~ &, &:has(~ .peer:is([data-orientation=vertical], [aria-orientation=vertical])), .peer:is([data-orientation=vertical], [aria-orientation=vertical]) ~ &, &:has(~ [data-peer] *:is([data-orientation=vertical], [aria-orientation=vertical])), [data-peer]:has(*:is([data-orientation=vertical], [aria-orientation=vertical])) ~ &, &:has(~ .peer *:is([data-orientation=vertical], [aria-orientation=vertical])), .peer:has(*:is([data-orientation=vertical], [aria-orientation=vertical])) ~ &` | | `_pressed` | `&:is([data-pressed], [aria-pressed=true])` | | `_range` | `&:is([data-range])` | | `_reject` | `&[data-reject]` | | `_ripple` | `& .ui-ripple` | | `_rtl` | `[dir=rtl] &` | | `_selected` | `&:is([data-selected], [aria-selected=true])` | | `_start` | `&:is([data-start], [data-group-start])` | # Text Styles ## Overview Text styles are tokens that are used to reuse text styles across the project. The styles defined in the theme are [here](https://github.com/yamada-ui/yamada-ui/blob/main/packages/react/src/theme/styles/text-styles.ts). ```tsx Mono ``` ```tsx export const textStyles = defineStyles.textStyle({ ghost: { color: "colorScheme.outline", }, mono: { fontFamily: "mono", fontWeight: "medium", letterSpacing: "widest", whiteSpace: "nowrap", }, outline: { color: "colorScheme.outline", }, solid: { color: "colorScheme.contrast", }, subtle: { color: "colorScheme.fg", }, surface: { color: "colorScheme.fg", }, }) ``` ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Style Change the `styles/text-styles.ts` in the generated theme. ```tsx import { defineStyles } from "@yamada-ui/react" export const textStyles = defineStyles.textStyle({ gradient: { bgClip: "text", bgGradient: "linear(to-l, #7928CA, #FF0080)", fontSize: "5xl", w: "full", }, ghost: { color: "colorScheme.outline", }, mono: { fontFamily: "mono", fontWeight: "medium", letterSpacing: "widest", whiteSpace: "nowrap", }, outline: { color: "colorScheme.outline", }, solid: { color: "colorScheme.contrast", }, subtle: { color: "colorScheme.fg", }, surface: { color: "colorScheme.fg", }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` ### Use Text Style Set the value to `textStyle`. ```tsx ``` # Breakpoints :::tip Responsive design overview is [here](https://yamada-ui.com/docs/styling/responsive-design.md). ::: ## Overview Breakpoints are tokens used for responsive design, such as [Responsive Design](https://yamada-ui.com/docs/styling/responsive-design.md). The breakpoints defined in the theme are [here](https://github.com/yamada-ui/yamada-ui/blob/main/packages/react/src/theme/tokens/breakpoints.ts). ```tsx export const breakpoints = defineTokens.breakpoints({ sm: "30em", md: "48em", lg: "61em", xl: "80em", "2xl": "90em", }) ``` ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Token Change the `tokens/breakpoints.ts` in the generated theme. ```tsx import { defineTokens } from "@yamada-ui/react" export const breakpoints = defineTokens.breakpoints({ sm: "27em", // [!code highlight] md: "48em", lg: "61em", xl: "80em", "2xl": "90em", }) ``` ### Update the Provider Set the generated theme to the `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` ## Media Queries By default, the responsive design uses the `@media(max-width)` media query. ```tsx const config = defineConfig({ breakpoint: { direction: "up" } }) const Component: FC<{ query: string }> = ({ query }) => { const breakpoint = useBreakpoint() return ( The breakpoint when using{" "} {query} {" "} is "{breakpoint}". ) } return ( ) ``` If you want to use the `@media(min-width)` media query, set the `breakpoint.direction` to `"up"` in the config. ### Change the Config Change the `config.ts` in the generated theme. ```tsx import { defineConfig } from "@yamada-ui/react" export const config = defineConfig({ css: { varPrefix: "ui" }, breakpoint: { direction: "up", identifier: "@media screen" }, // [!code highlight] defaultColorMode: "light", defaultThemeScheme: "base", notice: { duration: 5000 }, theme: { responsive: true }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme, config } from "@workspace/theme" const App = () => { return ( ) } ``` ## Container Queries The responsive design uses the media query. If you want to use the container query, set the `breakpoint.identifier` to `"@container"` in the config. ```tsx const containerRef = useRef(null) const config = defineConfig({ breakpoint: { containerRef, identifier: "@container" }, }) const Component: FC<{ query: string }> = ({ query }) => { const breakpoint = useBreakpoint() return ( The breakpoint when using{" "} {query} {" "} is "{breakpoint}". ) } return ( ) ``` # Cascade Layers :::tip Cascade Layers overview is [here](https://yamada-ui.com/docs/styling/cascade-layers.md). ::: ## Customize ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Config Change the `config.ts` in the generated theme. ```tsx import type { LayersConfig } from "@yamada-ui/react" import { defineConfig } from "@yamada-ui/react" export const layers: LayersConfig = { tokens: { name: "tokens", order: 0 }, reset: { name: "reset", order: 1 }, global: { name: "global", order: 2 }, base: { name: "base", order: 3 }, size: { name: "size", order: 4 }, variant: { name: "variant", order: 5 }, props: { name: "props", order: 6 }, compounds: { name: "compounds", order: 7 }, } export const config = defineConfig({ css: { layers, varPrefix: "ui" }, breakpoint: { direction: "down", identifier: "@media screen" }, defaultColorMode: "dark", defaultThemeScheme: "base", notice: { duration: 5000 }, theme: { responsive: true }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme, config } from "@workspace/theme" const App = () => { return ( ) } ``` ## Disable To disable the cascade layers, set `css.layers` to `false`. ```tsx import { defineConfig } from "@yamada-ui/react" export const config = defineConfig({ css: { layers: false, varPrefix: "ui" }, // [!code highlight] breakpoint: { direction: "down", identifier: "@media screen" }, defaultColorMode: "dark", defaultThemeScheme: "base", notice: { duration: 5000 }, theme: { responsive: true }, }) ``` # CLI ## Usage :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ### Generate a Theme When you run the `theme` command, the theme will be generated at the specified path. ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` :::note If you don't specify a path, the theme will be generated in `./theme`. ::: ```bash Usage: pnpm yamada-cli theme [options] [path] generate theme to your project Arguments: path path to the theme directory Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --overwrite overwrite existing directory. (default: false) -j, --js use js instead of ts -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` ### Check the Differences When you run the `diff` command, you can check the difference between the local and remote themes. ```bash pnpm yamada-cli diff theme ``` ```bash npm yamada-cli diff theme ``` ```bash yarn yamada-cli diff theme ``` ```bash bun yamada-cli diff theme ``` ```bash Usage: pnpm yamada-cli diff [options] [component] check for updates against the registry Arguments: component component to check Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -s, --sequential run tasks sequentially. (default: false) -d, --detail show detailed changes (default: false) -h, --help display help for command ``` ### Update the theme When you run the `update` command, the theme will be updated. ```bash pnpm yamada-cli update theme ``` ```bash npm yamada-cli update theme ``` ```bash yarn yamada-cli update theme ``` ```bash bun yamada-cli update theme ``` ```bash Usage: pnpm yamada-cli update [options] [components...] update components in your project Arguments: components components to update Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -i, --install install dependencies (default: false) -s, --sequential run tasks sequentially. (default: false) -f, --format format the output files. -l, --lint lint the output files. -h, --help display help for command ``` ### Update typings When you run the `tokens` command, you can update the customized theme typings. This typings are used for [Style Props](https://yamada-ui.com/docs/styling/style-props.md). ```bash pnpm yamada-cli tokens ``` ```bash npm yamada-cli tokens ``` ```bash yarn yamada-cli tokens ``` ```bash bun yamada-cli tokens ``` :::note If you don't specify a path, the `theme.path` will be used. ::: ```bash Usage: pnpm yamada-cli tokens [options] [path] generate theme typings Arguments: path path to the theme file Options: --cwd current working directory -c, --config path to the config file (default: "ui.json") -o, --out output path -f, --format format the output file -l, --lint lint the output file -h, --help display help for command ``` # Color Mode :::tip Color Mode overview is [here](https://yamada-ui.com/docs/styling/color-mode.md). ::: ## Customize By default, the color mode is set to `"light"`. If you want to use `"dark"` or `"system"`, set the value to `config.defaultColorMode`. ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Change the Config Change the `config.ts` in the generated theme. ```tsx import { defineConfig } from "@yamada-ui/react" export const config = defineConfig({ css: { varPrefix: "ui" }, breakpoint: { direction: "down", identifier: "@media screen" }, defaultColorMode: "dark", // [!code highlight] defaultThemeScheme: "base", notice: { duration: 5000 }, theme: { responsive: true }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme, config } from "@workspace/theme" const App = () => { return ( ) } ``` # Customization ## Setup ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` ## Change the Color Scheme To change the color scheme that is applied to the entire project, change the `styles/global-style.ts`. ```tsx import { defineStyles } from "@yamada-ui/react" export const globalStyle = defineStyles.globalStyle({ "*, *::before, *::after": { borderColor: "border", borderStyle: "solid", borderWidth: "0", focusVisibleRing: "outline", fontFeatureSettings: '"cv11"', overflowWrap: "break-word", }, "*::placeholder, *[data-placeholder]": { color: "fg.subtle", }, body: { colorScheme: "blue", // [!code highlight] bg: "bg", color: "fg", fontFamily: "body", lineHeight: "moderate", overflowX: "hidden", transitionDuration: "moderate", transitionProperty: "background-color", }, }) ``` ## Add a Color Scheme To add a color scheme that is used in the project, change the `semantic-tokens/color-schemes.ts`. ```tsx import { defineSemanticTokens } from "@yamada-ui/react" export const colorSchemes = defineSemanticTokens.colorSchemes({ accent: "cyan", // [!code highlight] danger: "red", error: "red", info: "blue", link: "blue", mono: ["black", "white"], primary: ["black", "white"], secondary: "gray", success: "green", warning: "orange", }) ``` ## Change the Background Color of the Application To change the background color of the application, change the `semantic-tokens/colors.ts`. ```tsx import { defineSemanticTokens } from "@yamada-ui/react" export const colors = defineSemanticTokens.colors({ ... black: { base: "#000000", // [!code highlight] bg: "#f8f8f8", contrast: "white", emphasized: "black.200", fg: "black.800", ghost: "black.100/50", muted: "black.100", outline: "black.900", solid: "black", subtle: "black.50", }, white: { base: "#fafafa", // [!code highlight] bg: "#161616", contrast: "black", emphasized: "white.400/50", fg: "white.900", ghost: "white.200/50", muted: "white.300/50", outline: "white.800", solid: "white", subtle: "white.200/50", }, ... }) ``` # Theming ## Styles Here's a list of all the styles available in the library. - [Global Styles](https://yamada-ui.com/docs/theming/styles/global-styles.md) - [Reset Styles](https://yamada-ui.com/docs/theming/styles/reset-styles.md) - [Layer Styles](https://yamada-ui.com/docs/theming/styles/layer-styles.md) - [Text Styles](https://yamada-ui.com/docs/theming/styles/text-styles.md) ## Design Tokens Here's a list of all the design tokens available in the library. - [Animations](https://yamada-ui.com/docs/theming/tokens/animations.md) - [Aspect Ratios](https://yamada-ui.com/docs/theming/tokens/aspect-ratios.md) - [Blurs](https://yamada-ui.com/docs/theming/tokens/blurs.md) - [Borders](https://yamada-ui.com/docs/theming/tokens/borders.md) - [Breakpoints](https://yamada-ui.com/docs/theming/tokens/breakpoints.md) - [Colors](https://yamada-ui.com/docs/theming/tokens/colors.md) - [Color Schemes](https://yamada-ui.com/docs/theming/tokens/color-schemes.md) - [Durations](https://yamada-ui.com/docs/theming/tokens/durations.md) - [Easings](https://yamada-ui.com/docs/theming/tokens/easings.md) - [Font Sizes](https://yamada-ui.com/docs/theming/tokens/font-sizes.md) - [Font Weights](https://yamada-ui.com/docs/theming/tokens/font-weights.md) - [Fonts](https://yamada-ui.com/docs/theming/tokens/fonts.md) - [Gradients](https://yamada-ui.com/docs/theming/tokens/gradients.md) - [Keyframes](https://yamada-ui.com/docs/theming/tokens/keyframes.md) - [Letter Spacings](https://yamada-ui.com/docs/theming/tokens/letter-spacings.md) - [Line Heights](https://yamada-ui.com/docs/theming/tokens/line-heights.md) - [Radii](https://yamada-ui.com/docs/theming/tokens/radii.md) - [Shadows](https://yamada-ui.com/docs/theming/tokens/shadows.md) - [Sizes](https://yamada-ui.com/docs/theming/tokens/sizes.md) - [Spaces](https://yamada-ui.com/docs/theming/tokens/spaces.md) - [Z Indices](https://yamada-ui.com/docs/theming/tokens/z-indices.md) # Switching Themes ## Setup ### Generate a Theme Use the [CLI](https://yamada-ui.com/docs/theming/cli.md) to generate a theme. :::warning Before running the following commands, you need to install `@yamada-ui/cli` and execute the `init` command. For more details, please see [here](https://yamada-ui.com/docs/get-started/cli.md). ::: ```bash pnpm yamada-cli theme ``` ```bash npm yamada-cli theme ``` ```bash yarn yamada-cli theme ``` ```bash bun yamada-cli theme ``` ### Add a Theme Change the `index.ts` in the generated theme. ```tsx import { defineTheme } from "@yamada-ui/react" import { semanticTokens } from "./semantic-tokens" import { styles } from "./styles" import { tokens } from "./tokens" export { config } from "./config" export const theme = defineTheme({ styles, ...tokens, semanticTokens, themeSchemes: { blue: { semanticTokens: { colorSchemes: { primary: "blue" } } }, red: { semanticTokens: { colorSchemes: { primary: "red" } } }, green: { semanticTokens: { colorSchemes: { primary: "green" } } }, }, }) export type Theme = typeof theme ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme } from "@workspace/theme" const App = () => { return ( ) } ``` ### Add a Logic Use `useTheme` to switch themes. `useTheme` returns the `themeScheme` and `changeThemeScheme` to change the theme scheme. ```tsx const { themeScheme, changeThemeScheme } = useTheme() return ( The current scheme is "{themeScheme}" Primary Secondary Primary Secondary ) ``` ## Change the Default Theme Scheme To change the default theme scheme, set the value to `config.ts` in `defaultThemeScheme`. ### Change the Config Change the `config.ts` in the generated theme. ```tsx import { defineConfig } from "@yamada-ui/react" export const config = defineConfig({ css: { varPrefix: "ui" }, breakpoint: { direction: "down", identifier: "@media screen" }, defaultColorMode: "dark", defaultThemeScheme: "blue", // [!code highlight] notice: { duration: 5000 }, theme: { responsive: true }, }) ``` ### Update the Provider Set the generated theme to `UIProvider`. ```tsx import { UIProvider } from "@workspaces/ui" import { theme, config } from "@workspace/theme" const App = () => { return ( ) } ``` # Airy ```tsx } to={} /> ``` ## Usage ```tsx import { Airy } from "@yamada-ui/react" ``` ```tsx import { Airy } from "@/components/ui" ``` ```tsx import { Airy } from "@workspaces/ui" ``` ```tsx ``` ### Change the Duration To change the duration, set a numerical value (seconds) to `duration`. ```tsx } to={} /> ``` ### Delay If you want to delay the switch, set a numerical value (seconds) to `delay`. ```tsx } to={} /> ``` ### Disable To disable, set `disabled` to `true`. ```tsx } to={} /> ``` ### Read-Only To ready-Only, set `readOnly` to `true`. ```tsx } to={} /> ``` ### Control ```tsx const [value, onChange] = useState("to") return ( } to={} value={value} onChange={onChange} /> ) ``` ## Props | Prop | Default | Type | Description | | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `defaultValue` | `"from"` | `KeyframeIdent` | You can set the initial state. | | `delay` | `0` | `number` |  The animation delay. | | `disabled` | `false` | `boolean` | If `true`, the component is disabled. | | `duration` | `0.2` | `number` | The animation duration. | | `from` | - | `ReactNode` | Passing React elements to "from" is required. | | `onChange` | - | `(value: KeyframeIdent) => void` | This is a callback function that is called when the animation state changes. | | `readOnly` | `false` | `boolean` | If `true`, the component is readonly. | | `to` | - | `ReactNode` | Passing React elements to "to" is required. | | `value` | - | `KeyframeIdent` | Use this when you want to control the animation from outside the component. | # Collapse ```tsx const [open, { toggle }] = useBoolean() return ( クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ## Usage ```tsx import { Collapse } from "@yamada-ui/react" ``` ```tsx import { Collapse } from "@/components/ui" ``` ```tsx import { Collapse } from "@workspaces/ui" ``` ```tsx ``` ### Change the Duration To change the duration, set a number (in seconds) to `duration`. ```tsx const [open, { toggle }] = useBoolean() return ( クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ### Unmount on Exit To unmount the component when it is not visible, set `unmountOnExit` to `true`. ```tsx const [open, { toggle }] = useBoolean() return ( クリリンのことか……クリリンのことかーーーっ!!!!! 私の戦闘力は530000です。ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく…… ) ``` ### Disable Opacity Animation To disable the opacity animation, set `animationOpacity` to `false`. ```tsx const [open, { toggle }] = useBoolean() return ( クリリンのことか……クリリンのことかーーーっ!!!!! 私の戦闘力は530000です。ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく…… ) ``` ### Add a Starting Height To add a starting height, set a string or number to `startingHeight`. ```tsx const [open, { toggle }] = useBoolean() return ( 私の戦闘力は530000です。
ですがもちろんフルパワーであなたと戦う気はありませんからご心配なく……
) ``` ## Props | Prop | Default | Type | Description | | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `enter` | - | `any` | Custom `enter`. | | `exit` | - | `any` | Custom `exit`. A target to animate to when this component is removed from the tree. This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. This limitation exists because React doesn't allow components to defer unmounting until after an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. | | `initial` | - | `any` | Custom `initial`. Properties, variant label or array of variant labels to start in. Set to `false` to initialise with the values in `animate` (disabling the mount animation) | | `animationOpacity` | `true` | `boolean` | If `true`, the opacity of the content will be animated. | | `delay` | `0` | `MotionLifecycleProps \| number` | Custom `delay` definition for `enter` and `exit`. | | `duration` | `0.2` | `MotionLifecycleProps \| number` | Custom `duration` definition for `enter` and `exit`. | | `endingHeight` | `"auto"` | `number \| string` | The height you want the content in its expanded state. | | `open` | - | `boolean` | Show the component. triggers when enter or exit states. | | `startingHeight` | `0` | `number \| string` | The height you want the content in its collapsed state. | | `transition` | - | `MotionLifecycleProps` | Custom `transition` definition for `enter` and `exit`. | | `transitionEnd` | - | `MotionLifecycleProps` | Custom `transitionEnd` definition for `enter` and `exit`. | | `unmountOnExit` | - | `boolean` | If `true`, the element will unmount when `open={false}` and animation is done. | # FadeScale ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ ) ``` ## Usage ```tsx import { FadeScale } from "@yamada-ui/react" ``` ```tsx import { FadeScale } from "@/components/ui" ``` ```tsx import { FadeScale } from "@workspaces/ui" ``` ```tsx ``` ### Change the initial scale value To change the initial scale value, set a number to `scale`. The element will scale based on this value, starting from and shrinking to it. The default is `0.95`. ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ ) ``` ### Change the Duration To change the duration, set a number (in seconds) to `duration`. ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ ) ``` ### Unmount on Exit To unmount the component when it is not visible, set `unmountOnExit` to `true`. ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ 俺はたった今からデータを捨てる!そして俺は過去を凌駕する! ) ``` ## Props | Prop | Default | Type | Description | | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `enter` | - | `any` | Custom `enter`. | | `exit` | - | `any` | Custom `exit`. A target to animate to when this component is removed from the tree. This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. This limitation exists because React doesn't allow components to defer unmounting until after an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. | | `initial` | - | `any` | Custom `initial`. Properties, variant label or array of variant labels to start in. Set to `false` to initialise with the values in `animate` (disabling the mount animation) | | `delay` | `0` | `MotionLifecycleProps \| number` | Custom `delay` definition for `enter` and `exit`. | | `duration` | `0.2` | `MotionLifecycleProps \| number` | Custom `duration` definition for `enter` and `exit`. | | `open` | - | `boolean` | Show the component. triggers when enter or exit states. | | `reverse` | `true` | `boolean` | If `true`, the element will transition back to exit state. | | `scale` | `0.95` | `number` | The initial scale of the element. | | `transition` | - | `MotionLifecycleProps` | Custom `transition` definition for `enter` and `exit`. | | `transitionEnd` | - | `MotionLifecycleProps` | Custom `transitionEnd` definition for `enter` and `exit`. | | `unmountOnExit` | - | `boolean` | If `true`, the element will unmount when `open={false}` and animation is done. | # Fade ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ ) ``` ## Usage ```tsx import { Fade } from "@yamada-ui/react" ``` ```tsx import { Fade } from "@/components/ui" ``` ```tsx import { Fade } from "@workspaces/ui" ``` ```tsx ``` ### Change the Duration To change the duration, set a number (in seconds) to `duration`. ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ ) ``` ### Unmount on Exit To unmount the component when it is not visible, set `unmountOnExit` to `true`. ```tsx const [open, { toggle }] = useBoolean() return ( その打球、消えるよ 俺はたった今からデータを捨てる!そして俺は過去を凌駕する! ) ``` ## Props | Prop | Default | Type | Description | | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `enter` | - | `any` | Custom `enter`. | | `exit` | - | `any` | Custom `exit`. A target to animate to when this component is removed from the tree. This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. This limitation exists because React doesn't allow components to defer unmounting until after an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. | | `initial` | - | `any` | Custom `initial`. Properties, variant label or array of variant labels to start in. Set to `false` to initialise with the values in `animate` (disabling the mount animation) | | `delay` | `0` | `MotionLifecycleProps \| number` | Custom `delay` definition for `enter` and `exit`. | | `duration` | `0.2` | `MotionLifecycleProps \| number` | Custom `duration` definition for `enter` and `exit`. | | `open` | - | `boolean` | Show the component. triggers when enter or exit states. | | `transition` | - | `MotionLifecycleProps` | Custom `transition` definition for `enter` and `exit`. | | `transitionEnd` | - | `MotionLifecycleProps` | Custom `transitionEnd` definition for `enter` and `exit`. | | `unmountOnExit` | - | `boolean` | If `true`, the element will unmount when `open={false}` and animation is done. | # Flip ```tsx } to={} /> ``` ## Usage ```tsx import { Flip } from "@yamada-ui/react" ``` ```tsx import { Flip } from "@/components/ui" ``` ```tsx import { Flip } from "@workspaces/ui" ``` ```tsx ``` ### Change Direction To change the direction, set `orientation` to `"horizontal"` or `"vertical"`. By default, `"horizontal"` is set. ```tsx } to={} /> ``` ### Change the Duration To change the duration, set a numerical value (seconds) to `duration`. ```tsx } to={} /> ``` ### Delay If you want to delay the switch, set a numerical value (seconds) to `delay`. ```tsx } to={} /> ``` ### Disable To disable, set `disabled` to `true`. ```tsx } to={} /> ``` ### Read-Only To ready-Only, set `readOnly` to `true`. ```tsx } to={} /> ``` ### Control ```tsx const [value, onChange] = useState("from") return ( } to={} value={value} onChange={onChange} /> ) ``` ## Props | Prop | Default | Type | Description | | -------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `defaultValue` | `"from"` | `KeyframeIdent` | You can set the initial state. | | `delay` | `0` | `number` |  The animation delay. | | `disabled` | `false` | `boolean` | If `true`, the component is disabled. | | `duration` | `0.4` | `number` | The animation duration. | | `from` | - | `ReactNode` | Passing React elements to "from" is required. | | `onChange` | - | `(value: KeyframeIdent) => void` | This is a callback function that is called when the animation state changes. | | `orientation` | `"horizontal"` | `Orientation` | The orientation of the flip effect. Determines whether the flip occurs horizontally or vertically. | | `readOnly` | `false` | `boolean` | If `true`, the component is readonly. | | `to` | - | `ReactNode` | Passing React elements to "to" is required. | | `value` | - | `KeyframeIdent` | Use this when you want to control the animation from outside the component. | # Loading ```tsx ``` ## Usage ```tsx import { Loading } from "@yamada-ui/react" ``` ```tsx import { Loading } from "@/components/ui" ``` ```tsx import { Loading } from "@workspaces/ui" ``` ```tsx ``` ### Change Variant ```tsx ``` ### Change Size ```tsx ``` ## Props ### Loading.Audio | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Circles | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Dots | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Grid | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Oval | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Puff | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Rings | Prop | Default | Type | Description | | ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Loading.Suspense | Prop | Default | Type | Description | | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `loadingProps` | - | `LoadingProps` | The loading props. | | `loadingScheme` | - | `LoadingScheme` | The loading scheme. | # Motion ```tsx
``` ## Usage ```tsx import { Motion } from "@yamada-ui/react" ``` ```tsx import { Motion } from "@/components/ui" ``` ```tsx import { Motion } from "@workspaces/ui" ``` :::note `Motion` uses [Motion](https://motion.dev) internally. If you want to know more about the component's features, please refer to [this](https://motion.dev/docs/react-motion-component). ::: - `initial`: The initial state of the component. - `animate`: The animation executed when the component is mounted or updated. - `exit`: The animation executed when the component is unmounted. - `transition`: The object that sets the duration and delay. :::note The style object used in `initial`・`animate`・`exit` is not a [Style Props](https://yamada-ui.com/docs/styling/style-props.md) of Yamada UI. Please refer to the [Motion](https://motion.dev) documentation for the properties of the style object. ::: :::warning To enable the animation of `exit`, the component must be a child element of [AnimatePresence](https://motion.dev/docs/react-animate-presence). ::: ### Variants Variants are useful for implementing dynamic animations. You can also orchestrate animations. ```tsx const [visible, { toggle }] = useBoolean() return ( Look at me! ) ``` :::note Variants' animation to know more about the animation of variants, please refer to [this](https://motion.dev/docs/react-animation#variants). ::: ### Use AnimatePresence In React, when a component is unmounted, the animation is not maintained. By using [AnimatePresence](https://motion.dev/docs/react-animate-presence), the component is not unmounted until the animation ends. ```tsx const [visible, { toggle }] = useBoolean() return (
{visible ? ( Enabled "AnimatePresence" ) : null} {visible ? ( Disabled "AnimatePresence" ) : null}
) ``` ### Keyframes By setting the value to an array, you can set the keyframes. Each frame is processed at equal intervals. You can override this by setting an array of intervals to `transition`'s `times`. ```tsx
``` ### Gestures [Hover](#hover)・[Click/Tap](#clicktap)・[Focus](#focus) to detect and execute animations. #### Hover - `whileHover`: The animation executed when the pointer is moved over the component. - `onHoverStart`: The callback function executed when the pointer is moved over the component. - `onHoverEnd`: The callback function executed when the pointer is moved away from the component. ```tsx console.log("Hover starts")} onHoverEnd={(ev) => console.log("Hover ends")} > Hover me! ``` :::note Hover's animation to know more about the animation of hover, please refer to [this](https://motion.dev/docs/react-hover-animation). ::: #### Click/Tap - `whileTap`: The animation executed when the pointer is clicked or tapped on the component. - `onTapStart`: The callback function executed when the pointer starts pressing the component. - `onTap`: The callback function executed when the pointer is released inside the component. - `onTapCancel`: The callback function executed when the pointer is released outside the component. ```tsx console.log("Tap starts")} onTap={(ev) => console.log("Tap")} onTapCancel={(ev) => console.log("Tap cancels")} > Click and Tap me! ``` :::note Click/Tap's animation to know more about the animation of click/tap, please refer to [this](https://motion.dev/docs/react-gestures#tap). ::: #### Focus - `whileFocus`: The animation executed when the component is focused. ```tsx Focus me! ``` :::note Focus's animation to know more about the animation of focus, please refer to [this](https://motion.dev/docs/react-gestures#focus). ::: ### Drag To enable the dragging of the component, set `drag` to `true`. Or set `"x"` or `"y"` to follow only the x-axis or y-axis. - `whileDrag`: The animation executed when the component is dragged. - `onDrag`: The callback function executed when the component is dragged. - `onDragStart`: The callback function executed when the component starts dragging. - `onDragEnd`: The callback function executed when the component ends dragging. ```tsx
{(drag) => ( console.log("Drag", "x:", point.x, "y:", point.y) } onDragStart={(ev, { point }) => console.log("Drag starts", "x:", point.x, "y:", point.y) } onDragEnd={(ev, { point }) => console.log("Drag ends", "x:", point.x, "y:", point.y) } > {drag === true ? "Drag me!" : drag === "x" ? "Only X" : "Only Y"} )}
``` :::note Drag's animation to know more about the animation of drag, please refer to [this](https://motion.dev/docs/react-drag). ::: #### Limit the possible area To limit the possible area, set the value (pixels) to `top`・`bottom`・`left`・`right` of `dragConstraints`. ```tsx
Only Right & Bottom
``` Or, you can limit the possible area by setting `ref`. ```tsx const ref = useRef(null) return (
Drag me!
) ``` #### Set elasticity To set elasticity, set the object with the value (pixels) set to `top`・`bottom`・`left`・`right` of `dragElastic` to `true` or a number. ```tsx const ref = useRef(null) return (
Drag me!
) ``` #### Set momentum To set momentum, set the boolean value to `dragMomentum`. ```tsx const ref = useRef(null) return (
Drag me!
) ``` #### Limit the direction To limit the direction, set `dragDirectionLock` to `true`. ```tsx preview functional client const [direction, setDirection] = useState<"x" | "y" | null>(null) return (
setDirection(direction)} onDragEnd={() => setDirection(null)} > Drag me!
) ``` ### Scroll - `whileInView`: The animation executed when the component is in the viewport. - `viewport`: The object that sets the detection method of the viewport. - `once`: If `true`, the animation is executed when the component enters the viewport for the first time. - `root`: If you set the scrollable element (`ref`), the element is used as the viewport instead of `window`. - `margin`: The margin to add to the viewport. - `amount`: `"some"`・`"all"`・number to set the height of the element that needs to intersect with the viewport. - `onViewportEnter`: The callback function executed when the component enters the viewport. - `onViewportLeave`: The callback function executed when the component leaves the viewport. ```tsx const ref = useRef(null) return ( Scroll me!
{(once) => ( console.log("Scroll entires", entry)} onViewportLeave={(entry) => console.log("Scroll leaves", entry)} > {once ? "Once me!" : "You found me!"} )}
) ``` ## Configuration To set the common settings for `Motion` throughout the project, use [MotionConfig](https://motion.dev/docs/react-motion-config). ```tsx import { MotionConfig } from "motion/react" import { UIProvider } from "@yamada-ui/react" const App = () => { return ( ) } ``` # Ripple ```tsx const { onClick, ...rippleProps } = useRipple() return (
Button
) ``` :::warning You need to set `position: relative` and `overflow: hidden` on the parent element of `Ripple`. ::: ## Usage ```tsx import { Ripple, useRipple } from "@yamada-ui/react" ``` ```tsx import { Ripple, useRipple } from "@/components/ui" ``` ```tsx import { Ripple, useRipple } from "@workspaces/ui" ``` ```tsx ``` ### Change the Color To change the color, set a color to `color`. By default, `currentColor` is set. ```tsx const { onClick, ...rippleProps } = useRipple() return (
Button
) ``` ### Disable Ripple To disable, set `disabled` to `true`. ```tsx const { onClick, ...rippleProps } = useRipple({ disabled: true }) return (
Button
) ``` Alternatively, you can disable it by setting `disabled` to `true` on `Ripple`. ```tsx const { onClick, ...rippleProps } = useRipple() return (
Button
) ``` ## Props | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | `as` | - | `DOMElement` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `onClear` | - | `(key: Key) => void` | The callback invoked when a ripple is cleared. | | `ripples` | - | `RippleOptions[]` | The ripples to use. | | `disabled` | `false` | `boolean` | If `true`, disable ripple effects when pressing a element. | # Rotate ```tsx } to={} /> ``` ## Usage ```tsx import { Rotate } from "@yamada-ui/react" ``` ```tsx import { Rotate } from "@/components/ui" ``` ```tsx import { Rotate } from "@workspaces/ui" ``` ```tsx ``` ### Change Rotate To change the rotate, set `rotate` to a numerical value. By default, `45` is set. ```tsx } to={} /> ``` ### Change Duration To change the duration, set a numerical value (seconds) to `duration`. ```tsx } to={} /> ``` ### Delay If you want to delay the switch, set a numerical value (seconds) to `delay`. ```tsx } to={} /> ``` ### Disable To disable, set `disabled` to `true`. ```tsx } to={} /> ``` ### Read-Only To ready-Only, set `readOnly` to `true`. ```tsx } to={} /> ``` ### Control ```tsx const [value, onChange] = useState("from") return ( } to={} value={value} onChange={onChange} /> ) ``` ## Props | Prop | Default | Type | Description | | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `defaultValue` | `"from"` | `KeyframeIdent` | You can set the initial state. | | `delay` | `0` | `number` |  The animation delay. | | `disabled` | `false` | `boolean` | If `true`, the component is disabled. | | `duration` | `0.4` | `number` | The animation duration. | | `from` | - | `ReactNode` | Passing React elements to "from" is required. | | `onChange` | - | `(value: KeyframeIdent) => void` | This is a callback function that is called when the animation state changes. | | `readOnly` | `false` | `boolean` | If `true`, the component is readonly. | | `rotate` | `45` | `number` | The animation rotation. | | `to` | - | `ReactNode` | Passing React elements to "to" is required. | | `value` | - | `KeyframeIdent` | Use this when you want to control the animation from outside the component. | # Skeleton ```tsx ``` ## Usage ```tsx import { Skeleton, SkeletonCircle, SkeletonText } from "@yamada-ui/react" ``` ```tsx import { Skeleton, SkeletonCircle, SkeletonText } from "@/components/ui" ``` ```tsx import { Skeleton, SkeletonCircle, SkeletonText } from "@workspaces/ui" ``` ```tsx ``` ### Change Variant ```tsx {(variant) => ( )} ``` ### Change Size ```tsx ``` Additionally, by passing child elements, you can match the width and height. ```tsx Badge Badge ``` ### Change Blink Color To change the blink color, use the `startColor` and `endColor` properties. ```tsx ``` ### Change Text Gap To change the gap between text lines, set the `gap` property. ```tsx ``` ### Specify Number of Lines To specify the number of lines, set a numeric value to `lineClamp`. ```tsx ``` ### Change Blink Duration To change the blink duration, set a numeric value (seconds) to `duration`. ```tsx ``` ### Display Child Elements To display child elements, pass `false` to `loading`. ```tsx const { loading } = useAsync(() => wait(3000)) return ( プリン つぶらな 瞳が 揺れるとき 眠たくなるような 不思議で 気持ちの良い 歌を 歌う。 ) ``` ### Change Fade In Duration To change the fade in duration, set a numeric value (seconds) to `fadeDuration`. ```tsx const { loading } = useAsync(() => wait(3000)) return ( プリン つぶらな 瞳が 揺れるとき 眠たくなるような 不思議で 気持ちの良い 歌を 歌う。 ) ``` ## Props ### Skeleton | Prop | Default | Type | Description | | -------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `variant` | `"pulse"` | `"none" \| "pulse" \| "shine"` | The variant of the component. | | `duration` | - | `number \| string` | The animation duration in seconds. | | `endColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The color at the animation end. | | `fadeDuration` | - | `number \| string` | The fade in duration in seconds. Requires `loaded` toggled to `true` in order to see the transition. | | `fitContent` | `false` | `boolean` | If `true`, the skeleton will take the width of it's children. | | `loading` | `true` | `boolean` | If `false`, it'll render its children with a nice fade transition. | | `startColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The color at the animation start. | ### SkeletonCircle | Prop | Default | Type | Description | | -------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `variant` | - | `"none" \| "pulse" \| "shine"` | The variant of the component. | | `duration` | - | `number \| string` | The animation duration in seconds. | | `endColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The color at the animation end. | | `fadeDuration` | - | `number \| string` | The fade in duration in seconds. Requires `loaded` toggled to `true` in order to see the transition. | | `fitContent` | `false` | `boolean` | If `true`, the skeleton will take the width of it's children. | | `loading` | `true` | `boolean` | If `false`, it'll render its children with a nice fade transition. | | `startColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The color at the animation start. | ### SkeletonText | Prop | Default | Type | Description | | -------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `variant` | - | `"none" \| "pulse" \| "shine"` | The variant of the component. | | `duration` | - | `string \| number` | The animation duration in seconds. | | `endColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The color at the animation end. | | `fadeDuration` | - | `string \| number` | The fade in duration in seconds. Requires `loaded` toggled to `true` in order to see the transition. | | `fitContent` | `false` | `boolean` | If `true`, the skeleton will take the width of it's children. | | `lineClamp` | - | `number` | The number of lines to display. | | `loading` | `true` | `boolean` | If `false`, it'll render its children with a nice fade transition. | | `rootProps` | - | `HTMLStyledProps` | Props for the root element. | | `startColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The color at the animation start. | # SlideFade ```tsx const [open, { toggle }] = useBoolean() return ( クラスは最低じゃないぞ!メンバーが最低なだけだ! ) ``` ## Usage ```tsx import { SlideFade } from "@yamada-ui/react" ``` ```tsx import { SlideFade } from "@/components/ui" ``` ```tsx import { SlideFade } from "@workspaces/ui" ``` ```tsx ``` ### Change the Duration To change the duration, set a number (in seconds) to `duration`. ```tsx const [open, { toggle }] = useBoolean() return ( 確かにアイツは勉強ができない。でもな、学力が低いからといって、全てが決まるわけじゃないだろう? ) ``` ### Change the Position To change the position, specify a string or number for `offsetX` or `offsetY`. ```tsx const [open, { toggle }] = useBoolean() return ( ……私、このクラスの皆が好きなんです。人の為に一生懸命な皆のいる、Fクラスが ……女は胸じゃないのに。アキの、バカ…… ) ``` ### Unmount on Exit To unmount the component when it is not visible, set `unmountOnExit` to `true`. ```tsx const [open, { toggle }] = useBoolean() return ( 考えすぎではないかのぅ。メイド服くらい人間一度は着るものじゃ ) ``` ### Delay To delay the animation, set a number (in seconds) to `delay`. ```tsx const [open, { toggle }] = useBoolean() return ( たとえ許されない行為であろうとも自分の気持ちは偽れない。正直に言おう、今僕は…純粋に欲望のために女子風呂を覗きたいッ!! ) ``` ## Props | Prop | Default | Type | Description | | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `enter` | - | `any` | Custom `enter`. | | `exit` | - | `any` | Custom `exit`. A target to animate to when this component is removed from the tree. This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. This limitation exists because React doesn't allow components to defer unmounting until after an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. | | `initial` | - | `any` | Custom `initial`. Properties, variant label or array of variant labels to start in. Set to `false` to initialise with the values in `animate` (disabling the mount animation) | | `delay` | `0` | `MotionLifecycleProps \| number` | Custom `delay` definition for `enter` and `exit`. | | `duration` | `0.2` | `MotionLifecycleProps \| number` | Custom `duration` definition for `enter` and `exit`. | | `offsetX` | `0` | `number \| string` | The offset on the horizontal or `x` axis. | | `offsetY` | `8` | `number \| string` | The offset on the vertical or `y` axis. | | `open` | - | `boolean` | Show the component. triggers when enter or exit states. | | `reverse` | `true` | `boolean` | If `true`, the element will be transitioned back to the offset when it leaves. Otherwise, it'll only fade out. | | `transition` | - | `MotionLifecycleProps` | Custom `transition` definition for `enter` and `exit`. | | `transitionEnd` | - | `MotionLifecycleProps` | Custom `transitionEnd` definition for `enter` and `exit`. | | `unmountOnExit` | - | `boolean` | If `true`, the element will unmount when `open={false}` and animation is done. | # Slide ```tsx const [open, { toggle }] = useBoolean() return ( <> クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ## Usage ```tsx import { Slide } from "@yamada-ui/react" ``` ```tsx import { Slide } from "@/components/ui" ``` ```tsx import { Slide } from "@workspaces/ui" ``` ```tsx ``` ### Change Placement To change the placement, set `placement` to `"block-start"`, `"block-end"`, `"inline-start"`, or `"inline-end"`. Default is `"inline-end"`. ```tsx const placements = ["block-start", "block-end", "inline-start", "inline-end"] const [placement, setPlacement] = useState("inline-end") const [open, { toggle }] = useBoolean() return ( {placements.map((value) => ( ))} クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ### Change Duration To change the duration, set a number (in seconds) to `duration`. Default is `{ enter: 0.4, exit: 0.3 }`. ```tsx const [open, { toggle }] = useBoolean() return ( <> クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ### Unmount on Exit To unmount the component when it is not visible, set `unmountOnExit` to `true`. ```tsx const [open, { toggle }] = useBoolean() return ( <> クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ### Delay If you want to delay the switch, set a numerical value (seconds) to `delay`. ```tsx const [open, { toggle }] = useBoolean() return ( <> クリリンのことか……クリリンのことかーーーっ!!!!! ) ``` ## Props | Prop | Default | Type | Description | | --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `as` | - | `keyof IntrinsicElements` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `enter` | - | `any` | Custom `enter`. | | `exit` | - | `any` | Custom `exit`. A target to animate to when this component is removed from the tree. This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. This limitation exists because React doesn't allow components to defer unmounting until after an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. | | `initial` | - | `any` | Custom `initial`. Properties, variant label or array of variant labels to start in. Set to `false` to initialise with the values in `animate` (disabling the mount animation) | | `delay` | `0` | `MotionLifecycleProps \| number` | Custom `delay` definition for `enter` and `exit`. | | `duration` | `0.2` | `MotionLifecycleProps \| number` | Custom `duration` definition for `enter` and `exit`. | | `open` | - | `boolean` | Show the component. triggers when enter or exit states. | | `placement` | `"inline-end"` | `"block-end" \| "block-start" \| "inline-end" \| "inline-start" ...` | The placement of the slide. | | `transition` | - | `MotionLifecycleProps` | Custom `transition` definition for `enter` and `exit`. | | `transitionEnd` | - | `MotionLifecycleProps` | Custom `transitionEnd` definition for `enter` and `exit`. | | `unmountOnExit` | - | `boolean` | If `true`, the element will unmount when `open={false}` and animation is done. | # AreaChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # BarChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # DonutChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # LineChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # PieChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # RadarChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # RadialChart Currently, this component is not migrated. This component will be migrated in v2.0.x. # Accordion ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ## Usage ```tsx import { Accordion } from "@yamada-ui/react" ``` ```tsx import { Accordion } from "@/components/ui" ``` ```tsx import { Accordion } from "@workspaces/ui" ``` ```tsx ``` ### Use items ```tsx const items = useMemo( () => [ { button: "孫悟空少年編", children: "地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。", }, { button: "ピッコロ大魔王編", children: "天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。", }, { button: "サイヤ人編", children: "ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。", }, ], [], ) return ``` ### Change Variant ```tsx {(variant, index) => ( 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 )} ``` ### Set a Specific Item to be Expanded by Default To have a specific item expanded by default, set the item's `index` to `defaultIndex`. ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Expand Multiple Items To expand multiple items, set `multiple` to `true`. ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Enable Toggling To enable toggling, set `toggle` to `true`. ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Hide Icon To hide the icon, set `iconHidden` to `true`. ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Disable an Item To disable a specific item, set `disabled`. ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Customize Icon ```tsx }> 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` If you want to switch icons based on the expansion and collapse state of an item, control it with `expanded` provided by `icon`. ```tsx (!expanded ? : )} > 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Customize Label ```tsx 孫悟空少年編 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 ピッコロ大魔王編 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 サイヤ人編 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Customize Panel ```tsx 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ``` ### Control ```tsx const [index, onChange] = useState( undefined, ) return ( 地球の人里離れた山奥に住む尻尾の生えた少年・孫悟空はある日、西の都からやって来た少女・ブルマと出会う。そこで、7つ集めると神龍(シェンロン)が現れ、どんな願いでも一つだけ叶えてくれるというドラゴンボールの存在を、さらに育ての親である孫悟飯の形見として大切に持っていた球がその1つ「四星球(スーシンチュウ)」であることを知り、ブルマと共に残りのドラゴンボールを探す旅に出る。 天下一武道会終了後、ピラフ一味によって復活したピッコロ大魔王によって、クリリンや亀仙人など悟空の仲間たちや多くの武道家たちが殺される。悟空は仇を討つため、道中に出会ったヤジロベーや仙猫カリンの協力を得て命を賭して潜在する力を引き出し、ピッコロ大魔王に闘いを挑み勝利する。闘いの後、悟空はピッコロ大魔王に殺された神龍や仲間たちの復活のため天界へ向かい、ドラゴンボールの創造者である神に会う。そこで神龍復活の条件として、神の下で天界で修行することとなった。 ピッコロ(マジュニア)との闘いから約5年後、息子の孫悟飯を儲けて平和な日々を過ごしていた悟空のもとに、実兄・ラディッツが宇宙より来襲し、自分が惑星ベジータの戦闘民族・サイヤ人であることを知らされる。さらわれた孫悟飯を助けるため悟空は宿敵ピッコロと手を組み、自らの命と引き換えにラディッツを倒すが、約1年後にはさらに強力なサイヤ人たちがドラゴンボールを求めて地球に来襲することを知る。 ) ``` ## Props ### Accordion.Root | Prop | Default | Type | Description | | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `variant` | `"plain"` | `"panel" \| "plain"` | The variant of the component. | | `defaultIndex` | - | `number \| number[]` | The initial index(es) of the accordion item to expand. | | `icon` | - | `ReactNodeOrFunction` | The accordion icon for all items to use. | | `iconHidden` | `false` | `boolean` | If `true`, hide the accordion icon for all items. | | `index` | - | `number \| number[]` | The index(es) of the accordion item to expand. | | `items` | - | `Omit[]` | If provided, generate elements based on items. | | `multiple` | `false` | `boolean` | If `true`, multiple accordion items can be expanded at once. | | `onChange` | - | `(index: number \| number[]) => void` | The callback invoked when accordion items are expanded or collapsed. | | `toggle` | `false` | `boolean` | If `true`, any expanded accordion item can be collapsed again. | ### Accordion.Button | Prop | Default | Type | Description | | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `containerProps` | - | `HTMLStyledProps` | Props the container element. | | `icon` | - | `ReactNodeOrFunction<{ disabled?: boolean; expanded?: boolean }>` | The accordion icon to use. | ### Accordion.Item | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `index` | - | `number` | The index of the accordion item. | | `button` | - | `ReactNodeOrFunction` | The accordion button to use. | | `children` | - | `ReactNodeOrFunction` | The accordion children to use. | | `disabled` | `false` | `boolean` | If `true`, the accordion item will be disabled. | | `icon` | - | `ReactNodeOrFunction` | The accordion icon to use. | ### Accordion.Panel | Prop | Default | Type | Description | | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `enter` | - | `any` | Custom `enter`. | | `exit` | - | `any` | Custom `exit`. A target to animate to when this component is removed from the tree. This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. This limitation exists because React doesn't allow components to defer unmounting until after an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. | | `initial` | - | `any` | Custom `initial`. Properties, variant label or array of variant labels to start in. Set to `false` to initialise with the values in `animate` (disabling the mount animation) | | `animationOpacity` | `true` | `boolean` | If `true`, the opacity of the content will be animated. | | `delay` | `0` | `number \| MotionLifecycleProps` | Custom `delay` definition for `enter` and `exit`. | | `duration` | `0.2` | `number \| MotionLifecycleProps` | Custom `duration` definition for `enter` and `exit`. | | `endingHeight` | `"auto"` | `string \| number` | The height you want the content in its expanded state. | | `open` | - | `boolean` | Show the component. triggers when enter or exit states. | | `startingHeight` | `0` | `string \| number` | The height you want the content in its collapsed state. | | `transition` | - | `MotionLifecycleProps` | Custom `transition` definition for `enter` and `exit`. | | `transitionEnd` | - | `MotionLifecycleProps` | Custom `transitionEnd` definition for `enter` and `exit`. | | `unmountOnExit` | - | `boolean` | If `true`, the element will unmount when `open={false}` and animation is done. | ## Accessibility `Accordion` follows the [WAI-ARIA - Accordion Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/) for accessibility. ### Keyboard Navigation | Key | Description | State | | ---------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | | `Tab` | Focuses the first item when focus moves to the accordion. Focuses the next item if already within the accordion. | - | | `Shift` + `Tab` | Focuses the previous item that is not disabled. | - | | `ArrowUp` | Focuses the previous item that is not disabled. If it's the first item, focuses the last item that is not disabled. | - | | `ArrowDown` | Focuses the next item that is not disabled. If it's the last item, focuses the first item that is not disabled. | - | | `Space`, `Enter` | Expands the panel of the focused item. | - | | | Expands the panel of the focused item and collapses it if it is already expanded. | `multiple={true}`, `toggle={true}` | | `Home` | Focuses the first item that is not disabled. | - | | `End` | Focuses the last item that is not disabled. | - | ### ARIA Roles and Attributes | Component | Role and Attributes | Usage | | ------------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Accordion.Button` | `aria-disabled="true"` | Sets to `"true"` when the panel of the item is expanded. However, if `Accordion.Root` is set with `multiple={true}` or `toggle={true}` and `Accordion.Item` is not disabled, it does not become `"true"` as it can be collapsed. | | | `id` | Used to associate with `Accordion.Panel`. | | | `aria-controls` | Sets the `id` of the associated `Accordion.Panel`. | | | `aria-expanded` | Sets to `"true"` when the panel of the item is expanded, and `"false"` when it is collapsed. | | `Accordion.Panel` | `role="region"` | Indicates that it is a landmark region. | | | `id` | Used to associate with `Accordion.Button`. | | | `aria-labelledby` | Sets the `id` of the associated `Accordion.Button`. | # ActionBar Please post your thoughts on this GitHub [issue](https://github.com/yamada-ui/yamada-ui/issues/3212) to help us prioritize its development. # Alert ```tsx セル か…完全体に………完全体になれさえすれば………!!! ``` ## Usage ```tsx import { Alert } from "@yamada-ui/react" ``` ```tsx import { Alert } from "@/components/ui" ``` ```tsx import { Alert } from "@workspaces/ui" ``` ```tsx ``` ### Change Status ```tsx {(status, index) => ( セル か…完全体に………完全体になれさえすれば………!!! )} ``` ### Change Variant ```tsx {(variant, index) => ( {variant !== "island" && } セル か…完全体に………完全体になれさえすれば………!!! )} ``` ### Change Color Scheme ```tsx {(row, index) => ( セル か…完全体に………完全体になれさえすれば………!!! )} ``` ### Change Loading Scheme ```tsx {(row, index) => ( セル か…完全体に………完全体になれさえすれば………!!! )} ``` ### Customize Layout ```tsx セル か…完全体に………完全体になれさえすれば………!!! セル か…完全体に………完全体になれさえすれば………!!! ``` ## Props ### Alert.Root | Prop | Default | Type | Description | | ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `variant` | `"plain"` | `"island" \| "plain" \| "solid" \| "subtle" \| "surface" ...` | The variant of the component. | | `status` | `"info"` | `StatusScheme` | The status of the alert. | ### Alert.Description | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | ### Alert.Icon | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | ### Alert.Loading | Prop | Default | Type | Description | | ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `duration` | - | `IconProps["dur"]` | The CSS `dur` property. | | `loadingScheme` | `"oval"` | `Loading.Scheme` | The loading scheme. | | `secondaryColor` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The CSS `color` property. | ### Alert.Title | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | ## Accessibility `Alert` follows the [WAI-ARIA - Alert Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/alert/) for accessibility. ### ARIA Roles and Attributes | Component | Role and Attributes | Usage | | ------------ | ------------------- | ------------------------------ | | `Alert.Root` | `role="alert"` | Indicates that it is an alert. | # AlphaSlider ```tsx ``` ## Usage ```tsx import { AlphaSlider } from "@yamada-ui/react" ``` ```tsx import { AlphaSlider } from "@/components/ui" ``` ```tsx import { AlphaSlider } from "@workspaces/ui" ``` ```tsx ``` ### Change Size ```tsx {(size, index) => ( )} ``` ### Set Default Value To set a default value, set a value to `defaultValue`. ```tsx ``` ### Set Minimum and Maximum Values To set minimum and maximum values, set numbers to `min` or `max`. ```tsx ``` ### Change Orientation To change the orientation, set `orientation` to `"vertical"` or `"horizontal"`. The default is `"vertical"`. ```tsx ``` ### Change Shape ```tsx {(shape, index) => ( )} ``` ### Set Step Value To set the step value, set a value to `step`. ```tsx ``` ### Disable To disable, set `disabled` to `true`. ```tsx ``` ### Read-Only To make read-only, set `readOnly` to `true`. ```tsx ``` ### Display Tooltip ```tsx const [value, setValue] = useState(0.5) return ( ) ``` ### Handle Start and End Change Events To handle start and end change events, use `onChangeStart` and `onChangeEnd`. ```tsx const [value, onChange] = useState(0.5) const [startValue, onChangeStart] = useState(0.5) const [endValue, onChangeEnd] = useState(0.5) return ( Value: {value}, Start Value: {startValue}, End Value: {endValue} ) ``` ### Control ```tsx const [value, setValue] = useState(0.5) return ``` ## Props ### AlphaSlider.Root | Prop | Default | Type | Description | | ------------------ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `size` | - | `"lg" \| "md" \| "sm" \| "xl" \| "xs"` | The size of the component. | | `variant` | - | `"outline" \| "solid"` | The variant of the component. | | `color` | - | `string` | The color used for the slider. | | `defaultValue` | - | `number` | The initial value of the slider. | | `disabled` | `false` | `boolean` | If `true`, the field will be disabled. | | `getAriaValueText` | - | `(value: number, index: number) => string \| undefined` | This is used to format the value so that screen readers can speak out a more human-friendly value. It is used to set the `aria-valuetext` property of the input. | | `indicatorFill` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The fill color of the indicator. | | `indicatorRounded` | - | `"-moz-initial" \| "2xl" \| "2xs" \| "3xl" \| "4xl" \| "full" \| "inherit" \| "initial" \| "l1" \| "l2" ...` | The rounded of the indicator. | | `inputProps` | - | `SliderInputProps` | Props for the input element. | | `invalid` | `false` | `boolean` | If `true`, the field will be invalid. | | `max` | `1` | `number` | The maximum allowed value of the slider. Cannot be less than min. | | `min` | `0` | `number` | The minimum allowed value of the slider. Cannot be greater than max. | | `name` | - | `string` | The name attribute of the hidden `input` field. This is particularly useful in forms. | | `onChange` | - | `(value: number) => void` | Function called whenever the slider value changes. | | `onChangeEnd` | - | `(value: number) => void` | Function called when the user is done selecting a new value. | | `onChangeStart` | - | `(value: number) => void` | Function called when the user starts selecting a new value. | | `orientation` | `"horizontal"` | `"horizontal" \| "vertical"` | The orientation of the slider. | | `overlayProps` | - | `AlphaSliderOverlayProps` | Props for the overlay element. | | `readOnly` | `false` | `boolean` | If `true`, the field will be readonly. | | `required` | `false` | `boolean` | If `true`, the field will be required. | | `shape` | `"circle"` | `"circle" \| "rounded" \| "square"` | The shape of the thumb. | | `step` | `0.01` | `number` | The step in which increments or decrements have to be made. | | `thumbProps` | - | `AlphaSliderThumbProps` | Props for the thumb element. | | `thumbRounded` | - | `"-moz-initial" \| "2xl" \| "2xs" \| "3xl" \| "4xl" \| "full" \| "inherit" \| "initial" \| "l1" \| "l2" ...` | The rounded of the thumb. | | `thumbSize` | - | `"-moz-fit-content" \| "-moz-initial" \| "-moz-max-content" \| "-moz-min-content" \| "-webkit-fit-content" \| "-webkit-max-content" \| "0.5" \| "1.5" \| "1" \| "1/12" ...` | The size of the thumb. | | `thumbStroke` | - | `"-moz-initial" \| "ActiveBorder" \| "ActiveCaption" \| "aliceblue" \| "amber.100" \| "amber.200" \| "amber.300" \| "amber.400" \| "amber.50" \| "amber.500" ...` | The stroke color of the thumb. | | `trackProps` | - | `AlphaSliderTrackProps` | Props for the track element. | | `trackRounded` | - | `"-moz-initial" \| "2xl" \| "2xs" \| "3xl" \| "4xl" \| "full" \| "inherit" \| "initial" \| "l1" \| "l2" ...` | The rounded of the track. | | `trackSize` | - | `"-moz-fit-content" \| "-moz-initial" \| "-moz-max-content" \| "-moz-min-content" \| "-webkit-fit-content" \| "-webkit-max-content" \| "0.5" \| "1.5" \| "1" \| "1/12" ...` | The size of the track. | | `value` | - | `number` | The value of the slider. | ### AlphaSlider.Overlay | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `layers` | - | `HTMLStyledProps[]` | The layers used for the overlay element. | ### AlphaSlider.Thumb | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | | `index` | - | `number` | The index of the thumb. | ### AlphaSlider.Track | Prop | Default | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `as` | - | `As` | The HTML element to render. | | `asChild` | - | `boolean` | Merges its props onto its immediate child. | | `css` | - | `CSSObject \| CSSObject[]` | The CSS object. | | `colorScheme` | - | `"amber" \| "black" \| "blackAlpha" \| "blue" \| "cyan" \| "danger" \| "emerald" \| "error" \| "flashy" \| "fuchsia" ...` | Set color scheme variables. | ## Accessibility Currently, this section is being updated due to the migration of v2. # AspectRatio ```tsx シン・ゴジラ ``` ## Usage ```tsx import { AspectRatio } from "@yamada-ui/react" ``` ```tsx import { AspectRatio } from "@/components/ui" ``` ```tsx import { AspectRatio } from "@workspaces/ui" ``` ```tsx ``` ### Using iframe ```tsx