Skip to content

Reference

[09] Reference

Common Props

Layout and utility props shared by most VaneUI React components, written as booleans: responsive hide, flex alignment, position, display, overflow and gap.

Edit this page

Layout and utility props shared across most VaneUI components. Documented here once instead of on every component page. Per-component pages link here from the "Layout & utility props" disclosure under their props table.

Component-specific categories are listed on each component's own page because defaults differ. These include size (xs/sm/md/lg/xl), appearance (primary/accent/secondary/tertiary/success/danger/warning/info/inheritAppearance), variant (filled/outline/ghost, default outline), shape (pill/rounded/sharp, default rounded), padding (padding/paddingX/paddingY/noPadding), fontWeight, and textAlign. Default size is md, except the controls and the dense components, which default to sm: Button, IconButton, Input, Textarea, Select, Field, Label, NavLink, MenuItem, MenuLabel, Tooltip, Badge, Table and Breadcrumb. The ghost variant renders a transparent background with no border and appearance-colored text, plus a tinted hover background.

Hide

Hide elements at specific breakpoint sizes for responsive layouts.

PropDescription
mobileHideHide below 768px (48rem); the 768px boundary itself stays visible
tabletHideHide below 1024px (64rem); the 1024px boundary itself stays visible
desktopHideHide below 1280px (80rem); the 1280px boundary itself stays visible

Breakpoints are exclusive (width < the boundary). Combining several *Hide props resolves to the widest, so mobileHide tabletHide hides below 1024px.

Show

Show elements only below a breakpoint, the reverse of the hide props.

PropDescription
mobileShowShow only below 768px (48rem); hidden from 768px up
tabletShowShow only below 1024px (64rem); hidden from 1024px up
desktopShowShow only below 1280px (80rem); hidden from 1280px up

Show and hide are separate categories, so they combine: mobileHide tabletShow shows an element only from 768 to 1024px. A mobile menu button that disappears once the full navigation fits is <IconButton tabletShow aria-label="Menu">.

Items

Cross-axis alignment for flex items (align-items). Controls how flex children align perpendicular to the flex direction.

PropDescription
itemsStartAlign items to start (top/left)
itemsEndAlign items to end (bottom/right)
itemsCenterAlign items to center
itemsBaselineAlign items to baseline
itemsStretchStretch items to fill container

Justify

Main-axis alignment for flex items (justify-content). Controls how flex children distribute along the flex direction.

PropDescription
justifyStartPack items toward the start of the main axis
justifyEndPack items toward the end of the main axis
justifyCenterCenter items along the main axis
justifyBetweenDistribute items with space between them
justifyAroundDistribute items with space around them
justifyEvenlyDistribute items with equal space around them
justifyStretchStretch items to fill the main axis
justifyBaselineAlign items along their baseline on main axis

Align self

Cross-axis alignment for a single flex or grid item (align-self), overriding the parent's items value for that one child.

PropDescription
alignSelfAutoUse the parent's align-items value (align-self: auto)
alignSelfStartAlign this item to the start of the cross axis
alignSelfEndAlign this item to the end of the cross axis
alignSelfCenterCenter this item on the cross axis
alignSelfStretchStretch this item to fill the cross axis
alignSelfBaselineAlign this item to its baseline

Justify self

Inline-axis alignment for a single grid item within its grid area (justify-self). Useful with CSS anchor positioning.

PropDescription
justifySelfAutoUse the parent's justify-items value (justify-self: auto)
justifySelfStartAlign this item to the start of the inline axis
justifySelfEndAlign this item to the end of the inline axis
justifySelfCenterCenter this item on the inline axis
justifySelfStretchStretch this item to fill the inline axis

Position

CSS positioning property values for controlling element position behavior.

PropDescription
relativeRelative positioning
absoluteAbsolute positioning
fixedFixed positioning
stickySticky positioning; sticks at the top edge with no top-* class
staticStatic positioning

sticky sticks at the top edge (top: 0) on its own. Set the --sticky-top CSS variable on the element or an ancestor to stick below a fixed header, for example --sticky-top: 4rem. A top-* class still wins, and an element with a bottom-* class gets no top. The default top edge needs @vaneui/ui 1.5.0 or later.

Display

CSS display property values for controlling element layout behavior.

PropDescription
inlineInline display - flows with text
blockBlock display - takes full width, new line
inlineBlockInline-block display - inline but with block properties
flexFlex display - flexbox container
inlineFlexInline-flex display - inline flexbox container
gridGrid display - CSS grid container
inlineGridInline-grid display - inline grid container
contentsContents display - element's box is removed, children display as if parent didn't exist
tableTable display - behaves like table element
tableCellTable-cell display - behaves like td element
hiddenHidden display - element is not visible

Overflow

Overflow behavior for content that exceeds container bounds.

