Form Components
Foundation Components¶
These are the building blocks used throughout the application.
Form Controls¶
Button¶
Versatile button component with multiple variants and sizes.
Variants:¶
primary: (Blue) - Main actions like "Save" or "Create"outline: (White with border) - Secondary actions like "Cancel"secondary: (gray background) Alternative primary actionsghost: (Transparent) - Subtle actions in toolbarstertiary: (Light gray) - Minor actions
Sizes:¶
icon: 32px square for icon-only buttonssm: Small 32px heightmd: Medium 40px height (default)lg: Large 48px height
Features:¶
- Click the button to perform an action
- Primary buttons show the most important action on a page
- Outline buttons are for less important actions
Usage Example:
<Button variant="primary" size="md">
Save Changes
</Button>
<Button variant="outline" size="sm">
Cancel
</Button>
Text Input¶
Text inputs let you type information like names, descriptions, or search terms.
Sizes:¶
medium: Standard height (default)large: Increased height for emphasis
Features:¶
- Label - Shows what information to enter
- Placeholder - Light gray text showing example input
- Error message - Red text if something is wrong
- Required indicator (red asterisk *) - Must be filled out
- Icons - Small images on the left or right side
Props:¶
label: Optional label texterror: Error message to displayicon: Left-side icon componentrightIcon: Right-side icon componentrequired: Shows asterisk in labeldisabled: Disables input with visual feedback
States:¶
- Normal - Ready to type
- Focused - Blue ring when you click inside
- Error - Red border when there's a problem
- Disabled - Grayed out, cannot edit
How to use:¶
- Click inside the input box
- Type your text
- Press Tab or click outside to move to the next field
Usage Example:
<Input
label="Email Address"
type="email"
placeholder="Enter your email"
required
error={errors.email}
/>
Chip / Tag¶
Small, compact elements displaying tags, filters, or status information.
Variants:¶
regular: Solid background (default)outline: Border with transparent background
Colors:¶
warningOrange - WarningsinfoBlue - CategoriessuccessGreen - Open AccesserrorRed - ErrorsgreyGray (Default) - General labelssmart-search: Special theme for AI-powered features
Sizes:¶
xs: Extra small for compact spacessm: Small sizemd: Medium size (default)
Features:¶
- Optional remove button (X icon)
- Customizable colors and variants
- Compact design for data display
- Outline chips have a border and white background
- Letter spacing for readability
Example uses:¶
- Dataset category labels
- Access type badges
- Removable keyword tags
Usage Example:
<Chip color="success" size="sm">
Active
</Chip>
<Chip color="grey" onRemove={() => removeFilter()}>
Filter: Category
</Chip>
Form Components¶
Components for building forms and collecting user input.
Textarea¶
Multi-line text input with auto-resize capability.
Features:¶
- Type multiple lines of text
- Label with optional required indicator
- Error message display
- Character counter e.g., "45/3000" (when
maxLengthprovided) - Auto-resize based on content
- Disabled state support
- Placeholder text
Props:¶
label: Field labelerror: Error messagerequired: Shows asteriskmaxLength: Maximum characters allowedrows: Minimum number of rows
How to use:¶
- Click inside
- Type your text (press Enter for new lines)
- Watch the character counter if shown
Example uses:¶
- Writing dataset descriptions
- Adding notes or comments
Checkbox¶
Checkboxes let you turn options on (checked) or off (unchecked).
Features:¶
- Custom styled checkbox
- Label text with proper spacing
- Checked/unchecked states
- Disabled state
- Focus visible indicators
- Accessible keyboard navigation
How to use:¶
- Click the box or label to check/uncheck
- Checked = Blue box with white checkmark
- Unchecked = Empty white box
- You can check multiple boxes in a group
Example uses:¶
- Selecting multiple datasets
- Agreeing to terms
- Enabling features
Radio¶
Radio buttons let you choose ONE option from a group.
Features:¶
- Custom styled radio button
- Label text support
- Selected/unselected states
- Disabled state handling
- Focus indicators
- Group support for multiple options
How to use:¶
- Click a circle to select that option
- Only one can be selected at a time
- Selected option has a blue filled circle
- Unselected options have empty circles
Example uses:¶
- Choosing dataset visibility (Public/Private)
- Selecting a single license type
Select¶
Dropdowns let you choose one option from a list.
Features:¶
- Label with optional required indicator
- Click to open the list of options
- Click an option to select it
- Selected option stays visible when closed
- Error message display
- Placeholder text
- Disabled state
- Custom styling matching design system
- Native select functionality
How to use:¶
- Click the dropdown
- Scroll through options if needed
- Click your choice
- The dropdown closes automatically
Example uses:¶
- Choosing a license type
- Selecting a category
- Picking a file type
MultiSelect¶
Multi-option selection component with checkbox support.
Features:¶
- Select multiple options
- Search/filter capability
- Select all/deselect all
- Visual indication of selected items
- Dropdown interface
- Keyboard navigation