Componentdata0.8 KB gzipZero dependencies
Settings Section
Settings section: title, description rows and save confirmation stamp.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add settings-sectionOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { SettingsSection } from "@/components/ui/settings-section"; <SettingsSection />Source code
settings-section.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxsettings-section.tsx63 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface SettingsSectionProps extends React.HTMLAttributes<HTMLDivElement> { title: string; description?: string; rows?: { label: string; control: React.ReactNode }[]; onSave?: () => void;} /** Settings section panel: title + description + setting rows + save. */export function SettingsSection({ title, description, rows = [], onSave, className, children, ...props }: SettingsSectionProps) { const [saved, setSaved] = React.useState(false); const handleSave = () => { onSave?.();Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { SettingsSection } from "@/components/ui/settings-section"; <SettingsSection />| Prop | Type | Description |
|---|---|---|
| title | string | Primary heading or title text. |
| description | string | Descriptive helper or subtitle text. |
| rows | { label: string; control: React.ReactNode }[] | Configures rows. (Default: []) |
| onSave | () => void | Callback invoked on save. |