mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-29 00:27:34 +00:00
Migrated 93 MDX pages from old Tamagui-based site to @hanzo/docs system: - 13 intro pages (installation, props, styles, themes, etc.) - 22 core pages (configuration, styled, variants, animations, etc.) - 48 component pages (button, dialog, select, toast, etc.) - 14 guide pages (next-js, expo, vite, webpack, metro, etc.) Zero tamagui references. Uses @hanzo/docs-base-ui + @hanzo/docs-mdx.
33 lines
952 B
Plaintext
33 lines
952 B
Plaintext
---
|
|
title: Unspaced
|
|
description: Avoids spacing for children inside a spacing container
|
|
name: unspaced
|
|
component: Unspaced
|
|
package: core
|
|
---
|
|
|
|
While the `space` property is deprecated, Unspaced lives on in a better form, one which is easily back-ported to add Unspaced support (as well as adding `gap` support).
|
|
|
|
When using the `space` style prop, you may want some children to not be spaced. Use Unspaced:
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { Text, Unspaced, View } from '@hanzogui/core'
|
|
|
|
export default () => (
|
|
<View position="relative" space>
|
|
<View width={20} height={20} />
|
|
{/* space */}
|
|
<View width={20} height={20} />
|
|
{/* no */}
|
|
<Unspaced>
|
|
<Text position="absolute">Some absolute positioned text</Text>
|
|
</Unspaced>
|
|
</View>
|
|
)
|
|
```
|
|
|
|
If you want the item to be visually hidden as well as unspaced, see
|
|
[VisuallyHidden](/docs/components/visually-hidden), which uses Unspaced but also hides the contents in an accessible manner.
|