Set#
Import#
import { Set } from 'bumbag';
Usage#
A <Set>
can be used to list a set of components. It will automatically space out the components, and wrap them when they reach the width of the viewport.
Spacing#
You can modify the spacing of the set with the spacing
prop.
Vertical#
You can also have a vertical set with the orientation
prop.
By default, <Set>
will preserve the width of it's children. However, if you'd like your children to fill the width of <Set>
, use the isFilled
prop:
Responsive breakpoint#
A set can snap from horizontal to vertical after a given breakpoint with the verticalBelow
prop.
Try drag the viewport with the slider!
Alignments#
You can align your Set
horizontally using the alignX
prop.
Set Props#
isFilled
boolean
Indicates if the set items should span the width of the set.
orientation
"horizontal" | "vertical"
Indicates the orientation of the set.
spacing
string
Sets the spacing between items.
verticalBelow
"tablet" | "mobile" | "fullHD" | "widescreen" | "desktop" | "min-fullHD" | "max-fullHD" | "min-widescreen" | "max-widescreen" | "min-desktop" | "max-desktop" | "min-tablet" | "max-tablet" | "min-mobile" | "max-mobile"
Indicates the breakpoint at which the set should become vertical.
Inherits Box
props
use
string | (ComponentClass<any, any> & { useProps: any; }) | (FunctionComponent<any> & { useProps: any; })
className
string
children
string | number | boolean | {} | ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<...>)> | ReactNodeArray | ReactPortal | ((props: BoxProps) => ReactNode)
alignX
"right" | "left" | "center"
alignY
"top" | "bottom" | "center"
variant
string
colorMode
string
disabled
boolean
overrides
{ useCSSVariables?: boolean; altitudes?: AltitudesThemeConfig; borders?: BordersThemeConfig; borderRadii?: BorderRadiiThemeConfig; ... 95 more ...; Template?: TemplateThemeConfig; }
elementRef
((instance: any) => void) | RefObject<any>
themeKey
string
Theming#
Set.styles.base
Set.styles.child.base
Set.styles.child.first
Set.styles.child.middle
Set.styles.child.last
Set.styles.horizontal
Set.styles.child.horizontal
Set.styles.vertical
Set.styles.child.vertical