PropDescription
overflowAutoAuto overflow - show scrollbars if needed
overflowHiddenHidden overflow - clip content without scrollbars
overflowClipClip overflow - hard clip without scrollbars
overflowVisibleVisible overflow - content extends beyond bounds
overflowScrollScroll overflow - always show scrollbars
overflowXAutoAuto overflow on X-axis only
overflowYAutoAuto overflow on Y-axis only
overflowXHiddenHidden overflow on X-axis only
overflowYHiddenHidden overflow on Y-axis only
overflowXClipClip overflow on X-axis only
overflowYClipClip overflow on Y-axis only
overflowXVisibleVisible overflow on X-axis only
overflowYVisibleVisible overflow on Y-axis only
overflowXScrollScroll overflow on X-axis only
overflowYScrollScroll overflow on Y-axis only

Wrap

Flex item wrapping behavior for multiline layouts.

PropDescription
flexWrapAllow flex items to wrap to new lines when container is too narrow
flexNoWrapForce flex items to stay on single line (may overflow)
flexWrapReverseWrap flex items in reverse order (last items wrap first)

Gap

Spacing between flex/grid items.

PropDescription
gapEnable gap spacing between children; the gap follows the size prop
noGapDisable gap spacing
gapXsFixed extra-small gap: 8px on layout components, 4px on the others
gapSmFixed small gap: 12px on layout components, 6px on the others
gapMdFixed medium gap: 16px on layout components, 8px on the others
gapLgFixed large gap: 24px on layout components, 10px on the others
gapXlFixed extra-large gap: 32px on layout components, 12px on the others

A fixed step stays the same at every size and every screen width, where gap grows with the size prop and, with responsiveSizing, shrinks on tablet and mobile. <Row lg gapSm> keeps the large text and padding of lg with a 12px gap. The fixed steps need @vaneui/ui 1.8.0 or later.

Flex direction

Flex layout direction for arranging children.

PropDescription
rowFlex direction row (horizontal)
columnFlex direction column (vertical)
rowReverseFlex direction row-reverse
columnReverseFlex direction column-reverse

Flex

Flex-grow / flex-shrink shorthand for distributing space along the main axis. Mutually exclusive: only one value can be active.

PropDescription
flex1Take up remaining space (flex: 1 1 0%); the standard "fill the rest" behavior
flexAutoGrow but respect intrinsic content size (flex: 1 1 auto)
flexNoneDon't grow and don't shrink (flex: none); fixed-size in a flex container

Shrink

Flex-shrink override. Independent toggle so it can be combined with flex1/flexAuto or used standalone.

PropDescription
noShrinkPrevent the item from shrinking below its content size (shrink-0); typical for fixed-width sidebars in a flex row

Border

Border visibility on component sides. Side props compose: borderT borderL applies both. noBorder resets and wins.

PropDescription
borderEnable border on all sides
borderTEnable border on top
borderBEnable border on bottom
borderLEnable border on left
borderREnable border on right
borderXEnable border on left and right
borderYEnable border on top and bottom
borderStartEnable border on the inline-start side (flips under dir="rtl")
borderEndEnable border on the inline-end side (flips under dir="rtl")
noBorderDisable all borders

The layout components (Row, Col, Stack, Grid2 to Grid6, Container, Card and Section) also take strongBorder, which keeps the border sides as set and paints them in the appearance's strong color, the one its focus ring uses. A filled Card, whose border is otherwise transparent, shows it too. It is listed in each of those components' own props tables, and the Card strong border example shows it on a row of plans. strongBorder needs @vaneui/ui 1.4.5 or later.

Margin

External spacing that scales with the component's size prop, available on layout components and block typography. Side props compose: marginT marginB applies both. noMargin resets and wins. Block typography defaults to noMargin.

PropDescription
marginEnable margin on all sides
marginXEnable margin on left and right
marginYEnable margin on top and bottom
marginTEnable margin on top
marginBEnable margin on bottom
noMarginDisable all margins

Shadow

Drop shadow visibility and size. shadow follows the component's size prop. shadowXs to shadowXl fix the size whatever the component's size, on the component's own ramp: compact for UI components such as Button and Input, deeper for layout components such as Card, Modal and Popup. All seven props share one category, so set one at a time. The fixed sizes need @vaneui/ui 1.4.5 or later.

PropDescription
shadowEnable drop shadow at the component's size
shadowXsExtra-small drop shadow, whatever the component's size
shadowSmSmall drop shadow, whatever the component's size
shadowMdMedium drop shadow, whatever the component's size
shadowLgLarge drop shadow, whatever the component's size
shadowXlExtra-large drop shadow, whatever the component's size
noShadowDisable drop shadow

Ring

Inset ring visibility. insetRing is an always-on decorative inset ring, not the keyboard focus indicator (that is focusVisible, in the Focus visible section).

PropDescription
insetRingEnable the inset ring
noInsetRingDisable the inset ring

Focus visible

Focus-visible outline visibility for keyboard navigation indicators.

PropDescription
focusVisibleEnable focus-visible outline
noFocusVisibleDisable focus-visible outline

Default on Button, IconButton, Link, NavLink, MenuItem, and the form controls (Input, Textarea, Select, Checkbox, Radio, Switch). Auto-enabled on components that tag-switch to <a> via href (Badge, Card, Chip, Code, Row, Col, Stack).

