Join

Join is a versatile component that wraps around a set of elements and joins them together. It replaces traditional component groups like ButtonGroup and InputGroup, offering more flexibility by working with various elements including buttons, inputs, text blocks, and more.

Basic Usage

With Join
Without Join
Code Example
Basic.vue

A comparison of joined and non-joined buttons using the Join component.

Components

The Join components include the following:

  • Join - Wraps around elements to join them together horizontally or vertically.
  • Button - Can be used as a join item.
  • FileInput - Can be used as a join item.
  • Input - Can be used as a join item.
  • Flex - Can be used as a join item.
  • Select - Can be used as a join item.
  • Text - Can be used as a join item.
  • Input - Can be used as a join item.

Join

The Join component wraps around a set of elements and joins them together. It replaces traditional component groups like ButtonGroup and InputGroup, offering more flexibility by working with various elements including buttons, inputs, text blocks, and more.

Join Props Type Description
vertical
boolean

When set to true, joins elements vertically instead of the default horizontal layout.

Join Slots Description
default

The default slot. Content to be joined together. Child elements should have the join prop or join-item class.

Button

The Button component can be used as a join item by adding the join prop.

Button Props Type Description
join
boolean

Makes the button work as a join item when placed inside a Join component.

FileInput Props Type Description
join
boolean

Makes the file input work as a join item when placed inside a Join component.

Input

The Input component can be used as a join item by adding the join prop.

Input Props Type Description
join
boolean

Makes the input work as a join item when placed inside a Join component.

Flex

The Flex component can be used as a join item by adding the join prop.

Flex Props Type Description
join
boolean

Makes the flex container work as a join item when placed inside a Join component.

Select

The Select component can be used as a join item by adding the join prop.

Select Props Type Description
join
boolean

Makes the select work as a join item when placed inside a Join component.

Text

The Text component can be used as a join item by adding the join prop.

Text Props Type Description
join
boolean

Makes the text element work as a join item when placed inside a Join component.

Input

The Input component can be used as a join item by adding the join prop.

Input Props Type Description
join
boolean

Makes the text input work as a join item when placed inside a Join component.

Examples

Buttons

Joining multiple buttons together horizontally.

Code Example
Buttons.vue

Input with Button

Joining an input and a button together.

Code Example
InputByButton.vue

Select with Button

Joining a select element and a button together.

Code Example
SelectByButton.vue

Text with Input

As of DaisyUI Kit v5.0.0, the Label component has a new input slot that allows you to place an input element inside a label. This is preferred over the Join component.

Code Example
TextWithInput.vue

Text Around Input

Text around an input is better done using the Label component with the input slot.

Code Example
TextAroundInput.vue

Input with Text

Input with text is better done using the Label component with the input slot.

Code Example
InputWithText.vue

Flex, Input, and Button

This is a mix of the Join component and the Label component with the input prop.

Code Example
FlexInputButton.vue