Skip to content

[component] Create Button #1

@theoribbi

Description

@theoribbi

Summary

Implement the Button component for NativeUI, inspired by the shadcn/ui Button.

Requirements

  • Use Pressable from react-native as the main base component.
  • Support the following variants:
    • default (primary)
    • secondary
    • destructive
    • outline
    • ghost
    • link
  • Support the following sizes:
    • default
    • sm
    • lg
    • icon
  • Style the component using nativewind utility classes.
  • Allow passing a className prop to customize or extend the default styles.
  • Implement disabled state (visual and functional).
  • Optionally handle a loading state by displaying an ActivityIndicator.
  • Ensure type safety with TypeScript.

Deliverables

  • Create a button.tsx file under /registry/button.
  • Follow the structure and naming conventions similar to shadcn/ui Button.

References

Notes

Focus on keeping the Button simple, accessible, and easily customizable.
The goal is to make it easy to clone and adapt when building apps.


Metadata

Metadata

Assignees

Labels

component:newCreation of a new component

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions