Group
Group is a component that groups and attaches multiple elements together.
<Group>
<Button>Button</Button>
<Button>Button</Button>
<Button>Button</Button>
</Group>
Usage
import { Group } from "@yamada-ui/react"
import { Group } from "@/components/ui"
import { Group } from "@workspaces/ui"
<Group />
Change the Orientation
To change the orientation, set orientation to either "vertical" or "horizontal". The default is "horizontal".
<VStack alignItems="flex-start">
<Group>
<Button>Button</Button>
<Button>Button</Button>
<Button>Button</Button>
</Group>
<Group orientation="vertical">
<Button>Button</Button>
<Button>Button</Button>
<Button>Button</Button>
</Group>
</VStack>
Stretch Child Elements
To stretch child elements to full width, set grow to true.
<Group grow w="full">
<Button>Button</Button>
<Button>Button</Button>
<Button>Button</Button>
</Group>
Attach Child Elements
To attach child elements together, set attached to true.
<VStack alignItems="flex-start">
<Group attached>
<Input />
<IconButton
variant="surface"
aria-label="Add"
focusVisibleRing="inside"
icon={<PlusIcon fontSize="xl" />}
/>
</Group>
<Group attached>
<Tag colorScheme="gray" variant="solid">
@yamada-ui/react
</Tag>
<Tag colorScheme="lime" variant="solid">
10k+
</Tag>
</Group>
<Group attached orientation="vertical">
<Button variant="outline" focusVisibleRing="inside">
Button
</Button>
<Button variant="outline" focusVisibleRing="inside">
Button
</Button>
<Button variant="outline" focusVisibleRing="inside">
Button
</Button>
</Group>
</VStack>
Props
Similar Components
Bleed
Bleed is a component used to extend elements beyond the boundaries of a container.
Box
Box is the most abstract component on which all other components are built. By default, it renders a div element.
Center
Center is a component that aligns the child elements in the center within the component.
Container
Container is a component used as a general division element. By default, it renders the section element.
Flex
Flex is a component that sets flex to Box. Also, convenient style shorthand is available.
Float
Float is a component used to fix elements to the edges of a container.
Grid
Grid is a component for managing grid layouts. It also comes with handy style shorthand.
HStack
HStack is used to stack child elements horizontally.
Uses Components & Hooks
Used By Components & Hooks
Autocomplete
Autocomplete is a component used to display suggestions in response to user text input.
Button
Button is an interactive component that allows users to perform actions such as submitting forms and toggling modals.
Checkbox
Checkbox is a component used for allowing users to select multiple values from multiple options.
CheckboxCard
CheckboxCard is a component used for allowing users to select multiple values from multiple options.
ColorPicker
ColorPicker is a component used by the user to select a color or enter an arbitrary color value.
DatePicker
DatePicker is a component used for users to select a date.
Input
Input is a component used to obtain text input from the user.
NativeSelect
NativeSelect is a component used for allowing users to select one value from a list of options. It displays a native dropdown list provided by the browser (user agent).
NumberInput
NumberInput is a component used to obtain numeric input from the user.
PasswordInput
PasswordInput is a component that allows users to input passwords with a visibility toggle.
PinInput
PinInput is a component used to capture pin codes or OTP (One-Time Password) inputs.
Radio
Radio is a component used for allowing users to select one option from multiple choices.
RadioCard
RadioCard is a component used for allowing users to select one option from multiple choices.
Select
Select is a component used for allowing a user to choose values from a list of options.
Toggle
Toggle is a component that has two states: on or off.