Overview
- Getting Started
- Loading States
- Forms
- Feature Flags
- Portal
- Show
- For
- Text
- Toggle
- Local Storage
Actions
- Button
- Icon Button
Communication
- Admonition
- Accordion
- Avatar
- Notifications
- Progress Indicators
- Tag
- Tooltip
Containment
- Confirm Modal
- Prompt Modal
- CTA Modal
- Modaldeprecated
- Dialog
- Table
Navigation
- Menu
- Tabs
Selection
- Drag & Drop
- Checkbox
- Date Picker
- Radio
- Rating
- Select
- Combobox
- Switch
Inputs
- Field
- Input
- Textarea
- Labeldeprecated
- Fieldset
- Field Messagedeprecated
- File Uploader
Hooks & Helpers
- split-props
- trap-focusdeprecated
- use-root-colors
- use-theme
- use-theme-context
- use-toggledeprecated
For
Render a list of components or a fallback. Inspired by SolidJS.
1import { For } from '@cerberus/react'
Usage
The For
component is used to render a list of components or a fallback. It is an abstraction of the Array.map
method.
0. Cerberus
1. Design
2. System
3. Roolz
4. D00dz
API
export interface ForProps { each: any[] fallback?: ReactNode}
define function For(props: ForProps): ReactNode | null
Props
The For
component accepts the following props:
Name | Default | Description |
---|---|---|
each | An Array of items to loop through. | |
fallback | null | The content to render when the each value is empty. |
1import { For } from '@cerberus/react'
Usage
The For
component is used to render a list of components or a fallback. It is an abstraction of the Array.map
method.
0. Cerberus
1. Design
2. System
3. Roolz
4. D00dz
API
export interface ForProps { each: any[] fallback?: ReactNode}
define function For(props: ForProps): ReactNode | null
Props
The For
component accepts the following props:
Name | Default | Description |
---|---|---|
each | An Array of items to loop through. | |
fallback | null | The content to render when the each value is empty. |