Cursor

Cursor appearance for interactive elements and states.

PropDescription
cursorPointerPointer cursor - indicates clickable element
cursorDefaultDefault cursor - standard arrow
cursorNotAllowedNot-allowed cursor - indicates disabled state
cursorNoneNo cursor - hides the cursor
cursorTextText cursor - indicates selectable text
cursorMoveMove cursor - indicates draggable element
cursorWaitWait cursor - indicates loading/processing

Transition

Animation effects for state changes.

PropDescription
transitionEnable smooth transitions between states
noTransitionDisable transitions for instant state changes

Whitespace

Text wrapping and whitespace behavior. Typography components and UI elements such as Button, Badge, Code and Input take these props, and from @vaneui/ui 1.4.5 so do the layout components Row, Col, Stack, Grid2 to Grid6, Container, Card and Section. white-space is inherited, so <Row whitespaceNowrap> keeps every line of text inside the row from wrapping, as in the Img noShrink example.

PropDescription
whitespaceNowrapNo wrap - text stays on single line
whitespaceNormalNormal wrapping - default browser behavior
whitespacePrePreserve whitespace and line breaks
whitespacePreWrapPreserve whitespace, wrap text
whitespacePreLinePreserve line breaks, collapse spaces, wrap text
whitespaceBreakSpacesPreserve whitespace including trailing spaces, wrap text (white-space: break-spaces)

Width

Component width sizing.

PropDescription
wFullSet width to 100%
wFitSet width to fit-content
wAutoSet width to auto
wScreenSet width to 100vw (viewport width), removes max-width constraint

Responsive width

Full width below a breakpoint, on top of the component's base width.

PropDescription
mobileWFullFull width below 768px (48rem); base width from 768px up
tabletWFullFull width below 1024px (64rem); base width from 1024px up
desktopWFullFull width below 1280px (80rem); base width from 1280px up

<Button mobileWFull> fills a row that mobileStack turns into a column on a phone, and keeps its fit width on wider screens.

Height

Component height sizing.

PropDescription
hFitSet height to fit-content
hFullSet height to 100%
hAutoSet height to auto
hScreenSet height to 100vh (viewport height), removes max-height constraint

Transparent

Disable background color, making the component transparent.

PropDescription
transparentDisable background color - makes component background transparent

Responsive

Enable breakpoint-specific sizing for adaptive layouts.

PropDescription
responsiveSizingEnable responsive sizing - uses breakpoint-specific classes for font size, padding, and gap

Object fit

Image and video sizing within their containers.

PropDescription
objectCoverCover - image covers container, may be cropped
objectContainContain - image fits inside container, may have letterboxing
objectFillFill - image stretches to fill container
objectNoneNone - image displays at natural size
objectScaleDownScale down - like contain, but never scales up

Aspect ratio

Fixed width-to-height ratio. Img, Card, Row, Col and Stack take these props from @vaneui/ui 1.8.0. Set the width, and the height follows.

PropDescription
aspectSquare1:1 (aspect-ratio: 1 / 1)
aspectVideo16:9 (aspect-ratio: 16 / 9)
aspectAutoThe element's own ratio (aspect-ratio: auto)

Screen reader only

PropDescription
srOnlyHide the element visually and keep it in the accessibility tree, so screen readers still read it

Text, Title, SectionTitle, PageTitle, Link, List, ListItem, Blockquote and Label take srOnly from @vaneui/ui 1.8.0. It wins over the component's own width, padding and margin, so the text stays hidden whatever other props it has.

Skeleton

PropDescription
skeletonShow the component as a loading placeholder in its own layout. On a container it reaches every component inside

Every component takes skeleton from @vaneui/ui 1.8.0. Text turns into bars as long as each line (one 12-character bar while it is empty), the box components (buttons, badges, fields, avatars, images, icons) into solid shapes of their own size, and a container keeps its surface and border. The element gets aria-busy="true" and inert. See Skeleton.

Blur

Backdrop blur effect for overlays and visual effects.

PropDescription
backdropBlurEnable backdrop blur effect
noBackdropBlurDisable backdrop blur effect

Pointer events

Element interactivity with the pointer. Overlay and Popup take these props, and from @vaneui/ui 1.4.5 so do the layout components Row, Col, Stack, Grid2 to Grid6, Container, Card and Section. pointer-events is inherited: a layer with pointerEventsNone lets clicks through to the page behind it, and a child with pointerEventsAuto inside it, such as a floating toolbar, takes clicks again.

PropDescription
pointerEventsNoneDisable pointer events - clicks pass through the element
pointerEventsAutoEnable pointer events (default browser behavior)

Constrain width

Minimum width constraint for popup and floating components.

PropDescription
constrainWidthApply size-dependent minimum width (uses --popup-min-w CSS variable)

Clamp height

Maximum height constraint for components.

PropDescription
clampHeightApply size-dependent maximum height (uses --max-height CSS variable)

Orientation

Horizontal or vertical layout direction for certain components.

PropDescription
horizontalDisplay as a horizontal line (default)
verticalDisplay as a vertical line instead of horizontal