Skip to content

Components ​

Import the three components from @rafaelaugusto/nitroui-vue. In the example this name resolves to the package in the workspace.

View ​

View creates a native container. Its default slot accepts child components. Use a layout object to set spacing and dimensions.

vue
<View :layout="{ padding: 20, gap: 8 }">
  <Text>Account</Text>
  <TextInput v-model="name" placeholder="Your name" />
</View>

Text ​

Text creates a native label. Its default slot accepts strings and interpolations. Place text inside this component and keep nested native views inside a View.

PropTypeBehavior
fontSizenumberPositive font size. Defaults to 17.
layoutLayoutSets the label's layout.
vue
<Text :fontSize="24">Hello, {{ name }}!</Text>

TextInput ​

TextInput creates a single-line editable field. Programmatic updates call the native setter. Native edits emit the full current string.

Prop or eventTypeBehavior
modelValuestringCurrent text. Removing the value clears the field.
update:modelValue(value: string) => voidEmitted on native edits. Use with v-model.
placeholderstringHint shown while the field is empty.
layoutLayoutSets the input's dimensions and spacing.

These two forms bind the same field:

vue
<TextInput v-model="name" />
<TextInput :modelValue="name" @update:modelValue="name = $event" />

NitroUI Vue · Independent community renderer